Bug 35072

Summary: [GM45] Backlight isn't working with Intel GMA 4500M
Product: Drivers Reporter: Andrea Scarpino (me)
Component: Video(DRI - Intel)Assignee: drivers_video-dri-intel (drivers_video-dri-intel)
Status: RESOLVED INVALID    
Severity: low CC: alan, cmgonzalez, daniel, jani.nikula, jbarnes, michaldarda, rycherr, tasdan5817
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.5 Subsystem:
Regression: No Bisected commit-id:
Attachments: lspci -vmmn output

Description Andrea Scarpino 2011-05-14 14:04:44 UTC
Hi,
I own a Toshiba Satellite T130 and backlight using FN keys isn't working.

I can edit the backlight value using setpci, for example I do "setpci -s 00:02.0 F4.B=40" to decrease that value, and "setpci -s 00:02.0 F4.B=FF" to set backlight to the maximum value.

I don't know what kind of information you need to fix this, then ask me everything you need.

lspci says:
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

Thanks!
Comment 1 Michał Darda 2011-05-29 08:54:53 UTC
same thing on 2.6.39.. please fix it
Comment 2 Cristián M. González 2011-08-02 17:08:01 UTC
This bug was introduced on kernel
2.6.38.8, on 2.6.38.6 was working fine. (ubuntu 10.10 -> 11.04).


A lot of people have this problem, i found this workaround:

http://linux-on-acer-aspire-5732z.blogspot.com/2011/06/backlight-workaround-for-linux-mint-11.html

I'm willing to be your ginea pig if you like :P
Comment 3 rycherr 2011-09-02 13:16:14 UTC
"P1 Low" status is unnacceptable and quite frankly insulting.  This is a MAJOR bug that deserves IMMEDIATE attention.  I don't see how a bug that prevents the screen from working can be seen as "minor".  I guess you guys think having to use a flashlight to navigate the screen to be a "minor" inconvenience.

Disgusting.
Comment 4 rycherr 2011-09-02 13:28:03 UTC
Yes, there's a workaround. But what's not usually mentioned is that in order to apply that workaround, it is necessary to USE A FLASHLIGHT to see the screen while you open the terminal, edit the rc.local file, and save the changes.  If you're lucky enough to have an external monitor, you can avoid that "(P1) minor" inconvenience, but it's not an easy thing to do if you're brand new to Linux.  Also, when you close the laptop lid, you're back to square one as far as the black screen goes.
Comment 5 Tasi Dani 2012-02-08 09:57:48 UTC
Another workaround: 

"sudo gedit /etc/default/grub" 

remove "rhgb" and "quiet" from the boot options, then run

"sudo grub2-mkconfig -o /boot/grub2/grub.cfg"

With this solution I have backlight.
Sorry for my bad English
Comment 6 Andrea Scarpino 2012-02-08 10:04:12 UTC
(In reply to comment #5)
> Another workaround: 
> 
> "sudo gedit /etc/default/grub" 
> 
> remove "rhgb" and "quiet" from the boot options, then run
> 
> "sudo grub2-mkconfig -o /boot/grub2/grub.cfg"
> 
> With this solution I have backlight.
I don't have those enabled in my syslinux config.
The bug is still present in 3.2.5.
Comment 7 Daniel Vetter 2012-03-25 12:57:21 UTC
This sounds like brightness inversion, which we already quirk on another acer. Please try the drm-intel-testing branch from http://cgit.freedesktop.org/~danvet/drm-intel/

Also please attach the full output of

$ lspci -vmmn

in case we need to add another quirk entry to the table.
Comment 8 Andrea Scarpino 2012-03-26 01:32:59 UTC
Created attachment 72711 [details]
lspci -vmmn output

This is the output of 'lspci -vmmn'.
Comment 9 Daniel Vetter 2012-03-29 12:43:21 UTC
... and you please test the drm-intel-testing branch from git://people.freedesktop.org/~danvet/drm-intel
Comment 10 Jesse Barnes 2012-04-18 21:48:30 UTC
Andrea, are you attaching your PCI output because you also see this problem and need a quirk?  Please test Daniel's testing tree and get back to us.  If you still see the issue, please attach the output from dmidecode.
Comment 11 Andrea Scarpino 2012-04-19 10:07:24 UTC
I'll try to build it and try it ASAP.
Comment 12 Andrea Scarpino 2012-05-27 20:24:24 UTC
I'm incapable to build the kernel from Daniel's branch, is there some patch I can apply to the kernel 3.4?
Comment 13 Andrea Scarpino 2012-07-27 18:11:02 UTC
Still not fixed in 3.5. Can you provide build steps?
Thank you
Comment 14 Daniel Vetter 2012-08-05 21:45:36 UTC
There's a known issue with backlights on gen4. I'm waiting for feedback from another reporter on a test-patch, I'll update as soon as a have a final patch for it.
Comment 15 Jani Nikula 2012-09-17 12:36:56 UTC
Please try i915.invert_brightness=1 module parameter with kernel version v3.5 or later, see if that fixes the brightness issue, and report 'lspci -vmmnn' if it does.
Comment 16 Andrea Scarpino 2012-09-17 12:58:10 UTC
I get a black screen booting with that option. linux 3.5.4.

$ dmesg| grep i915
[    0.000000] Command line: root=/dev/sda6 ro i915.invert_brightness=1 initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux 
[    0.000000] Kernel command line: root=/dev/sda6 ro i915.invert_brightness=1 initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux 
[    0.544159] i915 0000:00:02.0: setting latency timer to 64
[    0.639737] i915 0000:00:02.0: irq 43 for MSI/MSI-X
[    1.085251] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
Comment 17 Jani Nikula 2012-09-17 13:16:49 UTC
(In reply to comment #16)
> I get a black screen booting with that option. linux 3.5.4.

Right, comment #2 and comment #7 mislead me to think this was about brightness inversion too. Sorry.

Do you have CONFIG_ACPI_TOSHIBA enabled? Do you have toshiba-acpi loaded?

What do you have in /sys/class/backlight? Does changing brightness through the brightness sysfs files work? (sudo sh -c "echo N > brightness", where N is in range 0...`cat max_brightness`)
Comment 18 Andrea Scarpino 2012-09-17 13:24:16 UTC
CONFIG_ACPI_TOSHIBA=m

$ lsmod| grep toshiba_acpi
toshiba_acpi           13367  0 
sparse_keymap           3056  1 toshiba_acpi
rfkill                 15604  5 cfg80211,toshiba_acpi,bluetooth
wmi                     8475  1 toshiba_acpi

ls /sys/class/backlight -l
total 0
lrwxrwxrwx 1 root root 0 Sep 17 15:00 acpi_video0 -> ../../devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/
lrwxrwxrwx 1 root root 0 Sep 17 15:00 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/
lrwxrwxrwx 1 root root 0 Sep 17 15:01 toshiba -> ../../devices/LNXSYSTM:00/device:00/TOS1900:00/backlight/toshiba/

yes, setting a value in /sys/class/backlight/intel_backlight/brightness works.
Comment 19 Jani Nikula 2012-09-17 13:52:09 UTC
(In reply to comment #18)
> yes, setting a value in /sys/class/backlight/intel_backlight/brightness
> works.

So acpi_video0/brightness does not work? Do you have an input device that's registered by toshiba-acpi in /sys/class/input? Does the corresponding /dev/input input device work?

What if you try acpi_backlight=vendor on the kernel cmdline?
Comment 20 Andrea Scarpino 2012-09-17 14:02:24 UTC
> So acpi_video0/brightness does not work?

Yes, it doesn't. (In reply to comment #19)

> Do you have an input device that's
> registered by toshiba-acpi in /sys/class/input? Does the corresponding
> /dev/input input device work?
> 

Sorry I guess I don't know how to check this.

> What if you try acpi_backlight=vendor on the kernel cmdline?

I'll try and report back later.
Comment 21 Daniel Vetter 2012-11-13 11:54:47 UTC
(In reply to comment #18)
> yes, setting a value in /sys/class/backlight/intel_backlight/brightness
> works.

Bittersad truth, but if that works it's no longer our problem, but either an issue with ACPI or with a vendor-specific method to control the backlight. The best is probably to file this against ACPI so that they blacklist the defunct ACPI backlight, since then the userspace driver will pick the intel backlight. Or you could set the xorg.conf option to force a specific backlight (which iirc needs the very latest driver release of xf86-video-intel).
Comment 22 Andrea Scarpino 2012-11-13 22:21:23 UTC
Thank you Daniel, fixed using:
Option      "Backlight"  "intel_backlight"