LCD brighness hotkeys do not work in Darter

Bug #114677 reported by cboettig on 2007-05-14
18
Affects Status Importance Assigned to Milestone
System76
Medium
Unassigned

Bug Description

Pressing Fn-F5 Fn-F6 does not dim/brighten LCD screen. Screen brightness can be adjusted by software (i.e. under power management).

Thomas Aaron (tom-system76) wrote :

It seems that this bug is true for some Darters and not for others. We have, however, been able to duplicate it on our test Darter.

Below is temporary work-around that will allow you to adjust your LCD brightness with the F5 and F6 keys (albeit without using the Fn key in combination with them). It will also allow you to turn up your screen brightness after resuming from suspend. (Please see Bug #114675 for details.)

Below are instructions for the temporary work-around:

1. Download onto your Desktop each of the three files attached to this bug report.

Thomas Aaron (tom-system76) wrote :
Thomas Aaron (tom-system76) wrote :

Sorry, guys. I continue...

1. Download brightup.sh and brightdown.sh onto your Desktop (in the two posts above)

2. From a terminal, type:

sudo apt-get install xbindkeys xbindkeys-config
sudo cp ~/Desktop/brightup.sh ~/Desktop/brightdown.sh /usr/bin
sudo chmod a+rwx /usr/bin/brightup.sh
sudo chmod a+rwx /usr/bin/brightdown.sh

3. Go to System > Preferences > Sessions. Click the Startup Tab. Then click New.
In the Name field, type: xbindkeys
In the Command field, type: xbindkeys
Click OK
Click Close

4. Then configure xbindkeys as follows:
From a terminal type:
gedit ~/.xbindkeysrc

Replace EVERYTHING in that file (there may be nothing at all in it...) with the following lines, save the file, and restart your computer. You will now be able to control the LCD brightness with your F5 and F6 keys.

###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...

#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable

#LCD Brightness Down
"/usr/bin/brightdown.sh"
   F5

#LCD Brightness Up
"/usr/bin/brightup.sh"
   F6

#
# End of xbindkeys configuration

Anita (a-lewis) wrote :

I'm curious. When I run xev, should the Fn key produce output there. For example: pressing the left Ctrl button produces output that includes "keycode 37" and "Control_L". The Fn button produces nothing.

I tried it, but it didn't have any noticeable effect...

Hi, Anita.

No, I've tried that to no avail.
You know the Fn key is creating output since it works with other hotkey combinations.
But, I'm not yet sure how to capture that output. It is tightly tied with acpi and hal functionality though.

Best,
Tom

----- Original Message -----
From: "Anita" <email address hidden>
To: <email address hidden>
Sent: Monday, May 14, 2007 6:50:44 PM (GMT-0700) America/Denver
Subject: [Bug 114677] Re: LCD brighness hotkeys do not work in Darter

I'm curious. When I run xev, should the Fn key produce output there.
For example: pressing the left Ctrl button produces output that includes
"keycode 37" and "Control_L". The Fn button produces nothing.

--
LCD brighness hotkeys do not work in Darter
https://bugs.launchpad.net/bugs/114677
You received this bug notification because you are a direct subscriber
of the bug.

Bret Towe (magnade) wrote :

I don't have my laptop with me at the moment but I am seeing this issue also
one thing I did notice tho was in dmesg there are some acpi errors
this is no doubt the issue that causes it to not work right
if someone doesn't beat me to it I'll post the errors when I get to my laptop
and have a few minutes

cboettig (cboettig) wrote :

The workaround appears successful for me in that I can now adjust brightness with f5/f6 keys. The range of brightnesses appears a little less than that of the power setting meter or the panel applet. Also, the applet status is not updated when screen brightness is adjusted using the keys. More significant, it does not seem to solve the suspend issue for me, Bug #114675.

sherrardb (sburton-launchpad) wrote :

this worked great for me also, as far as adjusting the brightness, but also didn't resolve all my suspend/resume. i hope to soon have more information so that i can post a follow-up on Bug #114675.

regarding the above post concerning xev, i'm not surprised that the fn key by itself doesn't produce a keycode, but what did surprise me is that the fn+f5/f6 combination did not produce any output in xev or /var/log/acpid, where the other fn+f[0-9] keys did. i wonder if that means that the bios is "swallowing" these two events or if they are being subverted in some other place/way that prevents acpid and xev from ever receiving them?

cboettig (cboettig) wrote :

I just did a fresh install of kubuntu (for random reasons). Now when I suspend I can restore, and simply have to brighten my screen again. I can also hibernate successfully now.

(I had KDE and gnome installed previously, and could not suspend at all from either gnome/gdm or kde/kdm).)

-Carl

cboettig (cboettig) wrote :

More observations:
I recover from hibernate but my wireless card is not even detected. Turning the switch on and off brings bluetooth on and off, but no wireless. iwconfig does not display the card either. In addition, my computer does not recognize that it is plugged in to external power (i.e. brightness is controlled under power management by the battery-power slider, and it reports that its running off of batteries, even though it displays the charge icon).

sherrardb (sburton-launchpad) wrote :

i'm glad to hear that a fresh install worked for you. i have been contemplating that, as i assumed that my problems were related to my switch to xubuntu, even though after i switched back to gnome, things weren't any better. out of curiosity, what graphics driver are you using and what package is it supplied by?

for example, the pertinent section in my xorg.conf is:

Section "Device"
        Identifier "Intel Corporation Mobile Integrated Graphics Controller"
        Driver "i810"
EndSection

and to find the package that the video driver came from i did:
% dpkg -S i810_drv.so

which returned:
xserver-xorg-video-intel: /usr/lib/xorg/modules/drivers/i810_drv.so

I figure I'd add that my system is not recovering from suspend and it's a brand new Darter, so I doubt a reinstall would help (as it didn't work with a brand new install)

The fix does let me adjust the brightness, but this isn't helping me with the suspend problems.

cboettig (cboettig) wrote :

I'm using the same video driver, i810. From my xorg.conf:

Section "Device"
        Identifier "Intel Corporation Mobile Integrated Graphics Controller"
        Driver "i810"
EndSection

I was having the problem on a brand new darter right out of the box on Friday (5-11-07). I did a fresh install (wanted kde and wanted separate partition for home), this fixed both the suspend and hibernate (though hibernate loses my wireless driver, not just the connection). Now I can suspend and adjust the brightness problem using the work-around above. Before the fresh install, I had the same issue Christopher and sherrardb have, with suspend not working at all.

Still a few mysteries, but with suspend working and the brightness work-around I'm very happy.

-Carl

sherrardb (sburton-launchpad) wrote :

Carl, what about the results of the command?
% dpkg -S i810_drv.so

the reason i ask is because that driver is supplied by two different packages, and i have seen different behavior depending on which version i'm using.

also, and believe me i'm not advocating this, but i was able to get the brightness keys working without the work around by flashing to the latest bios, version 305 (z35f305ag.zip). it was a bit of a white-knuckle experience. the built-in utility within the bios is basically a simple text-based directory navigator and file selector. but since it doesn't support usb, cdrom, or secondary hard drive, you basically have to have some kind of windows partition near the front of your hard drive. i have a fat32 partition near the end of the drive that it didn't even see. surprisingly enough, it can read ntfs. and i have one of those about 10G from the front of the drive. so i downloaded and extracted the bios update, then rebooted and pressed f4 to get into the update utility. once there, i selected the file, z35fag.305, then after it started to apply the update, in a moment of stupidity, i turned my attention away for a few seconds. well when i turned back the laptop had powered itself down. why, i didn't know. so i gritted my teeth and pressed the power button. after way too many seconds of just the fan spinning, it finally brought up the post screen. so i exhaled, said a little prayer of thanksgiving, and went in to confirm the bios settings. after that i booted up, killed off xbindkeys, and tested my brightness keys. i don't know if this also fixes anything else, but i am still working on my suspend/resume issues.

cboettig (cboettig) wrote :

Oh, right:

cboettig@wiglaf:~/documents$ dpkg -S i810_drv.so
xserver-xorg-video-i810: /usr/lib/xorg/modules/drivers/i810_drv.so

I see what you mean by white-knuckles. Not I'm that brave, and don't have the shred of a windows partition on this machine anyway. Doesn't sound like a task for wine either... Good luck, let me know how it goes.

-cboettig

sherrardb (sburton-launchpad) wrote :

that's interesting. i had better, but not satisfactory, results with the driver from xserver-xorg-video-intel, which i think is newer.

as for the bios update, i am really enjoying my native use of those keys. one big gain is that you don't have to be logged into an x session like with the xbindkeys solution. for instance, they change the brightness even when i'm just logged into a tty, or at the gdm login screen.

Bret Towe (magnade) wrote :

below are the errors I see in dmesg when hitting brightness keys
first 2 should be brightness down last 2 brightness up

I wouldn't be surprised if the only fix is a bios update

[ 704.292205] ACPI Error (psargs-0355): [\_SB_.PCI0.P0P2.VGA_.LCDD] Namespace lookup failure, AE_NOT_FOUND
[ 704.292221] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC0_._Q0E] (Node de98dc20), AE_NOT_FOUND
[ 704.932885] ACPI Error (psargs-0355): [\_SB_.PCI0.P0P2.VGA_.LCDD] Namespace lookup failure, AE_NOT_FOUND
[ 704.932899] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC0_._Q0F] (Node de98f75c), AE_NOT_FOUND

Ok, as I posted in Bug #114675 I have this work-around working for me now.

I'm also wondering, for people who's laptops have worked 'out of the box' how are their acpi-support files set (the relevant settings for me are as shown in the other thread)? I'd like to pin-point the root cause of this.

My system BIOS is v302
VGA BIOS 1256.I06107.006

I've also wondered if it's a BIOS version dependent issue like someone else suggested.

Oh, and if you'd like to avoid having to hit the F5/F6 to turn your screen back on put the attached script in your /etc/acpi/resume.d directory.

It's a hacked out version of the brightup.sh script posted earlier.

sherrardb (sburton-launchpad) wrote :

my experience is that putting any value into that file will bring the brightness back up. so in theory something like this, which is also attached, should work without actually changing your previous setting.

#!/bin/sh
#filename: brightrestore.sh

brtNum=`cat /proc/acpi/asus/brn`
echo $brtNum > /proc/acpi/asus/brn

i say should because as i just went to test it, it came out of suspend and the brightness came back up without any input on my part. this is anomalous, but promising.

...okay, after suspending again i found that re-placing the current brightness value does have the desired effect.

sherrardb (sburton-launchpad) wrote :

ps--Christopher, how did you check the vga bios version? i'm just wondering if different vga bios versions would account for the occasional xorg i810 driver problems that were causing me to not resume cleanly.

Anita (a-lewis) wrote :

I've been looking at /etc/acpi/events and wondering why there is nothing for asus brightness:

I see several asus things like asus-mail which work. I also see stuff for sony and toshiba brightness. Here is what is in asus-mail:

event=hotkey ATKD 00000050
action=/etc/acpi/mailbtn.sh

When FN F3 is pressed, mailbtn.sh runs. I tried making a similar thing with the assumption that 52 and 53 are F5 and F6 and using the scripts we got from Sytem76 to bind to F5 and F6, but that didn't work. Perhaps I'm being too simplistic or I got the numbers for F5 and F6 keys wrong.

xdev does not show F3 to be 50; so that is not where the '0000050' came from.

I think /etc/acpi/events may have been populated by the acpi-support package which doesn't include brightness for asus as far as I can tell.

Thomas Aaron (tom-system76) wrote :

The brightness keys work on my Darter, and it has no asus brightness scripts.
So, evidently, that is not the problem.

Best,
Tom

----- Original Message -----
From: "Anita" <email address hidden>
To: <email address hidden>
Sent: Wednesday, May 23, 2007 10:49:08 AM (GMT-0700) America/Denver
Subject: [Bug 114677] Re: LCD brighness hotkeys do not work in Darter

I've been looking at /etc/acpi/events and wondering why there is nothing
for asus brightness:

I see several asus things like asus-mail which work. I also see stuff
for sony and toshiba brightness. Here is what is in asus-mail:

event=hotkey ATKD 00000050
action=/etc/acpi/mailbtn.sh

When FN F3 is pressed, mailbtn.sh runs. I tried making a similar thing
with the assumption that 52 and 53 are F5 and F6 and using the scripts
we got from Sytem76 to bind to F5 and F6, but that didn't work. Perhaps
I'm being too simplistic or I got the numbers for F5 and F6 keys wrong.

xdev does not show F3 to be 50; so that is not where the '0000050' came
from.

I think /etc/acpi/events may have been populated by the acpi-support
package which doesn't include brightness for asus as far as I can tell.

--
LCD brighness hotkeys do not work in Darter
https://bugs.launchpad.net/bugs/114677
You received this bug notification because you are a direct subscriber
of the bug.

Anita (a-lewis) wrote :

Thanks, Tom. I did not mention that I am using Feisty 7.04 on mine. Can we compare to see what the difference is between your Darter and mine? There must be something in /etc/acpi that is running on yours. At least it my understanding that acpid is what makes this work.

Anita

Thomas Aaron (tom-system76) wrote :

Hi, Anita.
Sure, we can compare.
I'm starting to think it is at the bios level, though.
Attached is the contents of my /etc/acpi directory.
Best,
Tom

----- Original Message -----
From: "Anita" <email address hidden>
To: <email address hidden>
Sent: Wednesday, May 23, 2007 11:44:52 AM (GMT-0700) America/Denver
Subject: [Bug 114677] Re: LCD brighness hotkeys do not work in Darter

Thanks, Tom. I did not mention that I am using Feisty 7.04 on mine.
Can we compare to see what the difference is between your Darter and
mine? There must be something in /etc/acpi that is running on yours.
At least it my understanding that acpid is what makes this work.

Anita

--
LCD brighness hotkeys do not work in Darter
https://bugs.launchpad.net/bugs/114677
You received this bug notification because you are a direct subscriber
of the bug.

sherrardb (sburton-launchpad) wrote :

Tom could you post your bios version? i went straight from 302 to 305, so i don't know which, if any, between the two fixed it.

another worthwhile test just to rule out acpi and other helpers completely is to
1) log out of gnome
2) switch to a virtual terminal (ctrl+alt+f1)
3) stop gnome: /etc/init.d/gdm stop
4) stop acpi: /etc/init.d/acpid stop /etc/init.d/acpi-support stop
5) make sure there are no instances of xbindkeys running: ps auxww | grep xbindkeys
then confirm that your brightness keys still work.

Thomas Aaron (tom-system76) wrote :

OK, this is confirmed as a firmware problem.
I just fixed the problem on our shop Darter by upgrading the bios to version 305.

I am preparing a bootable image that can be transferred to a USB flash drive (along with full instructions) to update your bios.
It should be ready in the next day or two.

Thank you all for your help with this one.

Best,
Tom

sherrardb (sburton-launchpad) wrote :

so does that mean the instructions in the bios about not being able to update from usb is unfounded, or is that just usb hard drives?

sherrardb:

Regarding your question about checking the VGA BIOS - if you go into your BIOS it should tell you on the main screen

Thomas Aaron (tom-system76) wrote :

sherrardb:

My Darter is different than yours. My bios is version 202.
On our test Darter, though, version 305 fixed the problem. I don't remember what it had before.

Yes, updating the bios with a bootable USB flash drive is completely doable. ( I just did it. ;) )
Not sure about the usb hard drives.

Full instructions soon...

digitalbenji (go-digitalbenji) wrote :

I look forward to the USB bios update. Glad to see how quickly things work around here.

Thomas Aaron (tom-system76) wrote :

Here is the much anticipated F-I-X. Enjoy!

**Please backup any files on your USB pen drive that you want to keep. This process will completely reformat the drive.**

1. Download to your desktop the three files attached to this bug report (unfortunately, I can only seem to attach one per entry, so see the following entries for the other two). The attachments are: Sys76_BootImage , AFLASH2.EXE , Z35AG.305.

2. In a terminal, type: tail -f /var/log/syslog

3. Insert a USB pen drive

4. In the terminal, syslog will give you the /dev/* path of your USB pen drive. Record it. For a Darter, it will probably be /dev/sdb1. It is of the utmost importance that you record this path correctly. Failure to do so likely will hose your computer and reduce you to a slobbering cry-baby. (But don't worry. If you hose it, we're here for you.)

5. BEFORE YOU HIT ENTER, READ THIS ENTIRE STEP!
In a terminal, type:
dd if=~/Desktop/Sys76_BootImage of=/dev/sdb bs=1M
NOTICE that I omitted the number from the USB path (i.e. /dev/sdb instead of /dev/sdb1). ALSO, if you recorded something other than /dev/sdb in step #3, you should substitute your recorded path (minus the number) for /dev/sdb. In other words, type:
dd if=~/Desktop/Sys76_BootImage of=<your usb path minus the number> bs=1M

6. Right-click on the USB pen drive icon on your desktop and select EJECT.

7. Remove the USB pen drive from your computer and re-insert it. It should auto-mount and open a file browser showing you its contents.

8. Drag-and-drop AFLASH2.EXE and Z35FAG.305 into the file browser. Then close the file browser.

9. Right-click on the USB pen drive icon on your desktop and select EJECT.

10. Restart your computer. When the INTEL screen appears, press ESCAPE.

11. Using your arrow keys, highlight your USB pen drive and Press Enter.

12. When you get the A:\> prompt, type the following and press enter:
aflash2 z35fag

13. Type "2" (without the quotes) and press enter.

14. Type "z35fag.305" (without the quotes) and press enter.

15. Press "Y"

16. When the process has completed, press your spacebar. Remove the USB pen drive. Press Ctrl-Alt-Delete and let your computer reboot.

17. You will then see the American Megatrends screen, which will give you a "CMOS Checksum Bad" message. Don't sweat it. It's the last time you'll ever see it. Press F1 to continue booting.

18. Enjoy the use of your LCD brightness keys (Fn-F5 and Fn-F6).

Thomas Aaron (tom-system76) wrote :

Here is AFLASH2.EXE

Thomas Aaron (tom-system76) wrote :

Here is Z35FAG.305.

Changed in system76:
importance: Undecided → Medium
status: Unconfirmed → Fix Committed
Bret Towe (magnade) wrote :

flashing went smooth
and brightness keys work in feisty

Thanks

digitalbenji (go-digitalbenji) wrote :

I can confirm that flashing worked perfectly for me as well. Brightness function keys are now working perfectly.

Thanks. I wonder what else the BIOS update fixed?

Thanks again,

Thomas Aaron (tom-system76) wrote :

Great. I also got several emails confirming success.

This one's closed.

Martin Albisetti (beuno) wrote :

Works perfectly :D

Thanks!

bj mccormick (bjmccormick) wrote :

I want to try this, but don't have a USB stick. You think this would be possible via CD?

Thomas Aaron (tom-system76) wrote :

It is probably possible.
I think you can create a bootable CD image with a utility called Flashboot.
You can do it natively in Linux too, but it will probably take you some
research.

----- Original Message -----
From: "bj mccormick" <email address hidden>
To: <email address hidden>
Sent: Saturday, July 21, 2007 10:55:16 PM (GMT-0700) America/Denver
Subject: [Bug 114677] Re: LCD brighness hotkeys do not work in Darter

I want to try this, but don't have a USB stick. You think this would be
possible via CD?

--
LCD brighness hotkeys do not work in Darter
https://bugs.launchpad.net/bugs/114677
You received this bug notification because you are a direct subscriber
of the bug.

Changed in system76:
status: Fix Committed → Fix Released
David Twamley (davidtwamley) wrote :

I didn't have a problem with the Fn-F5 and Fn-F6 brightness keys on Feisty or Gutsy but I did after a fresh install of Hardy Heron 8.04. It was fine at first but at some point switching between power and battery caused my screen to go very dark and I couldn't get it back with the usual tricks and discovered the function keys weren't working (adding the LCD Brightness control to the launch panel helped).

I found this thread and checked my system. My system model is daru1 (reported by the System76 Driver Installer). My BIOS version was 302 (reported by BIOS menu F2 at startup). I followed the instructions from the 2007-05-25 Thomas Aaron post earlier in this thread. Worked like a charm. My BIOS is now 305 and the function keys work.

I also went into BIOS and set LCD Power Saving to Disabled since ubuntu can handle that.

Posting this in case other daru1 users encounter this problem after moving to Hardy Heron 8.04. Thanks System76!

Jeffrey Elkner (jelkner) wrote :

I also have a daru1 and have updated the bios to 305. The brightness keys work, but each time I restart the machine the boot up screen and login screens are very dim. Only after I log in can I use the function keys to brighten the screen. I wanted to use VirtualBox to run a few virtual machines, but each time I start one the screen goes dim and I have to brighten it again. *Very* annoying!

cboettig (cboettig) wrote :

The latest kernel update seems to have fixed this problem for me.

On Fri, May 30, 2008 at 6:00 AM, Jeffrey Elkner <email address hidden> wrote:
> I also have a daru1 and have updated the bios to 305. The brightness
> keys work, but each time I restart the machine the boot up screen and
> login screens are very dim. Only after I log in can I use the function
> keys to brighten the screen. I wanted to use VirtualBox to run a few
> virtual machines, but each time I start one the screen goes dim and I
> have to brighten it again. *Very* annoying!
>
> --
> LCD brighness hotkeys do not work in Darter
> https://bugs.launchpad.net/bugs/114677
> You received this bug notification because you are a direct subscriber
> of the bug.
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers