Bug 12174
Summary: | No backlight control on Samsung x360 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Matthias Heinz (mh) |
Component: | Other | Assignee: | drivers_other |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | darkbasic, fengguang.wu, gordon.jin, jbarnes, lisaliaz, mark, mjg59-kernel, peter.alm, trenn, washakie, xonatius, yakui.zhao, zhenyuw |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.28-rc8 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 56331 | ||
Attachments: |
decompiled acpidump
acpidump samsung x360 ACPI Dump before updating my BIOS ACPI Dump after updating my BIOS standard config of used debian kernel lsmod output of the 2.6.26 debian standard kernel |
Created attachment 19283 [details]
decompiled acpidump
According to the acpidump output NVID belongs to the laptop and this is really a regression.
I expect the NVID is an ACPI graphics dummy device if an external nvidia card is added to the board. Since .28 these dummy devices are ignored. The ACPI graphics device which should get used on your machine is: Device (GFX0) { Name (_ADR, 0x00020000) (compare _ADR with lspci above, it matches the slot (00:02) This device has opregion support which also got added with .28: drivers/gpu/drm/i915/i915_opregion.c Strange is that the NVID device has brightness change functions (_BCM,..), but the GFX0 has not. Better provide acpidump, maybe these are hidden in a SSDT. Best you also update your BIOS first (or even better, provide acpidump, then update, then provide new acpidump. It could be interesting for someone what they changed in their ACPI tables...). Created attachment 19361 [details]
acpidump samsung x360
Here is the acpidump.
Actually there really seems to be a bios update available, but its not possible for me to flash the bios, because that file doesnt work with Linux. Shame on samsung.
I'm also having very similar issues with a Samsung R510 laptop It's currently being worked on in another bug. Least your laptop doesn't reboot when you try and manually change the brightness It could be worth while to create a small partition for Vista on the laptop just for updating the bios. The restore disk should have came with it and it's just vista without the crapware and using a tool like PartedMagic LiveCD means you won't loose your files in linux Hope this is some help A fellow frustrated Samsung customer I will see if I can find anyone with a usb cd drive, because this laptop ships without one. And it should be possible for me the resize my ext3 partition. I'd even install Windows to help getting Linux support for this laptop. Created attachment 19599 [details]
ACPI Dump before updating my BIOS
As requested by Matthias, I am enclosing an ACPI Dump before and after updating my BIOS. I'm running a Samsung X360-34P with Vista and Ubuntu 8.10.
Created attachment 19600 [details]
ACPI Dump after updating my BIOS
See markh.acpidump.before_bios_update
Thanks! As far as I can see there is just one change: -RSD PTR @ 0xf72c0 +RSD PTR @ 0xf7250 Tell me if I'm wrong, but this doesn't look like its the backlight control. Yes, that's the only change when diff'ing the 2 files. Someone else said that brightness could be adjusted in grub, but when I do that, it is overridden (set to full bright) as Ubuntu starts up. If you know how to avoid that problem, I would appreciate any tips. It would be nice to at least be able to set the brightness at boot time. Hello, I have the same problem. I am running Kubuntu Intrepid Ibex. Please let me know if I can provide some information to help. For the record: This bug only affects kernel 2.6.28. With older versions the backlight can be controled via /sys/class/backlight/NVID/brightness iirc. The NVID interface was removed for 2.6.28. The brightness keys don't send acpi commands, they send just normal keycodes (if you bind some keycodes for it). If you wanna use them, configure your windowmanager to. does "/proc/acpi/video/GFX0/DD04/brightness" work for you in 2.6.28 and 2.6.26? do you know which driver creates the "/sys/class/backlight/NVID/brightness" for you? please check if it's still loaded. Because thomas' patch doesn't remove it. this is an ACPI video problem to me. Move it to the ACPI category. "/proc/acpi/video/GFX0/DD04/brightness" does not work. Neither in 2.6.28 nor in 2.6.26. The /sys/class/backlight/NVID/* is created by the "video" driver (just in 2.6.26, not in .28) The /sys/class/backlight/NVID/* is created by the "video" driver (just in
2.6.26, not in .28)
> which is correct as you have an intel card, right?
The "/proc/acpi/video/GFX0/DD04/brightness" seem to be the correct one and it has Opregion support. Matthew pointed out that there were several issues ruled out lately related to i915 irq management AFAIK.
According to your output in the description, the irq was not incremented when you tried to the modify brightness level. I recommend to try latest .29-rcX kernel, make sure you have the Intel i915 drm and related compile options set and eventually the right module loaded (if compiled as module), again look at the /proc/dri/0/i915_gem_interrupt file then.
> The /sys/class/backlight/NVID/* is created by the "video" driver
no, it's not.
the ACPI video drivers only create /sys/class/backlight/acpi_videoX/ directories.
/sys/class/backlight/NVID/ must be created by some platform drivers, which may actual work on this laptop.
Thomas: I tried 2.6.29-rc4, doesn't work. # cat /proc/dri/0/i915_gem_interrupt Interrupt enable: 00000053 Interrupt identity: 00000000 Interrupt mask: fffedfae Pipe A stat: 00000000 Pipe B stat: 00400206 Interrupts received: 318 Current sequence: 0 Waiter sequence: 0 IRQ sequence: 0 # cat /proc/acpi/video/GFX0/DD04/brightness levels: 10 20 35 50 65 85 current: 85 # echo 10 > /proc/acpi/video/GFX0/DD04/brightness # cat /proc/dri/0/i915_gem_interrupt Interrupt enable: 00000053 Interrupt identity: 00000000 Interrupt mask: fffedfae Pipe A stat: 00000000 Pipe B stat: 00400206 Interrupts received: 318 Current sequence: 0 Waiter sequence: 0 IRQ sequence: 0 With CONFIG_DRM_I915=y Created attachment 20203 [details]
standard config of used debian kernel
This is the config of the debian prebuild kernel i use. With this kernel i get the NVID entries.
Created attachment 20204 [details]
lsmod output of the 2.6.26 debian standard kernel
Zhang Rui: There's no other driver that could create the NVID entries, just the video driver is loaded. But remember, this is from a 2.6.26 kernel. Tried 2.6.29-rc5, no change. (In reply to comment #13) > > The /sys/class/backlight/NVID/* is created by the "video" driver (just in > 2.6.26, not in .28) > hah, you must mean /proc/acpi/video/NVID/, right? the NVID I/F changes the backlight in a legacy but working way. the GFX0 I/F needs the IGD OpRegion support. But unfortunately it doesn't work on this laptop. I have a similar problem on a sony laptop. i915_gem_interrupt doesn't increase when I poking the sysfs backlight interface, and no backlight change. But the problem got fixed by upgrading the X to the latest git tree. can you please give this a try? Matthew, thomas, does the IGD OpRegion support require a newer X? Why should i need X to change my backlight? This makes no sense to me. There're still people out there using framebuffer and just terminals to work, no X to take control over the backlight. Backlight control must not depend on X. And I'm using already Xorg 1.5.99.902 on the laptop. btw: I tried 2.6.29-rc6, no change. FWIW you need to be logged in to the desktop to control the brightness in windows vista. It does not work at the login screen etc There's an easy explanation for this: The brightness keys just send normal keycodes. The drivers for those keys have to be loaded in W*nd*ws. (It's just a setkeycode in linux) this is a i915 problem as there is no interrupt when changing the backlight via IGD Opregion mechanism. re-assign to Video-drm category. Does this still exist in 2.6.31? $ uname -a Linux Harmony 2.6.31-2009.09.10 #1 SMP PREEMPT Thu Sep 10 11:09:26 CEST 2009 i686 GNU/Linux $ cat /proc/acpi/video/GFX0/DD04/brightness levels: 5 10 20 35 50 65 85 100 $ echo 10 > /proc/acpi/video/GFX0/DD04/brightness $ cat /proc/acpi/video/GFX0/DD04/brightness levels: 5 10 20 35 50 65 85 100 current: 10 And no change to the brightness. Therefore the answer is yes, it still exists in 2.6.31 (and someday I will write Samsung an email, hoping that they tell me how they wired this thing) Please try new 'samsung-laptop' kernel driver for backlight control on samsung, and recent xf86-video-intel release which contains support for adjust backlight through randr. Tried samsung-laptop and it does not work. But I'm trying to get in contact with Greg Kroah. Ok, I just received an answer from him. The samsung-laptop driver is only for laptops with a special BIOS, which Samsung made for machines comming with Linux and that more changes are needed to get this to work. Anyone with connections to Samsung here? Hello I solved the problem using compiz : I use it in french so I try to translate the settings : accessibility > Opacity, brightness and saturation > brightness > Here I set keyboard commands to up and down brightness, and at the end of the setting page I configured "specific settings for windows" this way : new > windows : any , value : 70. Hope this might be helpfull. Regards Liaz I guess this uses the so called "legacy mode" to change the brightness. This is one way, but only works within X. no idea what is the "legacy mode" :) i'm very not good at linux - simple user recently arrived from windows so ... ;) But to me compiz was exactly what I was waiting for :) With 2.6.33-rc8-git4 and x11-drivers/xf86-video-intel there is still no way to adjust screen brightness. Since I do not use compiz I cannot believe there is no way to achieve a decent power saving :( Please fix it. I meant xf86-video-intel-2.10.0, sorry for the double email. Well, to me it looks like this bug will never get closed in the intel driver, because it may be a BIOS problem. There are netbooks from Samsung and they need a special driver (called samsung-laptop) to control the backlight. It is very likely that we've got the same problem here. So, if somebody knows someone from Samsung, it would be very nice to ask, if we could get some documentation (also the wifi and led control depends on this). Has anyone still windows running on the laptop? How is the control there? I guess you need a special driver for the brightness up/down-keys. I still have a windows session (vista) and the control works perfectly well with the Fn up/down controling I opened a bug on freedesktop (https://bugs.freedesktop.org/show_bug.cgi?id=26664) and I found a trick to change brightness: # lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) # setpci -s 00:02.0 F4.B=xx (a value between 00 and FF, where FF is 100%) It would be awesome being able to change brightness in a STANDARD way like xrandr, otherwise it will not work with powerdevil (kde's power manager) except with a suid script. I found this in /var/log/messages: [ 0.148830] [Firmware Bug]: ACPI: ACPI brightness control misses _BQC function Sounds like a platform bug then, or a dupe of https://bugs.freedesktop.org/show_bug.cgi?id=26664. Unfortunately I still not tested that patch (there are much more serious bugs which bore me like https://bugs.freedesktop.org/show_bug.cgi?id=27169). Is it merged into 2.6.35-rc5? Darkbasic No, Matthew hasn't pushed it yet pending some other backlight driver work. Oops didn't mean to close this one. Try https://github.com/xonatius/samsung-backlight if bug is still present. Your patch works, thank you very much! Hi, do you know if this patch will go into the mainline kernel and when? Regards, Matthias Backlightcontrol works since 2.6.39. |
Latest working kernel version: 2.6.26 Earliest failing kernel version: Distribution: Debian/Unstable+Experimental Hardware Environment:Samsung x360, GMA X4500 Problem Description: I cant control the brightness of the backlight with a 2.6.28-rc7. It worked under mysterious circumstances with a 2.6.26. Mysterious, because i had to use /proc/acpi/video/NVID/LCD/brightness to set it, which obviously belongs to a nvidia driver (but theres nothing from nvidia in here...) I have no hardware brightness control here, the keys for brightness up/down and disable backlight just send keycodes like: atkbd.c: Unknown key pressed (translated set 2, code 0x83 on isa0060/serio0). atkbd.c: Use 'setkeycodes e003 <keycode>' to make it known. Some output you might be interessted in: # lspci -vxxx -s 00:02.0 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) (prog-if 00 [VGA controller]) Subsystem: Samsung Electronics Co Ltd Device c03e Flags: bus master, fast devsel, latency 0, IRQ 316 Memory at fc000000 (64-bit, non-prefetchable) [size=4M] Memory at d0000000 (64-bit, prefetchable) [size=256M] I/O ports at 1800 [size=8] Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+ Capabilities: [d0] Power Management version 3 00: 86 80 42 2a 07 04 90 00 07 00 00 03 00 00 80 00 10: 04 00 00 fc 00 00 00 00 0c 00 00 d0 00 00 00 00 20: 01 18 00 00 00 00 00 00 00 00 00 00 4d 14 3e c0 30: 00 00 00 00 90 00 00 00 00 00 00 00 0b 01 00 00 40: 00 00 00 00 48 00 00 00 09 00 0a 11 88 70 00 1e 50: 01 80 50 03 19 00 00 00 00 00 00 00 00 00 00 be 60: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90: 05 d0 01 00 0c 30 e0 fe 81 41 00 00 00 00 00 00 a0: 00 00 00 00 09 00 06 20 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 40 01 00 00 d0: 01 00 23 00 00 00 00 00 00 00 00 00 34 00 00 00 e0: 00 00 00 00 00 00 00 00 00 80 00 1a 41 20 00 00 f0: 09 08 34 07 ff 00 00 00 a0 0f 07 00 20 10 b6 bd # cat /proc/dri/0/i915_gem_interrupt Interrupt enable: 00000053 Interrupt identity: 00000000 Interrupt mask: fffedfae Pipe A stat: 00040000 Pipe B stat: 00400206 Interrupts received: 41 Current sequence: 180 Waiter sequence: 0 IRQ sequence: 92 Matthew Garrett asked me to do this: > Does writing a value into the /sys/class/backlight > interface result in an interrupt in the i915_gem_interrupts file? Before: # cat /proc/dri/0/i915_gem_interrupt Interrupt enable: 00000053 Interrupt identity: 00000000 Interrupt mask: fffedfae Pipe A stat: 00040000 Pipe B stat: 00400206 Interrupts received: 336 Current sequence: 13742 Waiter sequence: 0 IRQ sequence: 260 after # echo 5 > /sys/class/backlight/acpi_video0/brightness # cat /proc/dri/0/i915_gem_interrupt Interrupt enable: 00000053 Interrupt identity: 00000000 Interrupt mask: fffedfae Pipe A stat: 00040000 Pipe B stat: 00400206 Interrupts received: 336 Current sequence: 13836 Waiter sequence: 0 IRQ sequence: 260 Best regards, Matthias