Bug 110021

Summary: Backlight controls don't work with ideapad_laptop is loaded on Yoga 900
Product: Drivers Reporter: Paul Buonopane (xyz36)
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: NEW ---    
Severity: normal CC: ramin.blackhat, szg00000
Priority: P1    
Hardware: x86-64   
OS: Linux   
URL: https://github.com/torvalds/linux/pull/236
Kernel Version: 4.3.3 Subsystem:
Regression: Yes Bisected commit-id:

Description Paul Buonopane 2015-12-26 09:40:14 UTC
Backlight controls work fine when ideapad_laptop is blacklisted, but don't work when it's loaded.


root@Paul-Hybrid /sys/kernel/debug/ideapad # cat status
Backlight max:	16
Backlight now:	16
BL power value:	On
=====================
Radio status:	On(1)
Wifi status:	Off(0)
BT status:	Off(0)
3G status:	Off(0)
=====================
Touchpad status:On(1)
Camera status:	On(1)
root@Paul-Hybrid /sys/kernel/debug/ideapad # cat cfg   
cfg: 0x41FDE114

Capability: Bluetooth Wireless Camera 
Graphic: Intel


Note that my backlight was not actually at 16 (100%) when I ran the first command; it was lowered from before I had loaded ideapad_laptop.

I've applied this patch to ideapad_laptop.c to fix wifi: https://github.com/torvalds/linux/commit/f71c882dd4cfe4aa88ea07b1402ddd43605d4aef
Comment 1 Paul Buonopane 2015-12-27 07:51:04 UTC
It appears this was a regression introduced with https://github.com/torvalds/linux/commit/26bff5f099722fa7c38796a3ccd0e880cf1a524a.  The logic of the if statement in drivers/platform/x86/ideapad-laptop.c on line 907 was flipped.  Changing == to != fixes the issue.  I've created a pull request with a patch: https://github.com/torvalds/linux/pull/236
Comment 2 Paul Buonopane 2015-12-27 08:18:55 UTC
It's worth noting that the "Backlight now" value reported by /sys/kernel/debug/ideapad/status is still always 16; however, I suspect this was the case prior to the regression.  "BL power value" also appears to be stuck.