After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 339110 - Battery hotkey only works once
Battery hotkey only works once
Status: RESOLVED NOTGNOME
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-04-20 03:06 UTC by lists
Modified: 2006-04-26 13:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
My lshal (122.04 KB, text/plain)
2006-04-26 11:20 UTC, lists
Details

Description lists 2006-04-20 03:06:44 UTC
I am using a Dell Inspiron 510m with Dapper Drake Ubuntu (fully updated). I am using newer .debs than the ones in the Dapper repos (to test other GPM things). The first time I press Fn+F3 I get a nice little information bubble telling me about the percentage battery left etc. but, if I push it again, it never re-appears.

Let me know if you need any info from me.
Comment 1 Richard Hughes 2006-04-20 07:34:25 UTC
Do you get a event from "lshal -m" on every keypress?
Comment 2 lists 2006-04-21 00:55:43 UTC
No I don't:

$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = battery

and it doesn't add any more lines no matter how many times I press it. If I pressed the hotkey prior to monitoring it then it doesn't display that line at all.
Comment 3 Richard Hughes 2006-04-21 09:43:36 UTC
So it's a HAL (or X) bug. Do you get events when pressing that battery key whilst xev is running?
Comment 4 lists 2006-04-23 03:13:33 UTC
Yes. I get:
KeyPress event, serial 29, synthetic NO, window 0x3200001,
    root 0x4c, subw 0x0, time 3300302463, (597,354), root:(607,451),
    state 0x0, keycode 241 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x3200001,
    root 0x4c, subw 0x0, time 3300302463, (597,354), root:(607,451),
    state 0x0, keycode 241 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:

every time that I push Fn+F2.
Comment 5 Richard Hughes 2006-04-23 07:13:13 UTC
So a HAL bug.

Can you grab the output of:

/usr/sbin/hald --daemon=no --verbose=yes --retain-privileges

as I suspect the keyboard addon is crashing... which you can see by doing:

ps -aux |grep hal

and looking for 

/usr/libexec/hald-addon-keyboard

before and after you press the key.

Thanks.
Comment 6 lists 2006-04-24 03:04:21 UTC
$ /usr/sbin/hald --daemon=no --verbose=yes --retain-privileges
/usr/sbin/hald: unrecognized option `--retain-privileges'

usage : hald [--daemon=yes|no] [--verbose=yes|no] [--help]

        --daemon=yes|no      Become a daemon
        --verbose=yes|no     Print out debug (overrides HALD_VERBOSE)
        --use-syslog         Print out debug messages to syslog instead of stderr.
                             Use this option to get debug messages if HAL runs as
                             daemon.
        --help               Show this information and exit
        --version            Output version information and exit
The HAL daemon detects devices present in the system and provides the
org.freedesktop.Hal service through the system-wide message bus provided
by D-BUS.

For more information visit http://freedesktop.org/Software/hal

aaron@Zyanya:~$ /usr/sbin/hald --daemon=no --verbose=yes
14:58:58.223 [I] hald.c:469: hal 0.5.7
14:58:58.273 [I] hald.c:534: Will not daemonize
14:58:58.274 [I] hald_dbus.c:3236: local server is listening at unix:abstract=/tmp/hald-local/dbus-0zNeXyWkTR,guid=f23e4c44668c737b84c53afe26164500
14:58:58.362 [I] hald_runner.c:115: Runner has pid 5711
Runner started - allowed paths are '/usr/lib/hal:/usr/share/hal/scripts'
14:58:58.494 [E] hald.c:275: drop_privileges: could not set group id

-=== Before pressing hotkey ===-

$ ps -aux |grep hal
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
108       4021  0.2  2.1   6864  5432 ?        Ss   14:48   0:01 /usr/sbin/hald
root      4022  0.0  0.3   2696   976 ?        S    14:48   0:00 hald-runner
108       4027  0.0  0.3   1980   852 ?        S    14:48   0:00 /usr/lib/hal/hald-addon-acpi
108       4077  0.0  0.3   1976   784 ?        S    14:48   0:00 /usr/lib/hal/hald-addon-keyboard
108       4091  0.0  0.3   1980   804 ?        D    14:48   0:00 /usr/lib/hal/hald-addon-storage
108       4092  0.0  0.3   1980   804 ?        S    14:48   0:00 /usr/lib/hal/hald-addon-storage
aaron     5764  1.0  0.3   2728   792 pts/0    D+   15:00   0:00 grep hal

-=== After pressing hotkey ===-

aaron@Zyanya:~$ ps -aux |grep hal
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
108       4021  0.1  2.1   6864  5432 ?        Ss   14:48   0:01 /usr/sbin/hald
root      4022  0.0  0.3   2696   976 ?        S    14:48   0:00 hald-runner
108       4027  0.0  0.3   1980   852 ?        S    14:48   0:00 /usr/lib/hal/hald-addon-acpi
108       4077  0.0  0.3   1976   820 ?        S    14:48   0:00 /usr/lib/hal/hald-addon-keyboard
108       4091  0.0  0.3   1980   804 ?        S    14:48   0:00 /usr/lib/hal/hald-addon-storage
108       4092  0.0  0.3   1980   804 ?        S    14:48   0:00 /usr/lib/hal/hald-addon-storage
aaron     5779  0.0  0.3   2876   796 pts/0    R+   15:01   0:00 grep hal
Comment 7 Richard Hughes 2006-04-26 07:12:13 UTC
Hmm. Odd. Can you attach a lshal pls.
Comment 8 lists 2006-04-26 11:20:57 UTC
Created attachment 64308 [details]
My lshal

Here is the lshal output. My GPM is currently Dapper Beta standard (2.14 instead of 2.15) so I don't get the message box, but from what I understand the problem is in HAL anyway. The lshal -m behaviour is still the same as above (works the first time, nothing after that), but let me know if you need me to upgrade to 2.15.
Comment 9 Richard Hughes 2006-04-26 12:42:08 UTC
No upgrade reqd, as if "lshal -m" doesn't work, then g-p-m wont.

I see you have two input devices that init hald-addon-keyboard:

AT Translated Set 2 keyboard (laptop kbd probably)
and
Belkin Components USB-PS2 Adapter

Can you retry without the latter connected? Not sure why that would help.

I'll email matthew and see what he things too.
Comment 10 Matthew Garrett 2006-04-26 13:09:41 UTC
Dell hardware is stupid(tm). Pressing the key once generates a key down event. Pressing it again generates a key repeat event. There's never a key up event. I'm looking at fixing this in the kernel. It's not a hal or g-p-m bug.
Comment 11 Richard Hughes 2006-04-26 13:30:01 UTC
I thought you might know the answer to this, thanks.

I'll close this as NOTGNOME but feel free to use this as a tracker for updates.

Thanks.