[SOLVED] UL30VT Brightness Keys

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

[SOLVED] UL30VT Brightness Keys

Postby Sphaerophoria on Thu Feb 24, 2011 2:52 am

Hey guys,

Just wondering if any of you guys could help me out with a little problem I've been having on my UL30VT. After disabling the nvidia card I can't get my brightness keys working. I can change it in the terminal via a command i found online. If I type brightness up it gets lighter if i type brightness down it gets darker. However the trouble comes when trying to bind these to the function keys. In ubuntu I could edit the /etc/acpi/asus-brn-up/down.sh to say brighness up/down but however on debian this isn't working for me. I've installed the eeepc-acpi-scripts package and all the files are there like in original linux mint however changing them doesn't fix it like it did in standard linux mint. I'm also running kernel 2.6.37 from the sid repositories. Thanks for your time.

Sphaerophoria
Last edited by Sphaerophoria on Sat Feb 26, 2011 2:39 pm, edited 1 time in total.
Sphaerophoria
Level 1
Level 1
 
Posts: 8
Joined: Thu Feb 24, 2011 2:25 am

Linux Mint is funded by ads and donations.
 

Re: UL30VT Brightness Keys

Postby Sphaerophoria on Thu Feb 24, 2011 2:57 am

If I wasn't clear what I'm trying to do is find a way to make the "brightness up" command happen when i hit the function key to turn up the brightness. Thanks a lot for your time guys.
Sphaerophoria
Level 1
Level 1
 
Posts: 8
Joined: Thu Feb 24, 2011 2:25 am

Re: UL30VT Brightness Keys

Postby SilverZero on Thu Feb 24, 2011 1:05 pm

Two things:

1. Can't you assign a terminal command to the Gnome keyboard shortcut keys?

2. I'm trying to solve this same problem, but I don't know what terminal commands to issue to get brightness to change. What brightness commands are you typing?

If anybody can get a keyboard output when they use their working laptop keyboard to change brightness, it might help.
SilverZero
Level 1
Level 1
 
Posts: 2
Joined: Sun Nov 29, 2009 12:03 am

Re: Re: UL30VT Brightness Keys

Postby Sphaerophoria on Thu Feb 24, 2011 2:36 pm

SilverZero wrote:Two things:

1. Can't you assign a terminal command to the Gnome keyboard shortcut keys?

2. I'm trying to solve this same problem, but I don't know what terminal commands to issue to get brightness to change. What brightness commands are you typing?

If anybody can get a keyboard output when they use their working laptop keyboard to change brightness, it might help.


Ill post the script i have when i get back to my laptop. But the weird thing is i couldnt get the gnome shortcut keys to trigger the command... maybe compiz was overriding them or something. Anyways. I guess i could survive with binding the brightness keys to something else it would just be nice to have the designated brightness keys work
Sphaerophoria
Level 1
Level 1
 
Posts: 8
Joined: Thu Feb 24, 2011 2:25 am

Re: UL30VT Brightness Keys

Postby Sphaerophoria on Thu Feb 24, 2011 10:04 pm

Here is the brightness script i found online it words very well... no delay between when you hit and when it works :D

Code: Select all
#!/bin/bash
#!/bin/bash
export SEED=2
if [ ! -f ~/.brightness ]; then
       echo 99 > ~/.brightness;
fi
export BRIGHTNESS=`cat ~/.brightness`
case "$1" in
       "up")
               export BRIGHTNESS=$[$BRIGHTNESS+$SEED];
       ;;
       "down")
               export BRIGHTNESS=$[$BRIGHTNESS-$SEED];
       ;;
       *)
               export BRIGHTNESS=1;
       ;;
esac
if [ "$BRIGHTNESS" -gt "99" ]; then
       export BRIGHTNESS=99;
fi
if [ "$BRIGHTNESS" -gt "0" ]; then
       echo $BRIGHTNESS > ~/.brightness
       sudo setpci -s 00:02.0 F4.B=$BRIGHTNESS
fi
if [ "$BRIGHTNESS" -lt "0" ]; then
       echo "This makes your screen off";
fi


then do
Code: Select all
sudo visudo

and add
Code: Select all
ALL ALL=NOPASSWD: /usr/bin/setpci


then you can bind brightness up or brightness down to keyboard shortcuts. However I still cannot bind them to the brightness keys on my laptop.
Sphaerophoria
Level 1
Level 1
 
Posts: 8
Joined: Thu Feb 24, 2011 2:25 am

Re: UL30VT Brightness Keys

Postby Sphaerophoria on Sat Feb 26, 2011 4:39 am

Alright so after a lot of tinkering I finally figured it out. The problem was that the key was registering as ATK0100:00 instead of the regular ATKD. So i edited /etc/acpi/events/asus-brightness-up (or down) to use those key presses. Here is my asus-brightness-down file now

Code: Select all
event=hotkey (ATKD|HOTK|ATK0100:00) 0000002[0123456789abcdef]
action=/usr/bin/brightness down


So now it works! Score!

Sorry for the noob question but how do i mark this solved? lol
Sphaerophoria
Level 1
Level 1
 
Posts: 8
Joined: Thu Feb 24, 2011 2:25 am

Re: UL30VT Brightness Keys

Postby doktordave on Sat Feb 26, 2011 12:30 pm

Just edit your post title and add [SOLVED].
User avatar
doktordave
Level 2
Level 2
 
Posts: 60
Joined: Wed Apr 08, 2009 8:57 am
Location: Danville, VA

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 4 guests