GNOME Bugzilla – Bug 670116
keyboard backlight adjust wrongly
Last modified: 2012-03-17 12:37:34 UTC
When pressing F5/F6 to decrease keyboard backlight on Macbook Air 4,1, the kbd backlight suddenly become to the MAX (full) value when it's going to be MIN (zero). Expected behavior: Keep pressing F5, the kbd backlight should decrease until zero and the backlight applet should display an empty bar. Current behavior: Keep pressing F5, the kdb backlight decreases until zero (dark without any light), but the applet jump to a full bar - So pressing F5/F6 again would adjust the kbd backlight from maximum state (instead of minimum state). ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: linux-image-3.2.0-8-generic 3.2.0-8.14 ProcVersionSignature: Ubuntu 3.2.0-8.14-generic 3.2.0 Uname: Linux 3.2.0-8-generic x86_64 NonfreeKernelModules: wl AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24. ApportVersion: 1.90-0ubuntu1 Architecture: amd64 ArecordDevices: **** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: Cirrus Analog [Cirrus Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: lli5 1417 F.... pulseaudio Card0.Amixer.info: Card hw:0 'PCH'/'HDA Intel PCH at 0x90600000 irq 47' Mixer name : 'Intel CougarPoint HDMI' Components : 'HDA:10134206,106b6200,00100302 HDA:80862805,80860101,00100000' Controls : 25 Simple ctrls : 9 Date: Mon Jan 9 07:51:30 2012 HibernationDevice: RESUME=UUID=cc35910e-72f8-4156-85f0-acfc48012f31 InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64+mac (20120108) MachineType: Apple Inc. MacBookAir4,1 ProcEnviron: PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-8-generic root=UUID=02e7076b-bab1-4657-ae2c-d6c733869f1c ro quiet splash vt.handoff=7 RelatedPackageVersions: linux-restricted-modules-3.2.0-8-generic N/A linux-backports-modules-3.2.0-8-generic N/A linux-firmware 1.67 SourcePackage: linux StagingDrivers: mei UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 10/14/2011 dmi.bios.vendor: Apple Inc. dmi.bios.version: MBA41.88Z.0077.B0E.1110141154 dmi.board.asset.tag: Base Board Asset Tag# dmi.board.name: Mac-C08A6BB70A942AC2 dmi.board.vendor: Apple Inc. dmi.board.version: MacBookAir4,1 dmi.chassis.type: 10 dmi.chassis.vendor: Apple Inc. dmi.chassis.version: Mac-C08A6BB70A942AC2 dmi.modalias: dmi:bvnAppleInc.:bvrMBA41.88Z.0077.B0E.1110141154:bd10/14/2011:svnAppleInc.:pnMacBookAir4,1:pvr1.0:rvnAppleInc.:rnMac-C08A6BB70A942AC2:rvrMacBookAir4,1:cvnAppleInc.:ct10:cvrMac-C08A6BB70A942AC2: dmi.product.name: MacBookAir4,1 dmi.product.version: 1.0 dmi.sys.vendor: Apple Inc.
More information of this bug could be found at https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/913793, which contains a patch on #10-#12 for review.
Created attachment 207824 [details] [review] Patch forwarded from Launchpad
Could we get that patch reviewed and maybe included in 3.3.91? it seems trivial
I don't understand what the first part of the patch bug is fixing as there's already a MAX(,0) to ensure the value never goes below zero. The second part is valid.
Author: Richard Hughes <richard@hughsie.com> Date: Mon Mar 5 17:10:56 2012 +0000 power: Do not overflow when pressing the keyboard brightness down button Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=670116 Can you please check git master and verify it fixes things. Thanks
@Richard, Just FYI. the value has possibility to goes below zero. I verified this on my Macbook Air. Not all paths are protected by MAX(,0) actually. Let me go through the code again to find it out when I have time. :)