Fn keys on VAIO don't produce keystrokes nor ACPI events

Bug #251665 reported by Alwin Garside
44
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Invalid
Undecided
Unassigned
hotkey-setup (Ubuntu)
Invalid
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I have a Sony VAIO VGN-NR230AE. It's a Brazilian VAIO model, not sure whether it's available in America but in Brazil it's very popular. Right from the start after installing Ubuntu 8.04 I noticed that only the volume up, volume down, mute, Pause, Break and Scroll Lock Fn-keys work. None of the others (Brightness Up, Brightness Down, switch video output, zoom, sleep, S1 and AV Mode) does anything.

After going through https://wiki.ubuntu.com/LaptopTestingTeam/HotkeyResearch I discovered that my Fn keys aren't producing any ACPI events or magic numbers, using any of the methods described there.

acpi event are discovered for vgn-nr230e, but a few other models don't.
MODELS CONCERNED : VGN-BZ12XN ; CR-220E

Alwin Garside (yogarine)
description: updated
Revision history for this message
Alwin Garside (yogarine) wrote :
Revision history for this message
Alwin Garside (yogarine) wrote :

setting package to acpi-support to increase chance of someone noticing this bug, sorry if it's the wrong package.

Revision history for this message
rekado (rekado) wrote :

I've got the same problem on the chinese notebook Haier A61, running Ubuntu 8.04.

The brightness-up-key (Fn+F7) does not produce an event - none of the methods described in https://wiki.ubuntu.com/LaptopTestingTeam/HotkeyResearch work. However, the brightness-down-key (Fn+F8) produces an event and causes the OSD to appear. The brightness level doesn't change, though.
All other Fn-Keys work (sleep, switch to ext.display, volume up/down).

When switching to an external display and switching back to the internal LCD, the brightness OSD indicates full brightness again. The brightness doesn't change. When the backlight should dim according to power management settings, the screen actually just fades to black but stays lit.

The actual brightness of the display is pretty bright.
I've noticed that the output of cat /proc/acpi/video/VGA/LCD/brightness just yields "<not supported>".

I think I've had no problems in earlier versions of ubuntu.

Revision history for this message
Robert McMeekin (rrm3) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it, because your description didn't include enough information.

Please include the information requested at https://wiki.ubuntu.com/DebuggingACPI as separate attachments.

Changed in acpi-support:
status: New → Incomplete
Revision history for this message
Alwin Garside (yogarine) wrote :
Revision history for this message
Alwin Garside (yogarine) wrote :
Revision history for this message
Alwin Garside (yogarine) wrote :
Revision history for this message
Alwin Garside (yogarine) wrote :
Revision history for this message
Alwin Garside (yogarine) wrote :

There you go. :-)
Just let me know if there's anything else you need.

Alwin Garside (yogarine)
Changed in acpi-support:
status: Incomplete → Confirmed
Alwin Garside (yogarine)
description: updated
Revision history for this message
Olivier Cortès (olive) wrote :

Hi,

Here on a Vaio BZ11XN and latest Intrepid, Fn-? works out-of-the-box for sound, Page-Up/Down, Home/End, but not backlight and LCD/external-CRT switch. Debugging with https://wiki.ubuntu.com/LaptopTestingTeam/HotkeyResearch I found NO acpi event, nor std keycodes…

Attaching all relevant info now…

Revision history for this message
Olivier Cortès (olive) wrote :
Revision history for this message
Olivier Cortès (olive) wrote :
Revision history for this message
Olivier Cortès (olive) wrote :
Revision history for this message
Alwin Garside (yogarine) wrote :

I installed Intrepid Beta and the Fn-keys now produce keystrokes. The keys still do nothing however. I will attach a list of the keystrokes and their respective buttons.

Revision history for this message
Alwin Garside (yogarine) wrote :

Working in Intrepid beta

Changed in acpi-support:
status: Confirmed → Fix Released
Revision history for this message
Olivier Cortès (olive) wrote :

Hey, don't close this bug. It still doesn't work on my BZ11XN model. I'm on up-to-date Intrepid. Is there any chance I missed something during upgrades that I could have got with just installing the beta-CD ?

Revision history for this message
Alwin Garside (yogarine) wrote :

Olivier, try this command from your gnome/kde terminal:
xrandr --output LVDS --set BACKLIGHT_CONTROL native

And after that see if your brightness keys now work. If they do, that you're probably now dealing with bug #176888.

Revision history for this message
Olivier Cortès (olive) wrote :

Yes, I'm aware about #176888, but it's not the same.
after having run the xrandr thing (i've got it in my gnome session startup…), my Fn Keys do nothing for LCD (no keycode, no keystroke, no acpi event).

But the sound Fn Keys work.

Revision history for this message
Alwin Garside (yogarine) wrote :

Fair enough, changing this back to confirmed.

Changed in acpi-support:
status: Fix Released → Confirmed
Alwin Garside (yogarine)
Changed in linux:
status: New → Confirmed
Revision history for this message
yleetiny (yleetiny) wrote :

The FN-keys for sony vaios are not linked to acpi, but linked to the module sony-laptop. As its developper wrote on his wiki, the Fn-keys are now mapped through HAL (Hardware Abstraction Layer). So it is normal that there is no acpi event at all. Concerning the brigthness support see bug 277589, there is a solution there, for those who can use smartdimmer.

Revision history for this message
yleetiny (yleetiny) wrote :

Sorry I said a small mistake in my previous post : if the sony-laptop module work correctly and your HAL is well configured , you should be able to see acpi events, since HAL will add the neccessary FN-keys to your keyboard.

Revision history for this message
Shawe Ewahs (shawe-ewahs) wrote :

Please try this:
https://bugs.launchpad.net/ubuntu/+source/hotkey-setup/+bug/95444/comments/115

It correct the brightness problem only, but is better than nothing.

If keys don't work, try reading my comments from https://bugs.launchpad.net/ubuntu/+source/hotkey-setup/+bug/95444/comments/106 I explain how to add your model. Only need a reboot, and it must work.

Revision history for this message
Eric Donkersloot (ericd) wrote :

Fn F5 + Fn F6 do not work on this laptop running Intrepid, nor setting the brightness manually or with the gnome brightness applet:

ericd@vaiopro:~/Desktop$ uname -a
Linux vaiopro 2.6.27-7-generic #1 SMP Tue Nov 4 19:33:20 UTC 2008 i686 GNU/Linux

ericd@vaiopro:~/Desktop$ grep . -r /var/lib/acpi-support/*-*
/var/lib/acpi-support/bios-version:R0290Q1
/var/lib/acpi-support/system-manufacturer:Sony Corporation
/var/lib/acpi-support/system-product-name:VGN-BZ12XN
/var/lib/acpi-support/system-version:C102QZ98

Revision history for this message
Eric Donkersloot (ericd) wrote :

If I run the following commands in a terminal, I'm able to dim the brightness using the xbacklight command:

xrandr --output LVDS --set BACKLIGHT_CONTROL native
sudo /etc/init.d/acpid restart

Revision history for this message
Eric Donkersloot (ericd) wrote :
Revision history for this message
Eric Donkersloot (ericd) wrote :
Revision history for this message
Eric Donkersloot (ericd) wrote :
Revision history for this message
Eric Donkersloot (ericd) wrote :
Revision history for this message
yleetiny (yleetiny) wrote :

the use of fn-keys on vaio models depends on the module "sony-laptop" previously named "sonypi".
so first, verify that the module is correctly loaded.
"lsmod | grep -i sony"
then, the link beetween the fn-keys module and traditionnal keycodes are made through HAL (Hardware Abstraction Layer ). If something goes wrong there, xev and the traditionnal programs for keybiddings debug won't work.
I think your bug lies there.

Revision history for this message
ced (ubuntu-grumly) wrote :

I have same problem :
running xev shows no output for fn-f5, fn-f6, and fn-f7 (but fn-f2/3/4 for sound are working)

Revision history for this message
Eric Donkersloot (ericd) wrote :

The sony-laptop kernel module is correctly loaded on startup; I have disabled the sonypi module (in /etc/init.d/hotkey-setup) since it is deprecated and no longer loads correctly.

Revision history for this message
bh1nd3r (preet-bhinder) wrote :

Can confirm this bug on a sony CR-220E Does not produce any events in ACPI or any keystroke event either. I am running an uptodate version of Intrepid. The sony-laptop module is loaded correctly and detects my laptop

[69392.691861] sony-laptop: Sony Notebook Control Driver v0.6.
[69392.766708] sony-laptop: detected Sony Vaio C Series

Any workaround?

Revision history for this message
yleetiny (yleetiny) wrote :

Could you please, attach the result of lshal?
I'm going to verify what goes wrong...

For others helpfull informations are available at :
http://people.freedesktop.org/~hughsient/quirk/quirk-keymap-modules.html

Eventually if somebody can try the latest sony-laptop module.

PS : I can confirm that the module sonypi is no longer necessary for my vaio-model VGN-C2ZB

yleetiny (yleetiny)
description: updated
Revision history for this message
ced (ubuntu-grumly) wrote :

Here is my lshal for sony VGN-Z21WN

Revision history for this message
Eric Donkersloot (ericd) wrote :

lshal output for Sony Vaio VGN-BZ12XN

Revision history for this message
bh1nd3r (preet-bhinder) wrote : Re: [Bug 251665] Re: Fn keys on VAIO don't produce keystrokes nor ACPI events

lshal output for Sony Vaio CR-220E

Eric Donkersloot wrote:
> lshal output for Sony Vaio VGN-BZ12XN
>
> ** Attachment added: "lshal_vgn-BZ12XN.txt"
> http://launchpadlibrarian.net/20072712/lshal_vgn-BZ12XN.txt
>
>

Revision history for this message
yleetiny (yleetiny) wrote :

I will make my comments on each models :
*** VGN-BZ12XN ***
1- you have 2 backlights interfaces : one from sony-laptop, the other from acpi, you may have backlight control for it through acpi, or an applet.

2- you have the "sony-laptop" module, correctly associated in hal : "sony vaio jogdial" & "sony vaio keys".
So, that means either "hal" informations to associate FN-keys are wrong, or sony-laptop module does not support your model.
Your keymaps are (extract from your file) :
 input.keymap.data = {'0x06:mute', '0x07:volumedown', '0x08:volumeup', '0x09:brightnessdown', '0x0a:brightnessup', '0x0b:switchvideomode', '0x0e:zoom', '0x10:suspend'} (string list)

Please, verify that the informations are correct, with this link :
http://people.freedesktop.org/~hughsient/quirk/quirk-keymap-modules-data.html#sony

*** VGN-Z21WN_B ***
1- You have a Geforce "GeForce 9300M GS", so you won't have backlight control on it (the backlight control on geforce 8 is still experimental)

2- same second point as "VGN-BZ12XN"

*** CR-220E ***
1- you have 3 backlight interfaces : 1 sony, 2 throught acpi
2- same second point as "VGN-BZ12XN"

Unfortunately, if nothing is wrong with the 2nd point, that probably means that new vaios FN keys are different from the existings ones, in that case, I don't have the necessary knowledge to deal with it, you should contact Mattia Dongili, writter of the sony-laptop module. Here is his wiki link : http://www.linux.it/~malattia/wiki/index.php/Sony-laptop

Revision history for this message
bh1nd3r (preet-bhinder) wrote :

Thanks.. Nothing seems to be wrong with the second point so it seems
that sony-laptop does not support my model. It is weird that it would
say sony c series detected on startup though... I shall contact the
writer of the module directly..

p.s. would you mind changing the name of my laptop model to 'VGN-CR220E'
because that is the full model.. thanks

yleetiny wrote:
> I will make my comments on each models :
> *** VGN-BZ12XN ***
> 1- you have 2 backlights interfaces : one from sony-laptop, the other from acpi, you may have backlight control for it through acpi, or an applet.
>
> 2- you have the "sony-laptop" module, correctly associated in hal : "sony vaio jogdial" & "sony vaio keys".
> So, that means either "hal" informations to associate FN-keys are wrong, or sony-laptop module does not support your model.
> Your keymaps are (extract from your file) :
> input.keymap.data = {'0x06:mute', '0x07:volumedown', '0x08:volumeup', '0x09:brightnessdown', '0x0a:brightnessup', '0x0b:switchvideomode', '0x0e:zoom', '0x10:suspend'} (string list)
>
> Please, verify that the informations are correct, with this link :
> http://people.freedesktop.org/~hughsient/quirk/quirk-keymap-modules-data.html#sony
>
> *** VGN-Z21WN_B ***
> 1- You have a Geforce "GeForce 9300M GS", so you won't have backlight control on it (the backlight control on geforce 8 is still experimental)
>
> 2- same second point as "VGN-BZ12XN"
>
> *** CR-220E ***
> 1- you have 3 backlight interfaces : 1 sony, 2 throught acpi
> 2- same second point as "VGN-BZ12XN"
>
> Unfortunately, if nothing is wrong with the 2nd point, that probably
> means that new vaios FN keys are different from the existings ones, in
> that case, I don't have the necessary knowledge to deal with it, you
> should contact Mattia Dongili, writter of the sony-laptop module. Here
> is his wiki link : http://www.linux.it/~malattia/wiki/index.php/Sony-
> laptop
>
>

Revision history for this message
ws (wstrepp) wrote :

Hi,

i have a Sony Vaio VGN-SR19XN, running Debian Lenny, and
had problems very similar to the problems of some of the posters above:
some function keys are working, such as Vol. up/down (Fn-F3/F4) or Mute (Fn-F2),
but some others dont work: Brightness up/down (Fn-F5/F6) or Hibernate (Fn-F12).
I examined all i could, using xev, starting acpid with "-l -d", listening to /dev/input/eventxy,
and so on, but did not find any sign of life of those keys.
Just before giving up, i found the following list in sony-laptop.c:

>/* SNC-only model map */
>static const struct dmi_system_id sony_nc_ids[]

Since in my DSDT there shows up only the SNC-device (SNY5001), and not this
SPIC-device (SNY6001), i added the following entry (without really knowing what im doing):
> {
> .ident = "Sony Vaio SR Series",
> .callback = sony_nc_C_enable,
> .driver_data = sony_C_events,
> .matches = {
> DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
> DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR"),
> },
> },

compiled the module, and now the keys work fine :-)
So this might be the solution for some others here having the same problems.

Revision history for this message
Almer S. Tigelaar (almer) wrote :

I (independently) came up with the same solution as 'ws' above and can confirm that this works on for the VAIO SR39VN/S as well. All the FN-keys now generate events and the brightness and suspend-to-disk keys are 'bound' to their respective actions by default. I have sent the change as a patch to the sony-laptop maintainer. So, this will for the SR model.

The keys should also work by default on the following models: FE, FZ, C, N

If you own a DIFFERENT model (this bug was created for the BZ and CR models) you can try the same approach as described by 'ws'. But note that doing as such is not for the faint of heart. It involves downloading a kernel, adjusting source code, recompiling and testing your keys. Anyway, if you are able to successfully make the keys work for your model with this approach than please inform the sony-laptop maintainer (Mattia Dongili).

More information here:
http://www.linux.it/~malattia/wiki/index.php/Sony_Vaio_Control_device_drivers

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Alwin,

For each of the keys that don't work, please do the following:

1) Run "sudo acpi_listen" and press the key. Please paste any output you see for each key.
2) Switch to a console (CTRL+ALT+F1) and run "sudo showkey -k" and press the key. Please paste any output you see for each key.
3) From the same console, please run "sudo showkey -s" and press the key. Please paste any output you see for each key.

Thanks

Changed in linux:
status: Confirmed → Incomplete
Changed in acpi-support:
status: Confirmed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

There is a kernel driver for synthesizing the hardware-specific hotkeys, so this is not an ACPI issue. Marking invalid for acpi-support.

Changed in acpi-support:
status: Incomplete → Invalid
Revision history for this message
Almer S. Tigelaar (almer) wrote :

Chris: the acpi_listen might work for testing if a key responds at all (or is triggered by ACPI calls), but only passes through codes that the sony-laptop driver actually generates. Therefore you might not see anything at all.

Others:
1) If you do not see any any output from 'acpi_listen' and you are having one of the newer Sony laptop models (e.g. bought within the last nine months or so): the sony-laptop driver is going to be adjusted for this (so: wait a short while).
2) If you do see 'acpi_listen' output, you should also see somekind of output of 'showkey'
3) It might be that even though you see 'showkey' output your keys will not produce output in X environment (e.g. with xev or somesuch). That is a kernel -> X mapping issue. You can help here by adding entries to hal-quirks for your specific laptop model I believe.

Update: a fix for this for at least the SR series will be incorporated into the kernel (in a short while). A more permanent fix (so that we will not need to test and adjust code for each new Sony laptop model) is being considered.

Revision history for this message
Almer S. Tigelaar (almer) wrote :

Update:
Kernel 2.6.30 and up (yet to be released) will contain auto-detection enhancements to the sony-laptop driver.
This will it autodetect and enable (at least) FN-keys on all the newer sony laptops (the set of special 'mode' keys present on the Sony VAIO SR will also work). This fixes (for all models for now) at least the kernel side of this issue.

With respect to the original bug report, this autodetection will (consistently) produce kernel level events for at least:
Brightness Up, Brightness Down, switch video output, zoom, sleep, S1
(I am not sure about 'AV Mode')

These are also in 'hal quirks' for sony laptop as far as I can see, so these keys should definitely have effect in userspace / on the desktop.

Maybe these enhancements (as soon as they land in 2.6.30, i suspect 2.6.30-rc2) can be backported (at some point) into 2.6.28 for the next Ubuntu release (or as an update shortly after that release), but that's up to the Ubuntu kernel team.

Steve Langasek (vorlon)
Changed in hotkey-setup (Ubuntu):
status: New → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

This won't be included in the "next" Ubuntu release, which is due out in less than two weeks; only critical bugs are candidates for fixing between now and the 9.04 release, and the barrier for kernel changes is higher than for others.

For karmic (Ubuntu 9.10), there should be no need to backport as I expect we'll be using 2.6.30 or later for that release.

Keng-Yu Lin (lexical)
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
bh1nd3r (preet-bhinder) wrote : Re: [Bug 251665] Re: Fn keys on VAIO don't produce keystrokes nor ACPI events

I can confirm that the function keys on my laptop (Sony Vaio CR220E)
are working with the latest alpha of Karmic Koala. The brightness and
the volume keys all work perfectly. I think we can safely close this
bug now.

On Fri, Sep 11, 2009 at 12:55 AM, Keng-Yü Lin <email address hidden> wrote:
> ** Changed in: linux (Ubuntu)
>       Status: Incomplete => Fix Released
>
> --
> Fn keys on VAIO don't produce keystrokes nor ACPI events
> https://bugs.launchpad.net/bugs/251665
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Angel David (tnt-hot)
Changed in linux (Ubuntu):
status: Fix Released → Confirmed
Steve Langasek (vorlon)
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Carlos Eduardo (carlospauluk) wrote :

It's not working for me. I have a Sony VAIO VGN-FW460J, with Ubuntu 10.10, Kernel 2.6.35-22-generic.

Is there a solution??

Revision history for this message
Almer S. Tigelaar (almer) wrote :

Carlos: My suggestion would be to create a new bug for your specific case.

This bug will regress occasionally if new (generations) of Sony laptop models come to market and Sony changes the internal event mappings. I am not sure if the VGN-FW460J is a new model or that things can be solved for this model by just adjusting several user level files. Perhaps someone (with the same model) can comment on this. If it appear to be a driver-level issue contact the current maintainer of the sony-laptop kernel driver and he will help you further.

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.