Fn-F3 Battery function key doesn't work on Dell Latitude 110L

Bug #30457 reported by Daniel Robitaille
18
Affects Status Importance Assigned to Milestone
hotkey-setup (Ubuntu)
Fix Released
Medium
Paul Sladen

Bug Description

On my Dell Laptop Latitude 110l, using Dapper, the function keys for Hibernate (fn-f1), and for the battery status (fn-f3) don't work. If I use xev, here is the output I get when I press these two functions keys:

Hibernate (fn-f1):

KeyPress event, serial 26, synthetic NO, window 0x2e00001,
   root 0x4c, subw 0x0, time 812513907, (168,-10), root:(1009,131),
   state 0x0, keycode 165 (keysym 0x0, NoSymbol), same_screen YES,
   XLookupString gives 0 bytes:
   XmbLookupString gives 0 bytes:
   XFilterEvent returns: False

KeyRelease event, serial 26, synthetic NO, window 0x2e00001,
   root 0x4c, subw 0x0, time 812513907, (168,-10), root:(1009,131),
   state 0x0, keycode 165 (keysym 0x0, NoSymbol), same_screen YES,
   XLookupString gives 0 bytes:

Battery (fn-f3):
KeyPress event, serial 29, synthetic NO, window 0x2e00001,
   root 0x4c, subw 0x0, time 812514544, (168,-10), root:(1009,131),
   state 0x0, keycode 217 (keysym 0x0, NoSymbol), same_screen YES,
   XLookupString gives 0 bytes:
   XmbLookupString gives 0 bytes:
   XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x2e00001,
   root 0x4c, subw 0x0, time 812514544, (168,-10), root:(1009,131),
   state 0x0, keycode 217 (keysym 0x0, NoSymbol), same_screen YES,
   XLookupString gives 0 bytes:

Revision history for this message
William Grant (wgrant) wrote :

My Inspiron 630m has those and other keys not working, unless I manually configure them. See https://wiki.ubuntu.com/LaptopTestingTeam/DellInspiron630m for details of the keys. This is definitely an issue, although it's fairly easy to fix manually.

Revision history for this message
Daniel Robitaille (robitaille) wrote :

fn-f1 (hibernate) now works, and the laptop hibernate properly after pressing it. This was tested with Dapper Flight 5.

The only function key left on this laptop that doesn't work is fn-f3 (battery).

Revision history for this message
Cristian Aravena Romero (caravena) wrote :

Many thanks for you bug.

Pliss read: https://wiki.ubuntu.com/LaptopTestingTeam/HotkeyResearch
--
Cristian Aravena

Revision history for this message
Travis Newman (tnewman) wrote :

Dell Latitude D410, Battery function key doesn't work here either.

Revision history for this message
Travis Newman (tnewman) wrote :

and I can't get either of the methods on the HotkeyResearch page to generate anything

Revision history for this message
Paul Sladen (sladen) wrote :

William Grant: you have a different laptop model, can you please file a separate bug (also again 'hotkey-setup'). Many Thanks,

Daniel: can you please drop to a console and a run:

  showkeycodes -u

Googling suggests you might be looking for e009 for Fn-F3 as a battery key.

Revision history for this message
Daniel Robitaille (robitaille) wrote :

I can't find the command "showkeycodes" on my laptop. But the output from "showkey" shows 0x6f when I press fn-f3.

Using xev, I get this when I press that function key:

KeyRelease event, serial 28, synthetic NO, window 0x2c00001,
    root 0x4c, subw 0x0, time 756789798, (163,-12), root:(168,37),
    state 0x0, keycode 207 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:

Revision history for this message
Paul Sladen (sladen) wrote :

Please can you run:

  showkey -u

from a console (Ctrl-Alt-F1).

Revision history for this message
Paul Sladen (sladen) wrote :

Daniel: Sorry I missed that:

Daniel and Williams, I've added the following to 'dell.hk':

# Dell Laptop Latitude 110l [Malone: #30457]
setkeycodes 6f $KEY_BATTERY # Battery

# Dell Inspiron 630m [LaptopTestingTeam/DellInspiron630m]
                                        # Fn+Esc Standby (ACPI)
#setkeycodes e00a $KEY_SUSPEND # Fn+F1 Hibernate (e00a)
#setkeycodes e008 $KEY_ # Fn+F2 Wireless (e008)
#setkeycodes e007 $KEY_BATTERY # Fn+F3 Battery (e007)
#setkeycodes e00b $KEY_VIDEOOUT # Fn+F8 CRT/LCD (e00b)
#setkeycodes e009 $KEY_EJECTCD # Fn+F10 EjectCD (e009)
setkeycodes e005 $KEY_BRIGHTNESSDOWN # Fn+Down Brightness Down (e005)
setkeycodes e006 $KEY_BRIGHTNESSUP # Fn+Up Brightness Up (e006)
setkeycodes e012 $KEY_MEDIA # MediaDirect Load Media Player (e012)

so as long as your manufactuer information match "Dell*" then this should work from the next 'hotkey-setup' upload.

Changed in hotkey-setup:
assignee: nobody → sladen
status: Unconfirmed → Fix Committed
Revision history for this message
Paul Sladen (sladen) wrote :

Daniel, your 0x6f battery keycode didn't make it to 'hotkey-setup' and needs further checking.

Changed in hotkey-setup:
status: Fix Committed → Needs Info
Revision history for this message
Daniel Robitaille (robitaille) wrote :

After installing the latest hotkey-setup tonight, and noticing that it still didn't work, I went into to the console mode, started "showkey -u" and now when I press fn-f3, I get:

0xe0 0x71

Tried multiple times, and these are the 2 codes I get everytime tonight. I don't know why I was getting 0x6f yesterday...

Revision history for this message
Paul Sladen (sladen) wrote :

Okay, since the Battery support isn't all in yet, lets test this by assigning it to something else:

  $ . /usr/share/hotkey-setup/key-constants
  $ sudo setkeycodes e071 $KEY_MUTE

and if you press Fn-F3 does it now toggle the MUTE status?

Revision history for this message
Paul Sladen (sladen) wrote :

Daniel: could you also paste the dmicode data as shown at the bottom of the following page?

  https://wiki.ubuntu.com/LaptopTestingTeam/HotkeyResearch

Revision history for this message
Daniel Robitaille (robitaille) wrote :

> $ . /usr/share/hotkey-setup/key-constants
> $ sudo setkeycodes e071 $KEY_MUTE
>
> and if you press Fn-F3 does it now toggle the
> MUTE status?

No it doesn't toggle the mute. (but fn-end toggle sthe mute properly)

As for the dmidecode data:
$ sudo dmidecode -s system-manufacturer
Dell Inc.
$ sudo dmidecode -s system-product-name
Latitude 110L
$ sudo dmidecode -s system-version
Not Specified

I went in the keyboard shortcut menu, and assigned fn-f3 to an action ("launch music player", and that worked and I was able to launch rhythmbox via that function key; the keyboard code the shortcut window gave me was 0xf1

Revision history for this message
Paul Sladen (sladen) wrote :

Was the '0xf1' from before, or after you'd attempted to remap the key. If you've tried testing something manually, you can clean up again by doing:

  sudo /etc/init.d/hotkey-setup restart

Okay, bad key to pick (MUTE=113 and +128 is 0xf1). Can you try:

  $ . /usr/share/hotkey-setup/key-constants
  $ sudo setkeycodes e071 $KEY_WWW

and see if that loads your web-browser when you press Fn-F3. Also, can you paste the output from the following command after trying that:

  $ sudo dumpkeycodes | grep -E '(e071|150)'

and also from having done a:

  $ sudo /etc/init.d/hotkey-setup restart

first.

Revision history for this message
Daniel Robitaille (robitaille) wrote :

If I do this:
$ sudo /etc/init.d/hotkey-setup restart
$ . /usr/share/hotkey-setup/key-constants
$ sudo setkeycodes e071 $KEY_WWW

then pressing fn-f3 doesn't start my web browser

$ sudo /etc/init.d/hotkey-setup restart
$ sudo dumpkeycodes | grep -E '(e071|150)'
e032 150
e071 0

Revision history for this message
Paul Sladen (sladen) wrote :

And what's the output from:

  $ sudo /etc/init.d/hotkey-setup restart
  $ . /usr/share/hotkey-setup/key-constants
  $ sudo setkeycodes e071 $KEY_WWW
  $ sudo dumpkeycodes | grep -E '(e071|150)'

(in the report above, "e071 0" means that it isn't matched to anything).

Revision history for this message
Daniel Robitaille (robitaille) wrote :

$ sudo /etc/init.d/hotkey-setup restart
$ /usr/share/hotkey-setup/key-constants
$ sudo setkeycodes e071 $KEY_WWW
$ sudo dumpkeycodes | grep -E '(e071|150)'
e032 150
e071 150

Revision history for this message
Paul Sladen (sladen) wrote :

Okay, now if you repeat that last little experiment and ensure that it shows:

  e071 150 (150 is the code for KEY_WWW)

and then press Fn-F3, this should now load a webbrowser; as should the command:

  sudo acpi_fakekey 150

Revision history for this message
Daniel Robitaille (robitaille) wrote :

The acpi_fakekey command loads firefox. fn-f3 doesn't do anything.

Revision history for this message
Paul Sladen (sladen) wrote :

Hi Daniel,

I'm puzzling over what to do about this key as the data seems to keep conflicting with itself. If it is e071 then reprogramming that key should work; but it seems that it isn't.

Dell seem to be fairly consistent with their Hotkey codes and have e007 as the code for KEY_BATTERY on their other laptops. Googling around I came across:

  http://clx.digi.com.br/wiki/bin/view/Personal/DellLatitude110L

which lists:

  # bateria
  $SETKEY e007 131

If you try reprogramming 'e007' to KEY_WWW (using the example a couple of comments back), can you get this key to perform other actions?

Revision history for this message
Daniel Robitaille (robitaille) wrote :

To summarize the story up to now:

*) If I press fn-f3 in the console "showkey -u" display:
   0xe0 0x71

*) Using xev, I get:

 KeyPress event, serial 29, synthetic NO, window 0x3000001,
    root 0x4c, subw 0x0, time 1329115244, (168,-11), root:(173,38),
    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 0x3000001,
    root 0x4c, subw 0x0, time 1329115244, (168,-11), root:(173,38),
    state 0x0, keycode 241 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:

*) In gnome-keybinding-properties, selecting an action using fn-f3 gives me the code: 0xf1

Using these gnome short cuts, I can assign fn-f3 to all the action available there (launch browser, calculator, media player, etc) and they work fine.

*) If I do this sequence of commands:
$ sudo /etc/init.d/hotkey-setup restart
$ . /usr/share/hotkey-setup/key-constants
$ sudo setkeycodes e071 $KEY_WWW
$ sudo dumpkeycodes | grep -E '(e071|150)'
e032 150
e071 150

Then pressing fn-f3 doesn't load the browser.

*) If I do
    sudo acpi_fakekey 150

this doesn't start the browser tonight (but it did in the past, as seen by one of my comment on March 26)

*) If I do:
$ sudo /etc/init.d/hotkey-setup restart
$ . /usr/share/hotkey-setup/key-constants
$ sudo setkeycodes e007 $KEY_WWW
$ sudo dumpkeycodes | grep -E '(e071|150|e007)'
e007 150
e032 150
e071 0

Then this doesn't start my browser when I press fn-f3

*) I also tried to associate e007 and e071 $KEY_CALC using setkeycodes without any success.

Revision history for this message
Paul Sladen (sladen) wrote :

Can you do:

  lshal -m

while pressing the buttons and paste the output please.

Revision history for this message
Daniel Robitaille (robitaille) wrote :

Well, that was interesting. It worked once. I pressed fn-f3, the battery status appeared, and the output of lshal -m was:

platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = battery

But then I cannot get it to work again after that. Looking at the comment of Bug 36576, I'm obviously running into that same kernel problem that Matthew Garrett is working on.

So I'll mark this one fixed, and subscribe to that bug report Aaron Whitehouse was going to file against the kernel.

Changed in hotkey-setup:
status: Needs Info → Fix Released
Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Just letting you know that the bug did get filed as Bug #44154 :).

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Re-opening this bug as it has stopped working in Intrepid Alpha 6. Please let me know if there is anything else that I can help with.
lshal -m
does not give anything

Changed in hotkey-setup:
status: Fix Released → New
Revision history for this message
wlx (wangliangxu) wrote :

I am using ubuntu intrepid with dell lattitude d410.
lshal -m does work here, but the fn/f3 and fn/f8 does not work.

Revision history for this message
Han Chung (han+c) wrote :

I am using Ubuntu 8.10 on a Dell XPS M1210, Fn hotkeys: Fn+F1 (Hibernate), Fn+F3 (Battery Status) and Fn+F5 (Scroll Lock) used to work on Ubuntu 8.04.1, now doesn't work on 8.10

Revision history for this message
Iuri Diniz (iuridiniz) wrote :

I think I found the problem, but I don't know where I can fix it.

Follow:

On my DELL latitude 110L, Fn+F3 (battery) doesn't work on 8.10, used to work on 8.04.

When a simulate the keycode 236, discovered by:
> grep BATTERY /usr/share/acpi-support/key-constants
< KEY_BATTERY=236
using:
> sudo acpi_fakekey 236
nothing happens too.

but if I go to a console (tty: ctrl+alt+f1) and issue the same command (or press fn+f3), when I go back to X, the battery report is showed.

Maybe X is blocking gnome-battery to catch the command?

xev reports keycode 244 when I press it:
------------------------------------------------
KeyPress event, serial 34, synthetic NO, window 0x1000001,
    root 0x7a, subw 0x1000002, time 21856063, (51,52), root:(891,636),
    state 0x0, keycode 244 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1000001,
    root 0x7a, subw 0x1000002, time 21856063, (51,52), root:(891,636),
    state 0x0, keycode 244 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
----------------------------------------

lshal -m shows nothing.

PS:

I was the author of http://clx.digi.com.br/wiki/bin/view/Personal/DellLatitude110L (now offline)

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in a 9.04 daily-live?

Changed in hotkey-setup:
status: New → Incomplete
Revision history for this message
Iuri Diniz (iuridiniz) wrote :

With the last updates of 8.10 everything seems to work as expected

Latitude 110L

Fn+ESC -> suspend to ram
Fn+F1 -> suspend to disk
Fn+F2 -> rfkill works but with no visual feedback on gnome
Fn+F3 ->Battery info
Fn+F8 -> CRT/LCD (not tested)
Fn+F10 -> Eject
Fn+Up Arrow -> Brightness up
Fn+Down Arrow -> Brightness down
Fn+Pg Up -> Volume Up
Fn+Pg Dn -> Volume Down
Fn+End -> Mute

So this bug is invalid now.

Daniel T Chen (crimsun)
Changed in hotkey-setup:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.