[SOLVED] Dell E6500 fn+f8 switch video mode does not work (keycodes scancodes keymaps) - "winkey + p"

=JeffH Jeff.Hodges at KingsMountain.com
Tue Oct 25 17:57:16 UTC 2011


[ I posed my query (attached below, and unanswered here) additionally to xorg 
and got some help, and resolved my problem. Cross-posting followup here for 
completeness and info-sharing ]
--

Subject: Re: fn+f8 switch video mode does not work (keycodes scancodes keymaps)
From: =JeffH <Jeff.Hodges at KingsMountain.com>
Date: Tue, 18 Oct 2011 10:07:01 -0700
To: Dimitar Toshev <mo6eeeb at gmail.com>,
	Alan Coopersmith <alan.coopersmith at oracle.com>
Cc: xorg at freedesktop.org

thanks for your help folks, this was the info I'd been looking for. I guess my
various searches had just been lame.

Dimitar helpfully noted..
  >
  > I meant that when you press fn+f8, the hardware actually generates
  > winkey+p. Try running xev and press fn+f8. Here's a bug report
  > indicating that this is indeed the case
  >
  > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/539477


Alan also helpfully noted..
  >
  > It doesn't matter what keys you press, but what keycodes the BIOS reports,
  > and whether the BIOS follows Microsoft's suggestion to lie to the OS to
  > make Windows 7 work better and other OS'es work worse:
  >
  > 	http://mjg59.livejournal.com/121851.html


Well, blow me down. Ok then...

So I applied this fix in /etc/default/grub:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=\\\"!Windows 2009\\\""

..from..

    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/539477/comments/47

and ran "sudo update-grub", and apparently it's all fixed (for now).


I'm curious though -- why can't this be solved by remapping keycodes, or down
lower in the X stack ?

Apparently the gnome folk have resorted to putting a fix into
gnome-settings-daemon, which has the downside of breaking various users'
keymappings for various applications. (the gnome-settings-daemon fix doesn't
work for me since I'm on (k)ubuntu 10.04 LTS which they're apparently declining
to backport this fix to :(

Plus presumably KDE has had to do their own fix, and other desktop regimes may
also need to (or already have)...

Anybody have pointers to the presumably existing KDE bug for this problem?

thanks,

=JeffH

=============
Subject: Dell E6500 fn+f8 switch video mode does not work (keycodes scancodes
	keymaps)
From: =JeffH <Jeff.Hodges at KingsMountain.com>
Date: Sun, 21 Aug 2011 15:25:20 -0700
To: ubuntu-users at lists.ubuntu.com

Hi,

I have a Dell E6500 (with nvidia Quadro NVS 160M GPU) with (k)ubuntu 10.04
installed (and up-to-date), and upon which I've installed the proprietary
nvidia driver (which seems to work fine (and sleep works)).

Out-of-the-box most everything seems to work (sound & sound buttons,
dim/brighten display, sleep button (fn+f1)), however, the display video switch
fn+f8 does not work.

I've groveled through the ubuntu forums and web at large and see that other
people have noted this but don't (yet) see a documented fix.

fwiw, I also have a Dell D820 upon which I've run (k)ubuntu since ubuntu 6.10,
and it's fn+f8 sleep button has always worked, and upon which I also am running
ubuntu 10.04.


So, I've done some poking about on both the D820 and the E6500 trying to figure
out what is going on and what changed between the two systems that might be
causing this.

AFAICT, at least part of the issue is that they keyboard scan codes emitted by
the E6500 keyboard are different (for at least some of the keys, fn+f8 in
particular) than they are on the D820. It appears that the ACPI sleep
initiation is not properly mapped to the  scancodes emitted by the E6500 keyboard.

For example, if a command shell is the active task (i.e. the insertion point is
sitting at a command prompt), and one presses fn+f8, a character "p" is placed
at the command prompt, as if one had typed "p".

Using acpi_listen to investigate...

  > sudo acpi_listen -c 1
p
^C

The above command should have exited on it's own after receiving an acpi event
for fn+f8, but instead just a letter "p" was echoed and then I cntl-C'd out of
it. For comparison, if I use acpi_listen again and press fn+upArrow (LCD
brighten)...

  > sudo acpi_listen -c 1
video LCD 00000086 00000000
  >

..the event is received, displayed, and acpi_listen properly exits.

So it seems the that an ACPI event isn't even being generated for fn+f8 on the
E6500. Further poking about shows that the /lib/udev/keymaps/dell file is the
same on both the D820 and the E6500 (should it be? (I'm doubting it)), and also
that some of the various outputs of "dumpkeys" are the same on both systems.

However, using "showkey" on both systems gives markedly different results,
which are shown below.

Does anyone know what might be going on and what I can do to get fn+f8 to
properly switch video display on the E6500 ?

thanks,

=JeffH
------


On the D820:
------------

  > sudo showkey -s         # I pressed and released fn-f8 once
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0xe0 0x56 0xe0 0xd6 0xe0 0x56 0xe0 0xd6
0xe0 0x56 0xe0 0xd6

  > sudo showkey           # pressed and released fn-f8 once, after releasing
enter key
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode  28 release    # Enter key release
keycode 227 press      # pressed fn and nothing showed up here
                         #  until I also pressed fn8
keycode 227 release    # while fn was still pressed,
                         # quickly released and got all three "press-release"
keycode 227 press      # pairs listed here
keycode 227 release
keycode 227 press
keycode 227 release




On the E6500:
-------------

  > sudo showkey -s         # I pressed and released fn-f8 once
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0x9c
p0xe0 0x5b 0x19 0x99      # Note the "p" char
0xe0 0xdb


  > sudo showkey
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode  28 release  # Enter key release (?)   scancode 0x9c ?
pkeycode 125 press   # fn ?  scancodes 0xe0 0x5b ?
keycode  25 press    # f8 ?  scancode 0x19 ?
keycode  25 release  # f8 ?  scancode 0x99 ?
keycode 125 release  # fn release ?  scancodes 0xe0 0xdb ?


---
end










More information about the ubuntu-users mailing list