Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
I upgraded my Sony Vaio VPCYA1V9E from Wheezy to Jessie. It now has these versions of packages: xserver-xorg-video-intel2:2.21.15-2+b2 amd64 linux-image-3.16.0-4-amd64 3.16.7-ckt25-1 amd64 As a test, I commented out all of /etc/X11/xorg.conf. /var/log/Xorg.0.log then showed: [166061.586] (II) intel(0): Creating default Display subsection in Screen sectio n "Default Screen Section" for depth/fbbpp 24/32 [166061.586] (==) intel(0): Depth 24, (--) framebuffer bpp 32 [166061.586] (==) intel(0): RGB weight 888 [166061.586] (==) intel(0): Default visual is TrueColor [166061.586] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics [166061.587] (**) intel(0): Relaxed fencing enabled [166061.587] (**) intel(0): Wait on SwapBuffers? enabled [166061.587] (**) intel(0): Triple buffering? enabled [166061.587] (**) intel(0): Framebuffer tiled [166061.587] (**) intel(0): Pixmaps tiled [166061.587] (**) intel(0): 3D buffers tiled [166061.587] (**) intel(0): SwapBuffers wait enabled [166061.587] (==) intel(0): video overlay key set to 0x101fe [166061.587] (II) intel(0): Output LVDS1 has no monitor section [166061.616] (--) intel(0): found backlight control interface /sys/class/backlight/acpi_video0 [166061.618] (II) intel(0): Output VGA1 has no monitor section [166061.619] (II) intel(0): Output HDMI1 has no monitor section [166061.619] (II) intel(0): Output DP1 has no monitor section As in Wheezy, the X server thought it was changing the backlight brightness, but the changes did not take effect. Unlike in Wheezy, this newer version of xserver-xorg-video-intel already supports Option "Backlight". My xorg.conf now contains only the following settings: Section "Device" Option "Backlight" "intel_backlight" Identifier "Card0" Driver "intel" BusID "PCI:0:2:0" EndSection /var/log/Xorg.0.log now shows: [166953.670] (II) intel(0): Creating default Display subsection in Screen section "Default Screen Section" for depth/fbbpp 24/32 [166953.670] (==) intel(0): Depth 24, (--) framebuffer bpp 32 [166953.670] (==) intel(0): RGB weight 888 [166953.670] (==) intel(0): Default visual is TrueColor [166953.670] (**) intel(0): Option "Backlight" "intel_backlight" [166953.670] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics [166953.709] (**) intel(0): Relaxed fencing enabled [166953.709] (**) intel(0): Wait on SwapBuffers? enabled [166953.709] (**) intel(0): Triple buffering? enabled [166953.709] (**) intel(0): Framebuffer tiled [166953.709] (**) intel(0): Pixmaps tiled [166953.709] (**) intel(0): 3D buffers tiled [166953.709] (**) intel(0): SwapBuffers wait enabled [166953.709] (==) intel(0): video overlay key set to 0x101fe [166953.709] (II) intel(0): Output LVDS1 has no monitor section [166953.709] (**) intel(0): found backlight control interface /sys/class/backlight/intel_backlight [166953.711] (II) intel(0): Output VGA1 has no monitor section [166953.712] (II) intel(0): Output HDMI1 has no monitor section [166953.712] (II) intel(0): Output DP1 has no monitor section and the backlight control is working OK. Still, it would be better if it worked out of the box, without requiring me to edit xorg.conf. On the other hand, Sony Vaio VPCYA1V9E is a bit old now (I don't know when this was manufactured, but the BIOS is from 2010), so perhaps there aren't too many new installs nowadays. pgpgP5quNeCpl.pgp Description: PGP signature
Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
package xserver-xorg-video-intel tags 651741 - fixed-upstream found 651741 xserver-xorg-video-intel/2:2.19.0-6 quit The upstream developers of xf86-video-intel denied my request to blacklist the faulty VAIO ACPI implementation. They said Linux should be patched instead. I have not yet reported the problem to the kernel bugzilla. However, later upstream versions let the system administrator override the automatic selection of a backlight control device, by adding Option Backlight to /etc/X11/xorg.conf: Section Device Option AccelMethoduxa Option Backlight intel_backlight Identifier Card0 Driver intel BusID PCI:0:2:0 EndSection This option was added in xf86-video-intel 2.20.6, and a serious bug in it was fixed in 2.20.7. The current version in Debian experimental is 2:2.20.5-1, which does not support this option. As a workaround until Linux automatically disables the useless backlight control device, I propose backporting this option. For UXA, the backport is pretty easy; please see the attached patch. For SNA, it would require more work, and I did not attempt it. To test this patch on Sony Vaio VPCYA1V9E, I built and installed xserver-xorg-video-intel 2:2.19.0-6 + this patch, created an /etc/X11/xorg.conf containing only the Device section shown above, and restarted the X server. /var/log/Xorg.0.log then showed that /sys/class/backlight/intel_backlight was being used, and I was able to control the backlight with xrandr and with key combinations. Backport the following upstream commits, but omit SNA support because it has conflicts and resolving them would too easily cause new bugs. Add a note about this Debian-specific backport in man/intel.man. Debian bug #651741 http://bugs.debian.org/651741 commit 414e87255cdee6eb556703ddefd194af71b985ed Author: Chris Wilson ch...@chris-wilson.co.uk AuthorDate: 2012-08-26 19:47:31 +0100 Commit: Chris Wilson ch...@chris-wilson.co.uk CommitDate: 2012-08-26 19:47:31 +0100 Add Option Backlight to override the probed backlight control interface The automatic selection may not correspond with the correct backlight (such as in a multi-gpu, multi-panel device) or the user may simply prefer another control interface. This allows them to override the chosen interface using Option Backlight my-backlight to specify '/sys/class/backlight/my-backlight' as the interface to use instead. Suggested-by: Alon Levy al...@redhat.com References: https://bugs.freedesktop.org/show_bug.cgi?id=29273 Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk commit 164ae7a4f9fd3e538f1b506031d297088fc0c659 Author: Chris Wilson ch...@chris-wilson.co.uk AuthorDate: 2012-09-02 17:19:12 +0100 Commit: Chris Wilson ch...@chris-wilson.co.uk CommitDate: 2012-09-02 17:20:19 +0100 man: Malformed Backlight section Reported-by: Matthew Monaco dgbale...@0x01b.net Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54397 Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk commit 3dc644b2a959fc559e1138b332ed42d7235de42f Author: Сковорода Никита Андреевич chalk...@gmail.com AuthorDate: 2012-09-03 13:44:21 +0400 Commit: Chris Wilson ch...@chris-wilson.co.uk CommitDate: 2012-09-03 23:09:08 +0100 uxa: Fix Backlight option support. Signed-off-by: Сковорода Никита Андреевич chalk...@gmail.com commit 886f3cef4101a674bb62656cf7f3046643cae4b1 Author: Chris Wilson ch...@chris-wilson.co.uk AuthorDate: 2012-09-05 15:27:21 +0100 Commit: Chris Wilson ch...@chris-wilson.co.uk CommitDate: 2012-09-05 15:27:21 +0100 uxa: Fix cut'n'paste error in Option Backlight Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Index: xserver-xorg-video-intel-2.19.0/man/intel.man === --- xserver-xorg-video-intel-2.19.0.orig/man/intel.man 2012-10-21 15:30:31.268126472 +0300 +++ xserver-xorg-video-intel-2.19.0/man/intel.man 2012-10-21 15:35:27.360135750 +0300 @@ -138,6 +138,18 @@ .IP Default: Textured video adaptor is preferred. .TP +.BI Option \*qBacklight\*q \*q string \*q +Override the probed backlight control interface. Sometimes the automatically +selected backlight interface may not correspond to the correct, or simply +most useful, interface available on the system. This allows you to override +that choice by specifying the entry under /sys/class/backlight to use. +.IP +Default: Automatic selection. +.IP +Debian-specific: This option was backported from upstream release 2.20.7. +Because SNA support was omitted in this backport, the option has no effect +if AccelMethod is sna. +.TP .BI Option \*qFallbackDebug\*q \*q boolean \*q Enable printing of debugging information on acceleration fallbacks to the server log. Index: xserver-xorg-video-intel-2.19.0/src/intel_display.c
Processed: Re: Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Processing commands for cont...@bugs.debian.org: package xserver-xorg-video-intel Limiting to bugs with field 'package' containing at least one of 'xserver-xorg-video-intel' Limit currently set to 'package':'xserver-xorg-video-intel' tags 651741 - fixed-upstream Bug #651741 [xserver-xorg-video-intel] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Removed tag(s) fixed-upstream. found 651741 xserver-xorg-video-intel/2:2.19.0-6 Bug #651741 [xserver-xorg-video-intel] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Marked as found in versions xserver-xorg-video-intel/2:2.19.0-6. quit Stopping processing here. Please contact me if you need assistance. -- 651741: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.135082655612753.transcr...@bugs.debian.org
Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
It seems adding only one kernel parameter acpi_backlight=vendor also works on my G360 now. But, both methods of adding kernel parameters will stop work occasionly. The detail of my case see: Bug 44809 - [Arrandale backlight] Brightness via RANDR has no effect on Sony VAIO VPCYA1V9E: https://bugs.freedesktop.org/show_bug.cgi?id=44809 2012/6/12 littlebat dashing.m...@gmail.com Added acpi_backlight=vendor acpi_osi=linux video.brightness_switch_enabled=1 into grub boot kernel parameters, Fn + Up/Down to change brigtness works on my G360. It's no need to write a Udev rules like my previous method.
Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Added acpi_backlight=vendor acpi_osi=linux video.brightness_switch_enabled=1 into grub boot kernel parameters, Fn + Up/Down to change brigtness works on my G360. It's no need to write a Udev rules like my previous method.
Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Hi, I think I found a easy and least effect to the existed things' way for adjusting intel_backlight using udev rules. I noticed change action of backlight subsystem when I press Fn + PgUp/PgDn on my lenovo G360 + 3.2 Kernel notebook. So I wrote a rules of /etc/udev/rules.d/99-writeintelbacklight.rules as below: ACTION==change, SUBSYSTEM==backlight, RUN+=/usr/sbin/writeintelbacklight.sh A shell: /usr/sbin/writeintelbacklight.sh #!/bin/bash intelmaxbrightness=`cat /sys/class/backlight/intel_backlight/max_brightness` acpimaxbrightness=`cat /sys/class/backlight/acpi_video0/max_brightness` scale=`expr $intelmaxbrightness / $acpimaxbrightness` acpibrightness=`cat /sys/class/backlight/acpi_video0/brightness` newintelbrightness=`expr $acpibrightness \* $scale` curintelbrightness=`cat /sys/class/backlight/intel_backlight/actual_brightness` if [ $newintelbrightness -ne $curintelbrightness ] then echo $newintelbrightness /sys/class/backlight/intel_backlight/brightness fi exit 0 Of course, you need do a sudo chmod +x /usr/sbin/writeintelbacklight.sh
Processed: Re: Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Processing commands for cont...@bugs.debian.org: package xserver-xorg-video-intel Limiting to bugs with field 'package' containing at least one of 'xserver-xorg-video-intel' Limit currently set to 'package':'xserver-xorg-video-intel' found 651741 2:2.18.0-2 Bug #651741 [xserver-xorg-video-intel] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Marked as found in versions xserver-xorg-video-intel/2:2.18.0-2. quit Stopping processing here. Please contact me if you need assistance. -- 651741: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.13358483442057.transcr...@bugs.debian.org
Processed: Re: Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Processing commands for cont...@bugs.debian.org: package xserver-xorg-video-intel Limiting to bugs with field 'package' containing at least one of 'xserver-xorg-video-intel' Limit currently set to 'package':'xserver-xorg-video-intel' found 651741 2:2.18.0-1 Bug #651741 [xserver-xorg-video-intel] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Bug Marked as found in versions xserver-xorg-video-intel/2:2.18.0-1. quit Stopping processing here. Please contact me if you need assistance. -- 651741: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.133158880115052.transcr...@bugs.debian.org
Processed (with 1 errors): Re: Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Processing commands for cont...@bugs.debian.org: package gnome-power-manager Limiting to bugs with field 'package' containing at least one of 'gnome-power-manager' Limit currently set to 'package':'gnome-power-manager' reassign 651741 xserver-xorg-video-intel Bug #651741 [gnome-power-manager] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Bug reassigned from package 'gnome-power-manager' to 'xserver-xorg-video-intel'. package: xserver-xorg-video-intel' does not match at least one of gnome-power-manager Failed to clear fixed versions and reopen on 651741: limit failed for bugs: 651741. quit Stopping processing here. Please contact me if you need assistance. -- 651741: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.132663246116969.transcr...@bugs.debian.org
Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
package xserver-xorg-video-intel tags 651741 + patch quit Kalle Olavi Niemitalo k...@iki.fi writes: (b) PCI subsystem. Here, lspci -vn shows: 00:02.0 0300: 8086:0046 (rev 02) (prog-if 00 [VGA controller]) Subsystem: 104d:907c intel_driver.h defines the SUBVENDOR_ID and SUBSYS_ID macros, which intel_output_backlight_init could use on intel_get_screen_private(output-scrn)-PciInfo. I implemented this in the following patch. It makes xserver-xorg-video-intel correctly use intel_backlight on my Sony VAIO VPCYA1V9E, so that gnome-power-manager can then control the brightness. I have not tested on other computers, especially not on other VAIO models. Perhaps the upstream maintainer will eventually choose a different solution; but until then, I think including this patch in the Debian package would help VAIO users. Index: xserver-xorg-video-intel-2.17.0/src/intel_display.c === --- xserver-xorg-video-intel-2.17.0.orig/src/intel_display.c2012-01-15 15:38:03.0 +0200 +++ xserver-xorg-video-intel-2.17.0/src/intel_display.c 2012-01-15 15:56:32.0 +0200 @@ -118,7 +118,8 @@ #define BACKLIGHT_CLASS /sys/class/backlight /* - * List of available kernel interfaces in priority order + * List of available kernel interfaces in priority order. + * May be overridden by a model-specific workaround. */ static const char *backlight_interfaces[] = { asus-laptop, @@ -240,28 +241,55 @@ return max; } +static Bool +intel_output_backlight_probe(xf86OutputPtr output, const char *iface) +{ + struct intel_output *intel_output = output-driver_private; + char path[BACKLIGHT_PATH_LEN]; + struct stat buf; + + sprintf(path, %s/%s, BACKLIGHT_CLASS, iface); + if (!stat(path, buf)) { + intel_output-backlight_iface = iface; + intel_output-backlight_max = intel_output_backlight_get_max(output); + if (intel_output-backlight_max 0) { + intel_output-backlight_active_level = intel_output_backlight_get(output); + xf86DrvMsg(output-scrn-scrnIndex, X_INFO, + found backlight control interface %s\n, path); + return TRUE; + } + } + + return FALSE; +} + static void intel_output_backlight_init(xf86OutputPtr output) { struct intel_output *intel_output = output-driver_private; + intel_screen_private *intel = intel_get_screen_private(output-scrn); int i; - for (i = 0; backlight_interfaces[i] != NULL; i++) { - char path[BACKLIGHT_PATH_LEN]; - struct stat buf; + /* Debian bug 651741: With Linux 3.1.0 on Sony VAIO VPCYA1V9E, +* both acpi_video0 and intel_backlight exist and can be +* adjusted, but only intel_backlight affects the display. +*/ + if (VENDOR_ID(intel-PciInfo) == 0x8086 /* Intel */ +DEVICE_ID(intel-PciInfo) == PCI_CHIP_IRONLAKE_M_G +CHIP_REVISION(intel-PciInfo) == 0x02 +SUBVENDOR_ID(intel-PciInfo) == 0x104d /* Sony */ +SUBSYS_ID(intel-PciInfo) == 0x907c) { + xf86DrvMsg(output-scrn-scrnIndex, X_INFO, + will prefer intel_backlight on this Sony VAIO model\n); + if (intel_output_backlight_probe(output, intel_backlight)) + return; + } - sprintf(path, %s/%s, BACKLIGHT_CLASS, backlight_interfaces[i]); - if (!stat(path, buf)) { - intel_output-backlight_iface = backlight_interfaces[i]; - intel_output-backlight_max = intel_output_backlight_get_max(output); - if (intel_output-backlight_max 0) { - intel_output-backlight_active_level = intel_output_backlight_get(output); - xf86DrvMsg(output-scrn-scrnIndex, X_INFO, - found backlight control interface %s\n, path); - return; - } - } + for (i = 0; backlight_interfaces[i] != NULL; i++) { + if (intel_output_backlight_probe(output, backlight_interfaces[i])) + return; } + intel_output-backlight_iface = NULL; } pgpOZ7AnesZmm.pgp Description: PGP signature
Processed: Re: Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Processing commands for cont...@bugs.debian.org: package xserver-xorg-video-intel Limiting to bugs with field 'package' containing at least one of 'xserver-xorg-video-intel' Limit currently set to 'package':'xserver-xorg-video-intel' tags 651741 + patch Bug #651741 [xserver-xorg-video-intel] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Added tag(s) patch. quit Stopping processing here. Please contact me if you need assistance. -- 651741: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.13266370545238.transcr...@bugs.debian.org
Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Hi Kalle, Kalle Olavi Niemitalo k...@iki.fi (15/01/2012): I implemented this in the following patch. […] many thanks for that. Perhaps the upstream maintainer will eventually choose a different solution; but until then, I think including this patch in the Debian package would help VAIO users. It would be very nice if you could submit your patch upstream (bugs.freedesktop.org, product xorg, component Driver/intel), let us know about the bug number/URL, so that we can track upstream's comments, and possibly include it in Debian if that looks OK. I'd rather not break other people's driver without an upstream review. Mraw, KiBi. signature.asc Description: Digital signature
Processed: Re: Bug#651741: gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E
Processing commands for cont...@bugs.debian.org: package xserver-xorg-video-intel Limiting to bugs with field 'package' containing at least one of 'xserver-xorg-video-intel' Limit currently set to 'package':'xserver-xorg-video-intel' forwarded 651741 https://bugs.freedesktop.org/show_bug.cgi?id=44809 Bug #651741 [xserver-xorg-video-intel] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Set Bug forwarded-to-address to 'https://bugs.freedesktop.org/show_bug.cgi?id=44809'. tags 651741 + upstream Bug #651741 [xserver-xorg-video-intel] gnome-power-manager: display backlight brightness has no effect on Sony Vaio VPCYA1V9E Added tag(s) upstream. quit Stopping processing here. Please contact me if you need assistance. -- 651741: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.1326651597603.transcr...@bugs.debian.org