Bug#455769: intermittent lid-sensing not gnome-power-manager's fault

Joshua Judson Rosen rozzin at geekspace.com
Fri Apr 4 21:38:23 UTC 2008


I also see this problem on my Thinkpad X60 Tablet, and have some more
insight:

It worked perfectly when gnome-power-manager was calling out to `hibernate' as
a back-end, and broke when gnome-power-manager switched to pm-utils.

The reason that it worked with `hibernate' is that the Linux's
"button" module was on hibernate's blacklist (a list of modules that
don't handle suspend/resume properly; hibernate unloads all
blacklisted modules before suspending and re-loads them after
resuming).

pm-utils doesn't have anything equivalent to hibernate's blacklist, so
it doesn't know to unload/load the `button' module (or any other
problematic modules--such as ath_pci, for example).

The solution that I found involves making pm-utils unload `button' on
suspend and re-load it on resume via a script in
/etc/pm/sleep.d/. But, just adding the simple `unload/load' step
reveals what appears to be a new issue in HAL (or between
gnome-power-manager and HAL): what it looks like is that, sometimes,
HAL notices that `button' has been removed, this configuration-change
propagates to gnome-power-manager, and gnome-power-manager drops
support for all `button'-related features (no more lid-sensing, and
even all of the related settings in the preferences-dialogue go
away). The solution I have for *this* problem is to just reload HAL.

Thus, I have the following script in /etc/pm/sleep.d/00button:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00button
Type: text/x-sh
Size: 107 bytes
Desc: workaround for issues w/ Linux `button' module
Url : http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20080404/de1fd644/attachment-0001.sh 
-------------- next part --------------

As I noted above, hibernate includes a (fairly lengthly) list of
modules that are known to be problematic with regard to
suspend/resume--a `more right' solution than mine is probably to
incorporate a generalised feature similar to hibernate's blacklist
into pm-utils.

This bug should probably be reassigned to pm-utils.

It may also make sense to open a new bug against HAL or
gnome-power-manager regarding the `seeing button disappear but not
noticing it reappear' behaviour, but I'm not sure exactly where or
what the issue is between them at this point.

-- 
Don't be afraid to ask (Lf.((Lx.xx) (Lr.f(rr)))).


More information about the pkg-gnome-maintainers mailing list