set /proc/acpi/video/*/DOS to 4 by default instead of 0

Bug #458982 reported by Steve Langasek
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Andy Whitcroft

Bug Description

acpi_video_bus_start_devices() in drivers/acpi/video.c sets the default ACPI DOS value to 0, which lets the OS handle toggling of display output but still leaves the BIOS handling brightness levels automatically when connecting/disconnecting AC.

We want the OS to handle both where possible, so a better default would be to set this to 4, which can be done with a one-liner change:

- return acpi_video_bus_DOS(video, 0, 0);
+ return acpi_video_bus_DOS(video, 0, 1);

The one problem with doing this is that, if the system uses proprietary video drivers, we don't have this brightness control so we need to let the BIOS do it instead. But the kernel default should be optimized for the common case, and we should reset this from 4 to 0 only when the proprietary video drivers need us to (via a udev rule, in the X driver's packaging, etc).

In jaunty and earlier, this bit was set by default for intel and ati chips via the hotkey-setup package, which is now obsolete; so I believe that technically there's a regression here in karmic - but fixing that without breaking other systems that already work as intended would be non-trivial, so we should just fix this in lucid instead.

Matthew Garrett explains the rationale for originally setting this only on intel and ati:

<mjg59> The reason hotkey-setup did that check was because only a subset of drivers supported xrandr 1.2
<mjg59> And for drivers that didn't, it was arguably better to leave it under firmware control than to send the event

<mjg59> In Fedora we've just ended up patching the kernel
<mjg59> In principle that may reduce the functionality on some hardware
<mjg59> But only really stuff running closed drivers

<mjg59> We use 4 by default

ProblemType: Bug
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: vorlon 6116 F.... pulseaudio
 /dev/snd/pcmC0D0p: vorlon 6116 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xee240000 irq 17'
   Mixer name : 'Analog Devices AD1981'
   Components : 'HDA:11d41981,17aa2025,00100200'
   Controls : 20
   Simple ctrls : 11
Date: Fri Oct 23 03:56:00 2009
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=f108133c-6b9d-4d28-9058-0b3a0c5549b4
Lsusb:
 Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: LENOVO 6371CTO
Package: linux-image-2.6.31-14-generic 2.6.31-14.48
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: root=/dev/mapper/hostname-root ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
RelatedPackageVersions:
 linux-backports-modules-2.6.31-14-generic N/A
 linux-firmware 1.24
SourcePackage: linux
Uname: Linux 2.6.31-14-generic x86_64
WpaSupplicantLog:

dmi.bios.date: 12/27/2006
dmi.bios.vendor: LENOVO
dmi.bios.version: 7IET23WW (1.04 )
dmi.board.name: 6371CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7IET23WW(1.04):bd12/27/2006:svnLENOVO:pn6371CTO:pvrThinkPadT60:rvnLENOVO:rn6371CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 6371CTO
dmi.product.version: ThinkPad T60
dmi.sys.vendor: LENOVO

CVE References

Revision history for this message
Steve Langasek (vorlon) wrote :
Changed in linux (Ubuntu):
milestone: none → later
importance: Undecided → Medium
tags: added: regression-potential
Andy Whitcroft (apw)
tags: added: kernel-lucid
Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → Triaged
tags: added: regression-release
removed: regression-potential
Andy Whitcroft (apw)
Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
status: Triaged → In Progress
Revision history for this message
Andy Whitcroft (apw) wrote :

Ok, I've spun a patch do this and built test kernels. Could those of you who are affected by this issue test these kernels and report back here. The kernels can be found at the URL below:

    http://people.canonical.com/~apw/lp458982-karmic/

Revision history for this message
Steve Langasek (vorlon) wrote :

Andy,

Effectively, *all* laptop users are affected by this issue. I recommend getting this change into the lucid kernel ASAP so we get broad-spectrum testing of the change.

Andy Whitcroft (apw)
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
milestone: later → lucid-alpha-1
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.32-7.9

---------------
linux (2.6.32-7.9) lucid; urgency=low

  [ Andy Whitcroft ]

  * SAUCE: set /proc/acpi/video/*/DOS to 4 by default
    - LP: #458982
  * SAUCE: ensure vga16fb loads if no other driver claims the VGA device
  * [Config] update configs following versatile switch to V7
  * rebased to v2.6.32
  * [Config] update configs following rebase to v2.6.32
  * [Config] update ports configs following rebase to v2.6.32
  * SAUCE: default ATI Radeon KMS to off until userspace catches up

  [ Arjan van de Ven ]

  * SAUCE: vfs: Add a trace point in the mark_inode_dirty function

  [ Leann Ogasawara ]

  * [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable
    permissions
    - CVE-2009-3939

  [ Loic Minier ]

  * SAUCE: select a v7 CPU for versatile

  [ Takashi Iwai ]

  * SAUCE: ALSA: hda - Add power on/off counter

  [ Upstream changes ]

  * rebased to v2.6.32
 -- Andy Whitcroft <email address hidden> Fri, 04 Dec 2009 10:44:50 +0000

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.