Bug 43148 - Backlight control doesn't work with Acer Aspire 5745DG
Summary: Backlight control doesn't work with Acer Aspire 5745DG
Status: CLOSED INVALID
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Aaron Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-22 18:01 UTC by Thomas
Modified: 2013-02-21 07:19 UTC (History)
2 users (show)

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


Attachments
Info.txt (307 bytes, text/plain)
2012-04-22 18:02 UTC, Thomas
Details
acpidump.dat (247.96 KB, application/octet-stream)
2012-04-22 18:03 UTC, Thomas
Details
cpuinfo.txt (3.30 KB, text/plain)
2012-04-22 18:03 UTC, Thomas
Details
dmesg.txt (32.13 KB, text/plain)
2012-04-22 18:03 UTC, Thomas
Details
dmidecode.log (15.50 KB, text/x-log)
2012-04-22 18:04 UTC, Thomas
Details
kernel.config (70.62 KB, text/plain-text)
2012-04-22 18:04 UTC, Thomas
Details
ls_sys_class_backlight_acpi_video0.txt (1.33 KB, text/plain)
2012-04-22 18:05 UTC, Thomas
Details
lsmod.txt (71 bytes, text/plain)
2012-04-22 18:05 UTC, Thomas
Details
lspci.txt (2.02 KB, text/plain)
2012-04-22 18:05 UTC, Thomas
Details
lspci-vvvv.txt (25.10 KB, text/plain)
2012-04-22 18:06 UTC, Thomas
Details
uname_a.txt (129 bytes, text/plain)
2012-04-22 18:06 UTC, Thomas
Details
BIOS.txt (241 bytes, text/plain)
2012-04-22 18:10 UTC, Thomas
Details
New ACPI Dump (247.96 KB, text/plain)
2012-05-22 18:13 UTC, Thomas
Details
New DMESG (32.06 KB, text/plain)
2012-05-22 18:14 UTC, Thomas
Details
New DMIDECODE (15.50 KB, text/plain)
2012-05-22 18:15 UTC, Thomas
Details
Perl Output before_change.txt (810 bytes, text/plain)
2012-09-03 15:00 UTC, Thomas
Details
Perl Output after_change_to_value_3.txt (811 bytes, text/plain)
2012-09-03 15:01 UTC, Thomas
Details

Description Thomas 2012-04-22 18:01:30 UTC
Controlling the backlight doesn't work.

I've tried:
   Normal boot (no Grub options)
   =============================
   --> control via echo 3 > /sys/class/backlight/acpi_video0/brightness --> no action happens (a cat shows the new value 3 (old value 9)
   --> Via FN+Cursor Up / Down  --> no action happens

   ACPI Vendor boot (acpi_backlight=vendor)
   =============================
   --> control via echo 3 > /sys/class/backlight/acpi_video0/brightness --> no action happens (a cat shows the new value 3 (old value 9)
   --> Via FN+Cursor Up / Down  --> no action happens

   NOACPI boot (acpi=off)
   =============================
   --> control via echo 3 > /sys/class/backlight/acpi_video0/brightness --> no action happens (a cat shows the new value 3 (old value 9)
   --> Via FN+Cursor Up / Down  --> no action happens

   Win7 Boot
   =============================
   --> Via FN+Cursor Up / Down  --> Brightness control works ;-(

Created Files:
==============
   Files where created in normal boot mode. (Without parameters)
   Files where created created after pressing FN+Cursor Up / Down and after control via sys/class/...
Comment 1 Thomas 2012-04-22 18:02:30 UTC
Created attachment 73034 [details]
Info.txt
Comment 2 Thomas 2012-04-22 18:03:08 UTC
Created attachment 73035 [details]
acpidump.dat
Comment 3 Thomas 2012-04-22 18:03:30 UTC
Created attachment 73036 [details]
cpuinfo.txt
Comment 4 Thomas 2012-04-22 18:03:48 UTC
Created attachment 73037 [details]
dmesg.txt
Comment 5 Thomas 2012-04-22 18:04:17 UTC
Created attachment 73038 [details]
dmidecode.log
Comment 6 Thomas 2012-04-22 18:04:36 UTC
Created attachment 73039 [details]
kernel.config
Comment 7 Thomas 2012-04-22 18:05:02 UTC
Created attachment 73040 [details]
ls_sys_class_backlight_acpi_video0.txt
Comment 8 Thomas 2012-04-22 18:05:19 UTC
Created attachment 73041 [details]
lsmod.txt
Comment 9 Thomas 2012-04-22 18:05:38 UTC
Created attachment 73042 [details]
lspci.txt
Comment 10 Thomas 2012-04-22 18:06:02 UTC
Created attachment 73043 [details]
lspci-vvvv.txt
Comment 11 Thomas 2012-04-22 18:06:23 UTC
Created attachment 73044 [details]
uname_a.txt
Comment 12 Thomas 2012-04-22 18:07:00 UTC
I've also tried to control brighting in Bios with FN+Cursor UP/Down --> nothing happens
Comment 13 Thomas 2012-04-22 18:10:04 UTC
Created attachment 73045 [details]
BIOS.txt
Comment 14 Lee, Chun-Yi 2012-05-05 10:26:55 UTC
Please kindly run the following command and paste the result:
 # ls -la /sys/class/backlight/


Thanks
Comment 15 Thomas 2012-05-05 12:38:22 UTC
Thank you for your response.

Here is the output of ls -la /sys/class/backlight/

insgesamt 0
drwxr-xr-x  2 root root 0  5. Mai 21:05 .
drwxr-xr-x 43 root root 0  5. Mai 21:05 ..
lrwxrwxrwx  1 root root 0  5. Mai 21:05 acpi_video0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video0
Comment 16 Lee, Chun-Yi 2012-05-05 12:45:39 UTC
(In reply to comment #0)
> Controlling the backlight doesn't work.
> 
...
>    ACPI Vendor boot (acpi_backlight=vendor)
>    =============================
>    --> control via echo 3 > /sys/class/backlight/acpi_video0/brightness -->
>    no
> action happens (a cat shows the new value 3 (old value 9)
>    --> Via FN+Cursor Up / Down  --> no action happens

Please kindly add 'acpi_backlight=vendor', then paste the result of 'ls -la /sys/class/backlight/'

Thanks
Comment 17 Thomas 2012-05-06 14:59:08 UTC
Hello,

I'm sorry, it seems that I made a copy paste mistake. If I boot with acpi_backlight=vendor I get no /sys/class/backlight/acpi_video0/.

Here is the result of my current try:

Grub boot commandline = acpi_backlight=vendor
I've tried FN+Cursor key. --> backlight doesn't change.
and ls -la /sys/class/backlight/

insgesamt 0
drwxr-xr-x  2 root root 0  6. Mai 16:24 .
drwxr-xr-x 43 root root 0  6. Mai 16:24 ..
Comment 18 Lee, Chun-Yi 2012-05-20 01:25:40 UTC
(In reply to comment #17)
> Hello,
> 
> I'm sorry, it seems that I made a copy paste mistake. If I boot with
> acpi_backlight=vendor I get no /sys/class/backlight/acpi_video0/.
> 
> Here is the result of my current try:
> 
> Grub boot commandline = acpi_backlight=vendor
> I've tried FN+Cursor key. --> backlight doesn't change.
> and ls -la /sys/class/backlight/
> 
> insgesamt 0
> drwxr-xr-x  2 root root 0  6. Mai 16:24 .
> drwxr-xr-x 43 root root 0  6. Mai 16:24 ..

hm.......
Per lsmod, I aware you only have one kernel module loaded, did you build-in everything to kernel?

And, the i915 initialled fail on your machine:

[drm:i915_init] *ERROR* drm/i915 can't work without intel_agp module!

Could you please check why intel_agp lost on your machine?
Comment 19 Thomas 2012-05-22 18:12:25 UTC
Thank you for your respond.

I recompiled the kernel and set the following parameter from (build in y to module m)
CONFIG_AGP_INTEL=m

Now I can't find the message anymore in dmesg.

lsmod prints the following modules as loaded:
Module                  Size  Used by
intel_agp              10385  0 
intel_gtt              12318  1 intel_agp
ehci_hcd               31395  0 

If seen that the FN+left / FN+right keys change /sys/class/backlight/acpi_video0/brightness. -> Nothing happens to the backlight.

If I change the value via echo nothing happens. 

I've also created a new dmesg.txt, dmidecode.log, acpidump after this tries. Please find the files attached to this post.
Comment 20 Thomas 2012-05-22 18:13:56 UTC
Created attachment 73352 [details]
New ACPI Dump
Comment 21 Thomas 2012-05-22 18:14:15 UTC
Created attachment 73353 [details]
New DMESG
Comment 22 Thomas 2012-05-22 18:15:15 UTC
Created attachment 73354 [details]
New DMIDECODE
Comment 23 Lee, Chun-Yi 2012-08-16 02:56:42 UTC
Please use 'acpi_backlight=vendor' when you set CONFIG_AGP_INTEL=m

If there have any intel folder show up in /sys/class/backlight, please use echo command to change the value of brightness sysfs file and look at does brightness really change?
Comment 24 Thomas 2012-08-30 18:52:35 UTC
Today I had a bit time to try a view things on this Laptop.

Here are my results.

If I append acpi_backlight=vendor the folder in /sys/class/backlight disappears.

I've updated the kernel to "linux-3.5.2" from the gentoo repository but this doesn't make a change.

The FN + Cursor keys change the value form /sys/class/backlight/acpi_video0/backlight but both (echo value > device / and FN Cursor) doesn't affect the brightness.

The graphic card is a Nvida card. Is the CONFIG_AGP_INTEL only for Intel Cards? or is this for the chipset witch controls the backlight.
Comment 25 Lee, Chun-Yi 2012-09-03 01:59:48 UTC
(In reply to comment #24)
> Today I had a bit time to try a view things on this Laptop.
> 
> Here are my results.
> 
> If I append acpi_backlight=vendor the folder in /sys/class/backlight
> disappears.
> 
> I've updated the kernel to "linux-3.5.2" from the gentoo repository but this
> doesn't make a change.
> 
> The FN + Cursor keys change the value form
> /sys/class/backlight/acpi_video0/backlight but both (echo value > device /
> and
> FN Cursor) doesn't affect the brightness.
> 
> The graphic card is a Nvida card. Is the CONFIG_AGP_INTEL only for Intel
> Cards?
> or is this for the chipset witch controls the backlight.

Sorry for I didn't aware your video chip is Nvidia. 

In your _BCM, it write brightness level value to EC register BLVL:

    OperationRegion (ERAM, SystemMemory, 0xFF808201, 0x0100)
    Field (ERAM, ByteAcc, NoLock, Preserve)
    {
	...
        BLVL,   8,                      /* 0x51 */

Please help to check this value is really write to register.
Please run this acer_ec.pl from Carlos:
http://code.google.com/p/aceracpi/wiki/EmbeddedController
http://aceracpi.googlecode.com/svn/trunk/acer_ec/acer_ec.pl

Simple use:
        watch -n 1 perl acer_ec.pl regs
 
Then, please write value to /sys/class/backlight/acpi_video0/backlight and monitor the value changed on 0x51 register.

If the value is really changed, then the problem is in EC firmware, it didn't really change backlight and causes a broken _BCM.

If _BCM broken, then the only way to control the backlight is opensource drm driver (I think nouvea) need support this VGA chip.
But, per your 'lspci -vvv' result, I didn't see any kernel driver supported your Nvidia 0df0 device. For nouvea support, that will be better report to nouvea maintainer.

Are you using vesa driver now? or have any drm driver works on your machine?
Comment 26 Thomas 2012-09-03 15:00:03 UTC
Hi,

I've tested this with the acer_ec.pl File. 

Please find the following two files attached.

Here is a detailed Report what I've done.
  1. Installed the latest Nvidia driver for gentoo (Version: 304.43)
     (I had the proprietary drivers installed all the time)
     List of the loaded modules:
     Module                  Size  Used by
     nvidia              11175245  41 
     ehci_hcd               29013  0 
     atl1c                  26803  0 
  2. ran the perl script with the following command
     --> perl acer_ec.pl regs > before_change.txt
  3. ran the echo command to change the brightness
     --> cd /sys/class/backlight/acpi_video0
     --> echo 3 > brightness
  4. ran the perl script again with the following command
     --> perl acer_ec.pl regs > after_change_to_value_3.txt

The brightness of the screen didn't change at all.

Do you think that this is a problem of the Nvidia Drivers or is it a problem of any other chipset of the mainboard. (Sorry for this question, but I'am not so firm with this details.)
Comment 27 Thomas 2012-09-03 15:00:56 UTC
Created attachment 79081 [details]
Perl Output before_change.txt
Comment 28 Thomas 2012-09-03 15:01:49 UTC
Created attachment 79091 [details]
Perl Output after_change_to_value_3.txt
Comment 29 Thomas 2012-09-03 15:03:23 UTC
The Graphics Card is a: NVIDIA GeForce GT 425M
Comment 30 Lee, Chun-Yi 2012-09-04 03:14:18 UTC
(In reply to comment #26)
> Hi,
> 
> I've tested this with the acer_ec.pl File. 
> 
> Please find the following two files attached.
> 
> Here is a detailed Report what I've done.
>   1. Installed the latest Nvidia driver for gentoo (Version: 304.43)
>      (I had the proprietary drivers installed all the time)
>      List of the loaded modules:
>      Module                  Size  Used by
>      nvidia              11175245  41 
>      ehci_hcd               29013  0 
>      atl1c                  26803  0 
>   2. ran the perl script with the following command
>      --> perl acer_ec.pl regs > before_change.txt
>   3. ran the echo command to change the brightness
>      --> cd /sys/class/backlight/acpi_video0
>      --> echo 3 > brightness
>   4. ran the perl script again with the following command
>      --> perl acer_ec.pl regs > after_change_to_value_3.txt
> 

Thanks for your testing result. It confirm the brightness value already wrote to 
EC register:

in before_change.txt:
                01
       __	__
50 |	0	9

in after_change_to_value_3.txt
                01
       __	__
50 |	0	3   <=== number changed to 3

So, this is EC firmware's problem, it didn't really change brightness level.
Obviously ODM didn't test the standard _BCM acpi method because windows 7 doesn't use it.

> The brightness of the screen didn't change at all.
> 
> Do you think that this is a problem of the Nvidia Drivers or is it a problem
> of
> any other chipset of the mainboard. (Sorry for this question, but I'am not so
> firm with this details.)

This is a EC firmware problem, the responsibility should take by OEM/ODM. The drm driver is a workaround we HOPE it can avoid brightness control problem.

If drm driver support your machine, it should generate brightness interface in /sys/class/backlight/ folder, e.g. /sys/class/backlight/intel , then we can use 'acpi_backlight=vendor' to avoid user space application try to change brightness through acpi interface.

So, if we want drm driver can help to workaround this issue, the driver should support your machine with kernel backlight framework, or it supported backlight control by video manufacturer's proprietary way.
Comment 31 Aaron Lu 2013-02-21 07:19:17 UTC
Hi Thomas and Lee,

Thanks for the report and the explanation.
So we don't have anything to fix in Linux ACPI as the problem is _BCM control method, I'll close this bug as invalid.

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