[SOLVED] UL30VT Brightness Keys

Archived topics about LMDE 1 and LMDE 2
Locked
Sphaerophoria

[SOLVED] UL30VT Brightness Keys

Post by Sphaerophoria »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Sphaerophoria

Re: UL30VT Brightness Keys

Post by Sphaerophoria »

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.
SilverZero

Re: UL30VT Brightness Keys

Post by SilverZero »

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.
Sphaerophoria

Re: Re: UL30VT Brightness Keys

Post by Sphaerophoria »

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

Re: UL30VT Brightness Keys

Post by Sphaerophoria »

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

Re: UL30VT Brightness Keys

Post by Sphaerophoria »

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
doktordave

Re: UL30VT Brightness Keys

Post by doktordave »

Just edit your post title and add [SOLVED].
Locked

Return to “LMDE Archive”