Acer Aspire 5520 has backlight broken in Karmic Koala

Bug #428910 reported by Roman Yepishev
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Stefan Bader

Bug Description

I have seen reports of broken brightness control on the LKML (http://patchwork.kernel.org/patch/43618/ - code is alredy present in running kernel) and in Launchpad (LP#333386 - had no problems in 9.04 on all kernel updates), and looks like something was fixed. However, up-to-date Ubuntu 9.10 alpha cannot be normally used with Acer Aspire 5520.

When laptop is started, the backlight controls work properly (Fn+Left, Fn+Right) in the BIOS configuration screen, in GRUB and for some seconds during kernel initialization until:
[ 3.605030] usb 4-3: new full speed USB device using ohci_hcd and address 2
[ 3.690373] Linux agpgart interface v0.103
[ 3.698698] [Firmware Bug]: ACPI(Z00P) defines _DOD but not _DOS
[ 3.826220] usb 4-3: configuration #1 chosen from 1 choice
[ 4.232085] ACPI Error: Current brightness invalid 20090521 video-538

After these lines the controls stop working with "ACPI: Failed to switch the brightness" message.
The level of brightness stays on the same level it was before the ACPI error message until X starts when it goes down to 5% or so (it is not possible to reach this value using the controls, it is way too low, I am unable to figure the exact dependency but most of the time it is so).
Subsequent reboots do not make controls to work again so it is virtually not possible to see anything on the screen.

Sometimes it is possible to make screen brighter by switching to vt1-6, closing-opening the lid. Usually complete power-off and AC unplug-plug cycle is required to revert to original state.

ProblemType: Bug
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: NVidia [HDA NVidia], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: NVidia [HDA NVidia], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: rtg 3996 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'NVidia'/'HDA NVidia at 0xd0880000 irq 21'
   Mixer name : 'Realtek ALC268'
   Components : 'HDA:10ec0268,10250126,00100003 HDA:14f12c06,10250126,00100000'
   Controls : 12
   Simple ctrls : 9
CheckboxSubmission: b16b943d4712f4613c50f12b0ffe0cc5
CheckboxSystem: 1fd1d69a420d7665c5bbb30cf0881c53
Date: Sun Sep 13 17:22:09 2009
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=b7013d50-c260-43e4-9f02-9b2bc8e97430
MachineType: Acer Aspire 5520
NonfreeKernelModules: nvidia
Package: linux-image-2.6.31-10-generic 2.6.31-10.32
PccardctlIdent:

PccardctlStatus:

ProcCmdLine: root=/dev/mapper/vg00-root ro quiet splash crashkernel=384M-2G:64M,2G-:128M
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-10.32-generic
RelatedPackageVersions:
 linux-backports-modules-2.6.31-10-generic N/A
 linux-firmware 1.16
SourcePackage: linux
Uname: Linux 2.6.31-10-generic i686
WpaSupplicantLog:

dmi.bios.date: 05/06/2008
dmi.bios.vendor: Acer
dmi.bios.version: V1.33
dmi.board.name: Fuquene
dmi.board.vendor: Acer
dmi.board.version: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAcer:bvrV1.33:bd05/06/2008:svnAcer:pnAspire5520:pvrV1.33:rvnAcer:rnFuquene:rvrN/A:cvnAcer:ct10:cvrN/A:
dmi.product.name: Aspire 5520
dmi.product.version: V1.33
dmi.sys.vendor: Acer

Revision history for this message
Roman Yepishev (rye) wrote :
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Roman,

Can you attach some additional debug information? Please run the following commands and attach the resulting "acpidump.txt" and "video.txt" file. Thanks!

sudo acpidump -o acpidump.txt
grep -r . /proc/acpi/video/ > video.txt

Revision history for this message
Roman Yepishev (rye) wrote :

Sure, here's acpidump.

P.S. A workaround that works most of the time, for those who have the same symthoms: When X starts at low brightness, switch to some non-X vt, decrease brightness and switch back to X.

Revision history for this message
Roman Yepishev (rye) wrote :
Stefan Bader (smb)
Changed in linux (Ubuntu):
assignee: nobody → Stefan Bader (stefan-bader-canonical)
status: Triaged → In Progress
Revision history for this message
Stefan Bader (smb) wrote :

I had a look at the data provided. It seems that before the patch, brightness was controlled by the acer-wmi driver (as the definition provides only _DOD and would therefor have been ignored). Now the acpi video driver looks at the video device but seems to get an invalid brightness value (which strikingly looks like a date to me).

[ 3.698698] [Firmware Bug]: ACPI(Z00P) defines _DOD but not _DOS
[ 4.232085] ACPI Error: Current brightness invalid 20090521 video-538
[ 4.232263] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0f/device:10/input/input6
[ 4.232354] ACPI: Video Device [Z00P] (multi-head: yes rom: no post: no)
[ 13.325165] acer-wmi: Brightness must be controlled by generic video driver

The methods in the BIOS look incorrect to me (it stores x=((b/10)-1) but reads b=((x*10)+1), where b is the brightness value and x the one stored on the ec). But that should normally not result in a value seen in the error message. This needs more investigation.

For now, can you try the following: add "acpi_backlight=vendor" to the kernel command line either on boot (which is a bit hard with grub timeout being 0, one needs to press shift quickly) or in /etc/default/grub and calling "sudo update-grub". Does this restore the old functionality?

Revision history for this message
Stefan Bader (smb) wrote :

Note: this upstream patch looks interesting:

commit 90c53ca426cb93d15eefea79dcf6bd15ad3ffeb4
Author: Zhang Rui <email address hidden>
Date: Mon Aug 31 12:39:54 2009 -0400

    ACPI video: work-around BIOS AML bug in _BQC

    _BQC on some laptops returns an uninitialized value when it's
    invoked for the first time.

    Set the laptop to the maximum backlight level in this case.
    http://bugzilla.kernel.org/attachment.cgi?id=22675

Revision history for this message
Roman Yepishev (rye) wrote :

Dear Stefan,

Thanks for your time investigating this bug!

So, I added acpi_backlight=vendor string to the kernel cmdline and backlight controls DO work now contrary to what gets printed to dmesg:
[ 461.856388] ACPI: Failed to switch the brightness
[ 463.473236] ACPI: Failed to switch the brightness

I see that /sys/platform/acer-wmi/backlight/acer-wmi/brightness is present and reflects the current state properly.

I will try building the kernel with the patch you posted and see what happens.

Regarding date: yes, it is a proper date, lshal - power_management.acpi.linux.version = '20090521' , so it is definitely an unitialized memory.

Thanks again!

Revision history for this message
Roman Yepishev (rye) wrote :

The patch does not apply cleanly to 2.6.31-11-generic, some minor tweaks are required.

The backlight controls now work partially.

Direct write to /sys/devices/virtual/backlight/acpi_video0/brightness yields correct results, i.e. I can set backlight level properly by writing 1..9 to that file, great!

However when I am trying to use the hardware buttons it behaves as:

1. brightness is at 9, pressing brightness-up once - brightness is at 9
2. brightness is at 9, pressing brightness-up again - screen is dimmed and acpi_video0/brightness shows 1
3. pressing brightness-up again brings the screen to the max brightness, acpi_video0/brightness shows 9

So it is possible to use only 2 values, 1 and 9 when operating via keyboard.

I am attaching both the patch and kernel module, in case someone wants to play with the code on their hardware.

Revision history for this message
Roman Yepishev (rye) wrote :
Revision history for this message
Stefan Bader (smb) wrote :

Hm, I had no problem in adding the upstream patch and yours seems to miss a few things. As I found another commit which seems to be related (as I mentioned earlier, the query function seems to return incorrect values). So I went forward and build test kernels with both patches applied. Maybe you can give those a try. You find them (and the patches) at http://people.canonical.com/~smb/bug428910/

Revision history for this message
Roman Yepishev (rye) wrote :

Thanks, Stefan.

The package you have built works flawlessly, /sys interface provides correct value and keyboard controls work properly.

Tested linux-image-2.6.31-11-generic_2.6.31-11.36bug428910v1_i386.deb.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.31-11.38

---------------
linux (2.6.31-11.38) karmic; urgency=low

  [ Stefan Bader ]

  * [Upstream] acerhdf: Limit modalias matching to supported boards
    - LP: #435958

  [ Tim Gardner ]

  * [Config] Added sata_via to d-i/modules/sata-modules
    - LP: #434827
  * SAUCE: (drop after 2.6.31) Disable iwl-1000 series wireless adapters
    - LP: #439285
  * [Upstream] i915: Fix i2c init message
    - LP: #409361
  * [Config] Add sym53c8xx.ko to virtual sub-flavour
    - LP: #439415

  [ Upstream Kernel Changes ]

  * sched: Disable NEW_FAIR_SLEEPERS for now
    - LP: #436342

  * ACPI video: ignore buggy _BQC
  * ACPI video: work-around BIOS AML bug in _BQC
    - LP: #428910
  * ALSA: hda - Added quirk to enable sound on Toshiba NB200
    - LP: #438318

 -- Tim Gardner <email address hidden> Thu, 01 Oct 2009 13:52:09 -0600

Changed in linux (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Abraham Smith (adsmith) wrote :

I know this is marked as fixed, but I am having what appears to be the same problem on an Acer aspire timelineX 1830T in karmic kubuntu, fully updated. I wondering if it is a regression or if this model needs another patch.

With either xbacklight or the hotkeys, no change is made.

After applying acpi_backlight=vendor to the grub config and rebooting, a backlight directory appears as: /sys/devices/platform/acer-wmi/backlight/acer-wmi/
actual_brightness
bl_power
brightness
device
max_brightness
power
subsystem
uevent

max_brightness is 9.
I can echo into brightness, and that number changes, but no effect in the display.
actual_brightness is always stuck at 0.

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.