Bug 114941 - toshiba_acpi regression: wlan-enabling hardware button no longer working
Summary: toshiba_acpi regression: wlan-enabling hardware button no longer working
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: drivers_platform@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-19 15:19 UTC by Tomas Mecir
Modified: 2016-11-05 17:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.5.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Ouput of dmidecode and acpidump. (373.78 KB, text/plain)
2016-03-19 15:19 UTC, Tomas Mecir
Details

Description Tomas Mecir 2016-03-19 15:19:38 UTC
Created attachment 209861 [details]
Ouput of dmidecode and acpidump.

Greetings!

With the updates to toshiba_acpi in kernels 4.4.0 and 4.5.0, the hardware button that enables/disables the wifi card on my Toshiba Satellite P750 is no longer working. The card itself is seen, but cannot be enabled (my laptop has a hardware key for this). 'xev' and 'acpi_listen' do not register any activity when pressing the hardware wifi-enabling key.

With kernels 4.3.0 and older, I was able to enable/disable the card correctly.

Hopefully there is something in the info that would allow you to pinpoint the problem, because I don't have the first idea how I would start debugging something like this.

Some relevant outputs:

Linux thomas.localdomain 4.5.0-1-default #1 SMP PREEMPT Wed Mar 16 17:30:21 UTC 2016 (b2c9ae5) x86_64 x86_64 x86_64 GNU/Linux

rfkill list
0: Toshiba Bluetooth: Bluetooth
        Soft blocked: no
        Hard blocked: yes
1: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
3: phy1: Wireless LAN
        Soft blocked: no
        Hard blocked: yes

iwconfig 
enp2s0    no wireless extensions.

lo        no wireless extensions.

wlp3s0    IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=off   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

lspci -d 168c:002b -v
03:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
        Subsystem: Askey Computer Corp. Device 7173
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7a00000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-15-17-ff-ff-24-14-12
        Capabilities: [170] Power Budgeting <?>
        Kernel driver in use: ath9k
        Kernel modules: ath9k
Comment 1 Tomas Mecir 2016-03-21 12:09:15 UTC
Oh, forgot to add. When I press the wifi-enabling key, I get this in dmesg:

[ 7080.534460] atkbd serio0: Unknown key pressed (translated set 2, code 0xc2 on isa0060/serio0).
[ 7080.534472] atkbd serio0: Use 'setkeycodes e042 <keycode>' to make it known.
[ 7080.554631] atkbd serio0: Unknown key released (translated set 2, code 0xc2 on isa0060/serio0).
[ 7080.554640] atkbd serio0: Use 'setkeycodes e042 <keycode>' to make it known.
Comment 2 Tomas Mecir 2016-03-27 15:18:23 UTC
Was doing some bisecting, seems this problem was introduced by 52cbae0127ade4120f51a6c5b46f28534723b9bf

Once I load an older version of the module, the wifi key starts working, and it continues working even after I unload the module. This indicates that this laptop has hardware/BIOS support for the wifi enabling, and the software override messes it up.

The latest patch seems to work as well, the wifi key works correctly when the module is loaded with disable_hotkeys=1. However, the other hotkeys (screen brightness etc) then do not work either.
Comment 3 Azael Avalos 2016-04-04 03:50:18 UTC
Hi there,

Sorry for the late reply, I was on vacations :-)

(In reply to Tomas Mecir from comment #2)
> Was doing some bisecting, seems this problem was introduced by
> 52cbae0127ade4120f51a6c5b46f28534723b9bf

You're right, the "hotkey" enabling value was changed on that commit to allow the driver to receive extra system messages, but it also tells the BIOS/EC that the driver is going to take care of the "hardware" buttons present on the laptop, which we are not doing...

> 
> Once I load an older version of the module, the wifi key starts working, and
> it continues working even after I unload the module. This indicates that
> this laptop has hardware/BIOS support for the wifi enabling, and the
> software override messes it up.
> 
> The latest patch seems to work as well, the wifi key works correctly when
> the module is loaded with disable_hotkeys=1. However, the other hotkeys
> (screen brightness etc) then do not work either.

That is expected, since we are not telling the system to enable any events (hotkeys or system), yor wifi key is managed internally by the BIOS/EC

Go to line 138 and change the value from 0x01 to 0x09 as a quick fix, and that should give you back the old behaviour as I prepare a patch for you tomorrow.

Cheers
Azael
Comment 4 Azael Avalos 2016-05-18 16:26:29 UTC
This issue has been fixed by commit a30b8f81d9d6fe24eab8a023794548b048f08e3c
so this bug can be closed now, such commit has been backported to stable too.


Cheers
Azael

Note You need to log in before you can comment on or make changes to this bug.