Fn+F4 video switch key not working on HP 6730b

Bug #508847 reported by Peter Clifton
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-settings-daemon (Ubuntu)

Bug Description

Binary package hint: udev

When pressing the video key combo on my laptop (Fn+F4), I just get a "p" in the terminal window

Running showkey from a console reveals that the laptop (whos BIOS writers are probably on crack), emits a 125, then a 25 keycode.

125 is the same as the windows (meta?) key, and 25 is the same as "p".

A cursory search for this key combination suggests that it is a windows shortcut for "Presentation mode".

Even stranger, Fn+F4 has worked fine in the past on this laptop - perhaps something about Lucid and the xorg-edgers video drivers is making the BIOS do different things.

Tags: lucid
Changed in udev (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

> emits a 125, then a 25 keycode

Eww, sounds like these guys wanted to be too clever and fake two keypresses where they should just send one scancode for "KEY_PRESENTATION.

Can you please run through zless /usr/share/doc/udev/README.keymap.txt.gz ? Perhaps we can work around this in the udev rules (I doubt it, though), but otherwise I guess a more appropriate "fix" would be to make evince/OO.o and friends understand Meta-P for activating presentation mode?

Changed in udev (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: Confirmed → Incomplete
Revision history for this message
Peter Clifton (pcjc2) wrote :

pcjc2@pcjc2lap:~$ /lib/udev/findkeyboards
AT keyboard: input/event4

sudo /lib/udev/keymap input/event4 > /tmp/orig-map.txt

Revision history for this message
Peter Clifton (pcjc2) wrote :

pcjc2@pcjc2lap:~$ /lib/udev/findkeyboards
AT keyboard: input/event4

sudo /lib/udev/keymap input/event4 > /tmp/orig-map.txt

Revision history for this message
Peter Clifton (pcjc2) wrote :

 sudo /lib/udev/keymap -i input/event4

FN+f4 (Video switch key)

scan code: 0xDB key code: leftmeta
scan code: 0x19 key code: p

The laptop actuallty _has_ a presentation button (softkey), that produces a single scancode:

scan code: 0x88 key code: presentation

HP appear to be on crack here. Perhaps if Canonical had some special relationship with HP, they might be able to request information from the BIOS writers as to what circumstances this keycode alternative to the ACPI video notification is triggered.

Revision history for this message
Peter Clifton (pcjc2) wrote :

cat /sys/class/dmi/id/sys_vendor
pcjc2@pcjc2lap:~$ cat /sys/class/dmi/id/product_name
HP Compaq 6730b (KU216ET#ABU)

Revision history for this message
Peter Clifton (pcjc2) wrote :

udevadm info --export-db > /tmp/udev-db.txt
?field.comment=udevadm info --export-db > /tmp/udev-db.txt

Revision history for this message
Peter Clifton (pcjc2) wrote :

Anyway.. as I noted above "Presentation mode" is not what Fn+F4 should do.. it is the video switch key which should trigger cycling between output modes (including external output of course). The laptop has a separate presentation mode button. Admittedlty, pressing it doesn't do anything - even in OO.o Impress, although your tests above seem to indicate it is emitting the right keyncode.

I believe Meta+P in Windows $shiney (not sure if it is 7 or Vista) will pop up a manager program to handle the video switch - and presumably HP wanted to get in on that user experience right from the Fn+F4 combo. I couldn't find anything in the DSDT which looked obvious, as I think the alternate keycode based method may be invoked through SMI code.

The bios stores the OSI value in an OpRegion presumably used by its SMI code, and also into one used by the Embedded Controller. This BIOS is being too damned clever by half!

I couldn't yet manage to nail down how to get the old behaviour back.. I've tried acpi_osi="Windows 2006" from the grub command line - but that didn't work properly. Grub (or something) stripped the quotes, and the kernel set _OSI(Windows) which won't match anything. I believe there have been documented cases of "video things" on some HP laptops behaving differently depending on how the Intel GFX OpRegion is initialised, and the code to do that has changed recently - to avoid some serious issues on another HP laptop. I guess it is (just) possible that could be a trigger. The only other thing I could think was Windows 7.

Peter Clifton (pcjc2)
Changed in udev (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Peter Clifton (pcjc2) wrote :

Finally figured what magic quoting to give grub.

acpi_osi='"!Windows 2009"'

restores the working behaviour of the Fn+F4 key combo.


This should be possible to patch around in the Kernel, adding the appropriate DMI information to drivers/acpi/blacklist.c

Something like

 .callback = dmi_disable_osi_win7,
 .ident = "HP 6730b",
 .matches = {
       DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
       DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6730b (KU216ET#ABU)"),

Might do the trick (I've not tested it since rebuilding the whole kernel is tedious!)

Perhaps a more generic match might be possible.

Other alternatives include investigating the DSDT to try and determine which magic location storing the OSI value in causes the firmware to break the FN+F4 combo, and write a driver to poke it back.

ACPI fails so damned badly because of the _OSI call, it should _never_ have been allowed in the first place. (Microsoft should release updates to fix their bugs!)

So, now I'm in the happy situation of having all the other Windows 7 specific API fixes being un-available on my machine because HP chose to break with the ACPI _standard_ with regards handling of the video hotkey. (Similarly to how they ignored it for the brightness keys).

VERY Unimpressed HP.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Peter, for your thorough investigations! You almost delivered a patch here, so I pass that to the kernel team for review. (Kernel team: of course feel free to ct-rev/unassign if that's too much fiddling).

affects: udev (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
status: Confirmed → Triaged
Revision history for this message
Peter Clifton (pcjc2) wrote :

I wasn't sure about the exact DMI info required to match - nor whether it is a good idea or not to Blacklist this laptop from declaring Win7 support. I can post DSDT pre/post Win7 support BIOS update if anyone is interested.

I could have knocked up a patch, but didn't want to unless I'd actually build tested the kernel it produced.

Andy Whitcroft (apw)
tags: added: lucid
Revision history for this message
Anders Dånmark (skaggapa) wrote :

I have this issue aswell. Perhaps more hp-laptops are affected?

Laptop: HP Probook 4310s

Lucid beta 2 (installed today)

I would like to try the fix but dont know how.

Should i add more info?

Revision history for this message
Chase Douglas (chasedouglas) wrote :

With Lucid, the kernel is now telling the BIOS that it supports win7 ACPI features. Part of the Win7 feature set is display configuration changing through win+p instead of the unique key code used by previous versions of windows. The real problem here is that gnome-settings-daemon, the process that listens for display configuration events, only listens for a single key code and not a chord like win+p, and it's not configurable through a gconf setting.

Quirking the kernel is an unsufficient fix because every new laptop would need a quirk. We also pulled the ACPI support from upstream, so we should follow their lead and not behave differently.

affects: linux (Ubuntu) → gnome-settings-daemon (Ubuntu)
Changed in gnome-settings-daemon (Ubuntu):
assignee: Canonical Kernel Team (canonical-kernel-team) → nobody
Revision history for this message
anny (annymai) wrote :

If you hit the letter key on the keyboard, but the system show number, that 's because fn key locked, try the solutions bellow to unlock function key. Solutions: Hit FN, F12 and Number Lock key at the same time. Hold down Fn key and tap F11.
Visit https://www.hptechsupportnumbers.com/hp-customer-service/ for more query, hp support team help you out from any type of problem.

Revision history for this message
oliver (oliverroy) wrote :

The excellent Apple id customer services at affordable charges with privacy kept confidentially and secured manage Apple id. for more visit: http://www.applesupport247.com/apple-id-support/

Revision history for this message
rain (msith) wrote :

Simply restarting your router or modem may help to fix this problem. ... There might be a problem with your router configuration - this can also cause this "DNS server is not responding" error. https://intrepidsoftware.com/guide-to-solve-dns-server-not-responding-error/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers