[regression] [hardy] sony eject button doesn't work anymore

Bug #187980 reported by unggnu
8
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
New
Medium
Unassigned

Bug Description

Binary package hint: linux-source-2.6.24

The eject button of my Sony Vaio TX2 works since Feisty but it doesn't work anymore in current Hardy. It has no effect.
Btw. the patch which makes the key work isn't integrated in vanilla kernel since it only worked in Ubuntu for me so far.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi unggnu,

Care to give a reference to the patch you mention? Thanks.

Changed in linux:
status: New → Incomplete
Revision history for this message
unggnu (unggnu) wrote :

Sorry, I don't know the patch exactly but I guess there is one since the eject button only works with Feisty and Gutsy and the Ubuntu Kernel since my own compiled 2.6.22-2.6.24 vanilla kernel doesn't support the eject function but all other sony-laptop features.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Per the kernel team's bug policy, can you please attach the following information. Please be sure to attach each file as a separate attachment.

* uname -a > uname-a.log
* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies . Thanks again.

Revision history for this message
unggnu (unggnu) wrote :
Revision history for this message
unggnu (unggnu) wrote :
Revision history for this message
unggnu (unggnu) wrote :
Revision history for this message
unggnu (unggnu) wrote :
Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
unggnu (unggnu) wrote :

the eject button acpi event under Hardy (doesn't work):
[Sat Feb 2 12:52:31 2008] received event "sony/hotkey SPIC 00000001 0000001b"
[Sat Feb 2 12:52:31 2008] notifying client 4983[0:0]
[Sat Feb 2 12:52:31 2008] notifying client 5253[108:116]
[Sat Feb 2 12:52:31 2008] executing action "/etc/acpi/ejectbtn.sh"
[Sat Feb 2 12:52:31 2008] BEGIN HANDLER MESSAGES
[Sat Feb 2 12:52:31 2008] END HANDLER MESSAGES
[Sat Feb 2 12:52:31 2008] action exited with status 0
[Sat Feb 2 12:52:31 2008] completed event "sony/hotkey SPIC 00000001 0000001b"

the eject button acpi event under Gutsy (does work):
[Sun Feb 10 12:02:16 2008] received event "sony/hotkey SPIC 00000001 0000001b"
[Sun Feb 10 12:02:16 2008] notifying client 5049[107:114]
[Sun Feb 10 12:02:16 2008] notifying client 5112[0:0]
[Sun Feb 10 12:02:16 2008] executing action "/etc/acpi/ejectbtn.sh"
[Sun Feb 10 12:02:16 2008] BEGIN HANDLER MESSAGES
[Sun Feb 10 12:02:16 2008] END HANDLER MESSAGES
[Sun Feb 10 12:02:16 2008] action exited with status 0
[Sun Feb 10 12:02:16 2008] completed event "sony/hotkey SPIC 00000001 0000001b"

Maybe it is just a device issue so the script isn't able to open it with Vanilla and Hardy kernel cd device path.

Revision history for this message
unggnu (unggnu) wrote :

I have forgot to mention that I see a gnome eject applet for some seconds if I press the button under Gutsy but not under Hardy.

Changed in linux:
status: Confirmed → Triaged
Changed in linux:
assignee: ubuntu-kernel-team → colin-king
status: Triaged → In Progress
Revision history for this message
Colin Ian King (colin-king) wrote :

Hi unggnu,

I just want to make sure that the acpi_fakekey is working on the correct device, can you send me the output of:

head -n 1 /sys/class/input/input*/name

and also the output from:

strace acpi_fakekey 161

Many thanks.

Revision history for this message
unggnu (unggnu) wrote :
Revision history for this message
unggnu (unggnu) wrote :

This command gives me an error output only.

Revision history for this message
Colin Ian King (colin-king) wrote :

Hi,

just to do a quick sanity check, can you eject using the command line "eject" command?

thanks

Revision history for this message
unggnu (unggnu) wrote :

Yes, it works fine and as I said before gnome doesn't show the eject applet after pressing the key.

Revision history for this message
Colin Ian King (colin-king) wrote :

Hi,

A couple of questions just to clarify some things for me:

>>sudo strace acpi_fakekey 161
> This command gives me an error output only.

1, What error output output are you referring to?
2, does "acpi_fakekey 161" do an eject?

Colin

Revision history for this message
unggnu (unggnu) wrote :

1. the strace command of comment https://bugs.launchpad.net/ubuntu/+source/linux/+bug/187980/comments/12 only outputs error ( 2> ) - every output should be in the attached file
2. No it doesn't eject.

Revision history for this message
Colin Ian King (colin-king) wrote :

It appears that difference between Feisty and Hardy is the appearance of the sony-laptop module in Hardy - this is overriding the sonypi module that handles the hotkeys. I suggest as an interim workaround to black list the sony-laptop module:

sudo vim /etc/modprobe.d/blacklist

and add the following line:

blacklist sony-laptop

reboot and let me know if this interim workaround helps.

I will investigate why the sony-laptop module isn't working correctly

Revision history for this message
Colin Ian King (colin-king) wrote :

...or if vim is not you favorite editor do:

sudo gedit /etc/modprobe.d/blacklist

Revision history for this message
Colin Ian King (colin-king) wrote :

Alternatively, if you do not want to blacklist the sony-laptop module then one may need to add the following lines to your /etc/X11/xorg.conf file to use the Sony Vaio hotkeys with the sony-laptop module:

Section "InputDevice"
        Identifier "Vaio keys"
        Driver "evdev"
        Option "Name" "Sony Vaio Keys"
        Option "XkbLayout" "jp"
        Option "XkbModel" "jp106"
EndSection

Section "ServerLayout"
        ...
        InputDevice "Vaio keys" "SendCoreEvents"
EndSection

c.f.: http://www.linux.it/~malattia/wiki/index.php/Sony-laptop

Revision history for this message
unggnu (unggnu) wrote :

Thanks for your help.

First work around doesn't work because the module is still loaded. I guess it is a initrd problem but it would break gnome brightness and other things so I guess it is no real option and if I remove sony-laptop it still doesn't work (removing of sonypi and adding it again doesn't help too). Afaik Gutsy has sony-laptop module too.

Second work around doesn't seem to have an effect.

Revision history for this message
Colin Ian King (colin-king) wrote :

Hi,

since I don't have Sony Vaio TX2 to hand, can you tell me which sequence of keys you are pressing to do the eject with? Hopefully I can examine the driver and also see how it matches with /usr/share/hal/fdi/information/10freedesktop/30-keymap-module-sony-laptop.fdi

Thanks.

Changed in linux:
status: In Progress → Incomplete
Revision history for this message
unggnu (unggnu) wrote :

I am not sure what you mean. I don't need an FN combination. There is an eject key beside the power button and the multimedia keys.

Revision history for this message
Colin Ian King (colin-king) wrote :

Hi,

Can you edit /etc/modprobe.d/options:

sudo gedit /etc/modprobe.d/options

and add:

options sony-laptop debug

and reboot. Then press the CD eject key and then send a copy of the dmesg log. This may give me more information to work on.

Thank you.

Revision history for this message
unggnu (unggnu) wrote :

I am sorry but I got the error "sony_laptop: `' invalid for parameter `debug'".
What might interesting is if the eject buttons of the other Sony laptops still work.

Revision history for this message
Colin Ian King (colin-king) wrote :

Apologies, my mistake, it should have been:

options sony-laptop debug=1

Revision history for this message
unggnu (unggnu) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :

Hi there,

I've looked at the key code sequence and it appears that the current sony-laptop driver in Hardy does not support it for your model type. What is more curious is that I cannot see how it worked for feisty or gutsy kernels in the sonypi.c driver. Since this is reported as a regression, if you have an older system still installed that works with the eject key, can you do the following on that working system:

sudo gedit /etc/modprobe.d/options

and add

options sonypi verbose=2

reboot and press the key several times and send the dmesg output.

This way I can see where the sonypi and the newer sony-laptop drivers differ in their handling of the eject key.

Thank you.

Revision history for this message
unggnu (unggnu) wrote :

Output from Gutsy Live CD with verbose=2. It is really interesting that eject even works with a LiveCD :).
Btw. you are right that sony-laptop was used the first time in Hardy.

eject key output:
[ 3316.064000] sonypi: event port1=0x32,port2=0x21
[ 3348.564000] sonypi: event port1=0x32,port2=0x21
[ 3469.364000] sonypi: event port1=0x32,port2=0x21

Revision history for this message
Colin Ian King (colin-king) wrote :

After looking at the debug sofar, my conclusion is that this is a problem not in the kernel driver sony-laptop, but at a higher level between acpi_fakekey and the desktop.

The facts are that Eject key events are being received by acpid:

1. We see the acpi log message:
 [Sat Feb 2 12:52:31 2008] received event "sony/hotkey SPIC 00000001 0000001b"

..which means that sony-laptop is managing to detect the key and push the correct keycode (SONYPI_EVENT_FNKEY_E (which is 0x1b)) via kernel routine acpi_bus_generate_proc_event().

2. and that acpi_fakekey is pushing out the eject cd code 161 to a higher level.

3. The legacy driver sonypi detects the same port values (0x32,0x21) which the sony-laptop module handles in the same manner, meaning there is not a regression between drivers sonypi and sony-laptop.

I get the bug to the appropriate team that can handle this bug at the appropriate level.

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

I never saw this kind of hardware either, but maybe you can compare the hal behaviour on a gutsy and hardy live CD? Please boot it, then do

  sudo killall hald
  sudo hald --verbose=yes --daemon=no 2>&1|tee /tmp/hal.log

then let the output settle. Press return a few times, so that you can visually separate the new output. Then press the eject key. Does this generate any new output?

Please press Control-C and attach /tmp/hal.log here (saying which is gutsy and which is hardy). Would be interesting to compare both, I think.

Revision history for this message
unggnu (unggnu) wrote :

Thanks for your replies.

I have used my current Hardy and Gutsy installation to generate the logs. I hope that they are fine too.

Revision history for this message
unggnu (unggnu) wrote :
Martin Pitt (pitti)
Changed in linux:
assignee: colin-king → nobody
status: Incomplete → New
Revision history for this message
Sergei Ianovich (ynvich-gmail) wrote :

This not a hal thing. The "problem" is in the kernel. I've posted a patch in the bug 217504, which is a duplicate of this one.

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

Other bug subscribers

Remote bug watches

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