toshiba_acpi: Unknown key 158

Bug #1416277 reported by Robert Ancell
36
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Medium
Joseph Salisbury

Bug Description

If I press the wireless key (see attached image) on my Toshiba P50W I get the following error in dmesg:

toshiba_acpi: Unknown key 158

I'd expect this key to toggle flight mode.
---
ApportVersion: 2.15.1-0ubuntu4
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: bob 2980 F.... pulseaudio
 /dev/snd/controlC1: bob 2980 F.... pulseaudio
CurrentDesktop: Unity
DistroRelease: Ubuntu 15.04
HibernationDevice: RESUME=UUID=5033984a-21af-482d-a1fd-c075e818cd12
InstallationDate: Installed on 2013-12-26 (400 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MachineType: TOSHIBA Satellite P50W-B
NonfreeKernelModules: wl
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.18.0-11-generic root=UUID=885f0f10-b818-4eb4-8ff4-d067e16bef2f ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.18.0-11.12-generic 3.18.3
RelatedPackageVersions:
 linux-restricted-modules-3.18.0-11-generic N/A
 linux-backports-modules-3.18.0-11-generic N/A
 linux-firmware 1.141
Tags: vivid
Uname: Linux 3.18.0-11-generic x86_64
UpgradeStatus: Upgraded to vivid on 2013-12-26 (400 days ago)
UserGroups: adm autopilot cdrom dip libvirtd lpadmin netdev plugdev sambashare sudo wireshark
_MarkForUpload: True
dmi.bios.date: 08/08/2014
dmi.bios.vendor: INSYDE Corp.
dmi.bios.version: 1.40
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: Type2 - Board Product Name1
dmi.board.vendor: Type2 - Board Vendor Name1
dmi.board.version: Type2 - Board Version
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: OEM Chassis ManuFacturer
dmi.chassis.version: OEM Chassis Version
dmi.modalias: dmi:bvnINSYDECorp.:bvr1.40:bd08/08/2014:svnTOSHIBA:pnSatelliteP50W-B:pvrPSVP2A-00F002:rvnType2-BoardVendorName1:rnType2-BoardProductName1:rvrType2-BoardVersion:cvnOEMChassisManuFacturer:ct10:cvrOEMChassisVersion:
dmi.product.name: Satellite P50W-B
dmi.product.version: PSVP2A-00F002
dmi.sys.vendor: TOSHIBA

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

There seems to be a patch for this already [1] - it might just need someone with commit privileges to push it.

[1] https://lkml.org/lkml/2014/1/14/142

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Looking at [1] it does seem to be upstream as commit fec278a1ddcb0607db3c5e47817c3017df71936d.

It would be nice to have this backported.

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/toshiba_acpi.c

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1416277

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Robert Ancell (robert-ancell) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected vivid
description: updated
Revision history for this message
Robert Ancell (robert-ancell) wrote : BootDmesg.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : CRDA.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : IwConfig.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : Lspci.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : Lsusb.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : ProcEnviron.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : ProcModules.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : PulseList.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : RfKill.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : UdevDb.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote : UdevLog.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote : WifiSyslog.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Also two keys on this laptop have incorrect behaviour - see bug 1416302.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.19 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Tested with kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid:

$ uname -r
3.19.0-031900rc6-generic

Pressing rfkill button has no effect and generates unknown key warning in dmesg.

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Commit fec278a has been in mainline as of v3.14-rc1. So the mainline kernel tested in #23 should have had this commit.

It was also added by your patch in bug 1416302, but in toshiba_acpi_alt_keymap[] instead of toshiba_acpi_keymap[], which is where fec278a put it.

Can you you test the wireless key when you test the kernels for bug 1416302? If it also fixes this bug, that patch should take care of both bugs.

tags: added: kernel-da-key
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Tested both kernels in bug 1416302 and the wireless key seems to be generating an appropriate event with these.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I double checked 3.19.0-031900rc6-generic and confirmed it doesn't generate the ACPI event and does generate the warning in dmesg. So not sure why that one is different to the kernel(s) in bug 1416302.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Just to confirm:

This test kernel fixed both bugs:
Vivid: http://kernel.ubuntu.com/~jsalisbury/lp1416302/vivid/

This test kernel only fixed bug1416302 and not bug 1416277:
mainline: http://kernel.ubuntu.com/~jsalisbury/lp1416302/mainline

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Both "Vivid" and "mainline" generated appropriate ACPI events for the wireless key. I think this is because:
- In "Vivid" we added a check for this hardware variant and use the alt keymap which I added the wireless key to
- In "mainline" we don't use the alt keymap but commit fec278a means the standard keymap handles the wireless key
- In [1] we don't get the ACPI event, which is strange because I'd expect the same behaviour as "mainline". Which suggests to me this kernel doesn't have change fec278a?

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The links I posted in comment #27 are the Vivid and Mainline trees that had the patch you created applied.

The Mainline kernel I posted, is the v3.19-rc6 kernel that already has commit fec278a, but also has your patch. This means the wireless key is defined in both the alt and standard keymaps. It also means it has the DMI_MATCH to use the alt map for the P50W model.

Like you say, it is strange that the vanilla mainline kernel does not generate the wireless event when it is defined in the standard keymap but not the alt keymap. I confirmed that the vanilla mainline kernel does have commit fec278a. It's been in mainline as of 3.14-rc1:

git describe --contains fec278a
v3.14-rc1~54^2~2

Revision history for this message
Enzo (zcappa) wrote :

I have a Toshiba Satellite L845, that suffers the same issue descrived here. I've tried with the kernels listed here and also the latest Mainline, none worked.
But I was able to solve it wit this patch:

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 76441dc..f3c488a 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -222,6 +222,12 @@ static const struct dmi_system_id toshiba_alt_keymap_dmi[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "Satellite M840"),
                },
        },
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite-L845"),
+ },
+ },
        {}
 };

The patch at #2 converts 158 to hex (0x9e) that's why it didn't work for me. Also, the alternative mapping already has the code 158 it at line 236:
{ KE_KEY, 0x158, { KEY_WLAN } },

So, only adding the DMI rule in order to use the alt mapping does the trick (no need for the patch at #2)

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I created a couple more test kernels, which include a patch for both the Toshiba P50W and L845 added to the alt keymap. I created a vivid test kernel with the patch applied, as well as a mainline kernel with the patch. They can be downloaded from:

vivid: http://kernel.ubuntu.com/~jsalisbury/lp1416277/vivid/
patched mainline: http://kernel.ubuntu.com/~jsalisbury/lp1416277/mainline/

Note for the vivid kernel, you will need to install both the linux-image and linux-image-extra .deb packages.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :
tags: added: patch
Revision history for this message
Enzo (zcappa) wrote :

I've tested the Vivid kernel and works fine in my Satellite L845. I'll try to test the Mainline later.

penalvch (penalvch)
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Running both 3.18.0-14.15~lp1416277v2 and 3.19.0-031900.201502192146 have working keys for me on the Satellite P50W-B

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Thanks for testing. I'll send this patch upstream and SRU to Ubuntu.

Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
status: Triaged → In Progress
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Robert, does this test kernel fix both this bug and bug 1416302 ?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

@Joseph. Yes; both kernels seem to generate appropriate events for the wireless, video mode and touchpad keys.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Thanks for the update, Robert. I broke the patch out into two separate patches, one for each Toshiba models. I'll send the patches upstream and cc them to stable. If upstream gives the thumbs up, I'll also SRU them to the Ubuntu kernels.

The two models being the P50-W for this bug. I created a separate bug for the L845 model, reported by @Enzo, which is bug 1428302

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I sent the patches upstream[0]. Upstream asked if we could test two new patches that will replace the need for DMI matching. I build a mainline test kernel with these two patches. It can be downloaded from:

http://kernel.ubuntu.com/~jsalisbury/lp1416277/

Robert and Enzo, can you test this kernel, so we can provide some feedback to upstream?

Thanks in advance!

[0] https://lkml.org/lkml/2015/3/4/1405

Revision history for this message
Enzo (zcappa) wrote :

Sorry, but unfortunately I don't have the laptop anymore...

Revision history for this message
Robert Ancell (robert-ancell) wrote :

$ uname -r
4.0.0-040000rc2-generic
$ acpi_listen
video/brightnessdown BRTDN 00000087 00000000
video/brightnessup BRTUP 00000086 00000000
video/switchmode VMOD 00000080 00000000 K
cd/prev CDPREV 00000080 00000000 K
cd/play CDPLAY 00000080 00000000 K
cd/next CDNEXT 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K
button/mute MUTE 00000080 00000000 K
button/mute MUTE 00000080 00000000 K
button/wlan WLAN 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K

i.e. all keys working. This patch looks a lot cleaner :)

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Great. Thanks for testing, Robert. I'll report the results back to upstream.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Upstream will have one addition revision of these patches before submitting to mainline and stable. I'll build a test kernel when it is available and post a link to it.

Thanks again for all the help!

Revision history for this message
German (namreg) wrote :

This bug affects me, I have a Toshiba Satellite L845D.

Revision history for this message
Enzo (zcappa) wrote :

German, please test the kernel provided in this bugs to see if they fix your problem. You can find them in the comment #39.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I noticed today that my touchpad toggle button is not working (in Artful). I'm not sure if I correctly tested it because it doesn't show in comment #41.

When I press the key I get:

$ sudo acpi_listen
 TOS1900:00 00000080 0000013f
 TOS1900:00 00000080 000001bf

Which suggests this model (Toshiba P50W) uses the 0x13f from toshiba_acpi_alt_keymap and not the 0x143 from toshiba_acpi_keymap.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Perhaps also worth mentioning that the zoom in / zoom out keys don't seem to generate a named event:

$ sudo acpi_listen
 TOS1900:00 00000080 000001ff
 TOS1900:00 00000080 00000102
 TOS1900:00 00000080 00000182
 TOS1900:00 00000080 00000103
 TOS1900:00 00000080 00000183
 TOS1900:00 00000080 00000100

(The 1ff and 100 events are the alt key)

These codes are in both the toshiba_acpi_keymap and toshiba_acpi_alt_keymap so I would expect this to work regardless.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I guess it's been a while since I last posted. Can those affected by this bug test the latest 4.13 kernel to see if the fix ever made it upstream? The kernel can be downloaded from:

 http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.1

Changed in linux (Ubuntu):
status: In Progress → Incomplete
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.