Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237300 - [post-2.6.24 regression] display brightness is backwards
Summary: [post-2.6.24 regression] display brightness is backwards
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: linux-2.6.??-regression
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-10 10:25 UTC by Andrew Cowie
Modified: 2008-11-26 10:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cowie 2008-09-10 10:25:35 UTC
I upgraded my kernel today to sys-kernel/gentoo-sources 2.6.26-r1 from 2.6.24-r8 or so. Everything seems to have gone well, except that (of all things) the LCD brightness on my laptop has been inverted.

Now, if I use the brightness up (a Fn key combination of the [ASUS] laptop keyboard) the display dims. If I brightness down, it gets brighter. GNOME (gnome-power-manager)'s brightness applet is likewise inverted - I have a nice bright screen right now and the brightness is cranked down to 0.

Weird.

Hard to know what this really is or where to report this. I've started here as a kernel bug, as this was working before I upgraded, but you can of course refile it as you wish.

It's an ASUS A8S laptop if that matters.

AfC



Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.6.1-r0, 2.6.26-gentoo-r1 i686)
=================================================================
System uname: 2.6.26-gentoo-r1 i686 Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
Timestamp of tree: Tue, 09 Sep 2008 21:16:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-ggdb -O2 -march=nocona -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-ggdb -O2 -march=nocona -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks metadata-transfer sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.internode.on.net/pub/gentoo/"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apache2 avahi berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam fbsplash firefox fortran gdbm gif gnome gstreamer gtk hal iconv isdnlog java jpeg libnotify mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authz_default authz_owner authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires file_cache filter headers log_config mem_cache mime mime_magic negotiation rewrite setenvif so unique_id userdir vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="synaptics evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Pagano gentoo-dev 2008-09-11 00:39:36 UTC
Similar upstream report: 
http://bugzilla.kernel.org/show_bug.cgi?id=11396

Can you check for a BIOS update.
Comment 2 Andrew Cowie 2008-09-11 06:46:29 UTC
Wilco.

(er how?)

... but if this wasn't broken yesterday with an older kernel, and today it is with a newer kernel, how is that a BIOS problem?

[yes, I read the "we won't change" comment in the Kernel bug, but even assuming it is relevant I'm still unclear on how the unchanged BIOS here is relevant, unless this is a case of they "fixed" themselves to be "more correct" thus breaking me]

AfC
Comment 3 Mike Pagano gentoo-dev 2008-09-16 00:14:47 UTC
(In reply to comment #2)
> unless this is a case of they "fixed" themselves to be "more correct" thus
> breaking me]
> 

That's what I'm thinking
Comment 4 Andrew Cowie 2008-09-25 09:22:56 UTC
So I did the BIOS upgrade, and the problem is still extant.

I should mention that my earlier description wasn't _quite_ right; the brightness down hotkey does indeed send the brightness down, but the progress bar in the popup on-screen display and the slider in the Brightness Applet are both backwards - as I dim the screen with brightness down the slider and/or OSD show "fully bright".

AfC
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2008-11-25 13:41:04 UTC
On an affected kernel, please go into /proc/acpi/video and look for brightness files:

 # cd /proc/acpi/video
 # find . -name brightness

Then cat each one and post the results to this bug.


Please also attach acpidump output (doesn't matter which kernel you are running)
Comment 6 Sergey Ovcharenko 2008-11-25 23:03:19 UTC
Please post your kernel .config and output of the lsmod command. 

Have a look if you have 
/sys/class/backlight/asus/actuall_brightness in case 
or
/sys/class/backlight/asus-laptop/actuall_brightness in case 
and/or
/sys/class/backlight/acpi-video0/actuall_brightness 
files and which of them is modified by the key combination and the gnome applet.

I figured out that that using asus_acpi and asus_laptop modules seems to solve the problem.
testing kernels 2.6.26-r1 and 2.6.27-r3 and showed that
/sys/class/backlight/acpi-video0/actuall_brightness is inverted while 
/sys/class/backlight/asus/actuall_brightness and /sys/class/backlight/asus-laptop/actuall_brightness seem to be ok.
 
Comment 7 Andrew Cowie 2008-11-26 01:17:03 UTC
(In reply to comment #5)

>  # cd /proc/acpi/video
>  # find . -name brightness

./VGA/LCDD/brightness
./VGA/TVOD/brightness
./VGA/CRTD/brightness
./VGA/DVID/brightness
./VGA/LCDD/brightness
./VGA/TVOD/brightness
./VGA/CRTD/brightness
./VGA/DVID/brightness


(as an aside, I note duplication there. There are *two* subdirectories in /proc/acpi/video called "VGA". WTF?)

> Then cat each one and post the results to this bug.

# for i in `find . -name brightness`
do 
echo $i
echo ===================== ; echo
cat $i
echo
done

./VGA/LCDD/brightness
=====================

levels:  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
current: 12

./VGA/TVOD/brightness
=====================

<not supported>

./VGA/CRTD/brightness
=====================

<not supported>

./VGA/DVID/brightness
=====================

<not supported>

./VGA/LCDD/brightness
=====================

levels:  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
current: 12

./VGA/TVOD/brightness
=====================

<not supported>

./VGA/CRTD/brightness
=====================

<not supported>

./VGA/DVID/brightness
=====================

<not supported>



> Please also attach acpidump output (doesn't matter which kernel you are
> running)


[Um, sorry what package is that command found in? Don't seem to have it on this system]

AfC
Comment 8 Andrew Cowie 2008-11-26 01:24:04 UTC
(In reply to comment #6)
> Please post your kernel .config and output of the lsmod command. 

Ok, you could have just asked me to double check that CONFIG_ACPI_ASUS was set. I would have knee jerk responded yes, because I set it in the past, but then I would have double checked, being a good little boy and all that.

Before that, though,

> Have a look if you have 
> /sys/class/backlight/asus/actuall_brightness in case 
> or
> /sys/class/backlight/asus-laptop/actuall_brightness in case 
> and/or
> /sys/class/backlight/acpi-video0/actuall_brightness 

I looked, and although I have acpi-video0 I do not have asus and asus-laptop there. WTF? 

So then I looked back at my kernel config, and gee,

# CONFIG_ACPI_ASUS is not set

what the hell?!? Why that's off I don't know. In fact, I'm quite annoyed. I *know* for a fact it was on in older kernels because I just looked at my backups. So let me rebuild right now and see if that changes things. I'm betting it will :(

> testing kernels 2.6.26-r1 and 2.6.27-r3 and showed that
> /sys/class/backlight/acpi-video0/actuall_brightness is inverted while 
> /sys/class/backlight/asus/actuall_brightness and
> /sys/class/backlight/asus-laptop/actuall_brightness seem to be ok.

Interesting.

Be right back.

AfC
Comment 9 Andrew Cowie 2008-11-26 01:29:59 UTC
(err, I guess we actually want CONFIG_ASUS_LAPTOP? I'll try that first. And I bet the ! relationship between that and CONFIG_ACPI_ASUS is what caused my problem here. Dunno for sure)

AfC
Comment 10 Andrew Cowie 2008-11-26 01:49:56 UTC
Ok. All fixed.

I'll say "sorry to waste your time" because I am, but on the other hand, the relationship between those two kernel config options is interesting. I found in `make menuconfig` that if you have CONFIG_ACPI_ASUS selected you aren't offered CONFIG_ASUS_LAPTOP at all. It just doesn't show up.

[Admittedly, the description for the former says "deprecated" in it, but since you a) hit it first in a kernel config, b) might have it around legacy, and c) it says "use asus-laptop instead" not "select n here and select y for CONFIG_ASUS_LAPTOP instead" it'd be easy for others to trip over]

In my case, why both were off is beyond me. I'm going to blame a cosmic ray strike.

Still, I really appreciate the input everyone offered on this one; the pointer to peek into /sys/class/backlight is what got me moving in the right direction. For completeness, I now have:

/sys/class/backlight/acpi_video0
/sys/class/backlight/acpi_video1
/sys/class/backlight/asus-laptop

the actual_brigtness in acpi_video0 is indeed inverted. The actual_brightness in asus-laptop is showing "correct" values. I also note that I don't have both asus-laptop and asus in there, which I imagine is a result of not being able to have both selected. That inhibition is a recent thing? Maybe something that happened in 2.6.26? Dunno.

Anyway, as of 2.6.27-gentoo-r4 (what I'm running now) CONFIG_ASUS_LAPTOP in Device Drivers -> Miscallaneous =y and CONFIG_ACPI_ASUS in Power Management ... =n seems to have done the trick.

So. That's that. If at this point you're still interested in .config and lspci etc I can certainly c&p them in here. Let me know? Meanwhile I'll close this INVALID.

AfC
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2008-11-26 10:10:32 UTC
Great, thanks for investigating. Indeed it is odd how one option gets hidden while the other is selected, but that does seem to be deliberate. We'll call this closed, no need to post more info.