topic title: adjunst
Posts: 9
kickerskick
Joined: 25 May 2011
#1
i have a laptop running this antiX i dont know how to adjunst my monitor brightness can any one help.

thank you
Posts: 1,062
Dave
Joined: 20 Jan 2010
#2
Sorry for not being of to much help in the area, but I have found this on google if it will help
echo -n 50 > /proc/acpi/video/VGA/LCD/brightness
If this works, You can add this command to your key config so that your function keys will automatically run the command
use this string to lower brightness
LEVEL=`cat /proc/acpi/video/VGA/LCD/brightness | grep current | cut -d : -f2 | grep -o [1-9].*`; echo `expr"$LEVEL" -"10"` > /proc/acpi/video/VGA/LCD/brightness;
and this one to raise
LEVEL=`cat /proc/acpi/video/VGA/LCD/brightness | grep current | cut -d : -f2 | grep -o [1-9].*`; echo `expr"$LEVEL" +"10"` > /proc/acpi/video/VGA/LCD/brightness;

You can find the name of your function key by running xev in terminal and then pressing the function key combination

EDIT, you may need to change the file path for it to work (eg. VGA may be GFX0), check what your path is by using your file manager
Posts: 9
kickerskick
Joined: 25 May 2011
#3
thanks dave for all your help im new to this so i have no idea what your talking about can you take me step by step to do this..
Posts: 1,062
Dave
Joined: 20 Jan 2010
#4
open terminal by
menu --> run
type:"roxterm"
checkoff"run as root"
press"ok"
type:"YOUR ROOT PASSWORD"
press"ok"
type: echo -n 50 > /proc/acpi/video/VGA/LCD/brightness

Now does it work, if yes then good post back and we can add it to your function keys. If no post the output and do this
menu --> run
type:"thunar"
check off"run as root"
press"ok"
type:"YOUR ROOT PASSWORD"
press"ok"
press: Go --> open location
type:"/proc/acpi/video/"

see what folders are in that directory and write them here
Posts: 9
kickerskick
Joined: 25 May 2011
#5
i did the first step and it says No such file or directory

when i open the file manager is shows a folder OVGA
Posts: 9
kickerskick
Joined: 25 May 2011
#6
the termal things says demo maybe thats why it wont work for me..
Posts: 279
afab4
Joined: 17 Oct 2009
#7
To adjust the display brightness on my Dell D800 you must go into the bios settings and adjust it there.
I noticed that when I was experimenting with Linux Mint, it would always dim my screen so that when I booted back up into antiX I had difficulty seeing things. Simple adjustment in the bios settings took care of it.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#8
ok, follow the same steps as above, but change the last step to
type: echo -n 50 > /proc/acpi/video/OVGA/LCD/brightness
Posts: 9
kickerskick
Joined: 25 May 2011
#9
Hey dave, i did what u said and it tells me no such file or directory. i think its because its in demo mode, i think its my fault im thinking its not installed to my hard drive thats why the command is not working. its my fault, sorry man, thanks for all your help.

if the demo mode has nothing to do with it plz keep helping me out thank you very much.
Posts: 9
kickerskick
Joined: 25 May 2011
#10
hey dave i was looking in the file ovg and it shows dd01 dd02 ect. i opened them all and saw a file brightness clicked on it and it says not supported. i founed in dd04 it said supported, so i typed in the termal echo -n 50 > /proc/acpi/video/OVGA/DD04/brightness. and it said permission denied.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#11
Were you running the command in terminal as root, If you were running it as regular user you will not have write permissions.

that command basically means to display the number 50, then write what is displayed to the file bright
ness
Posts: 9
kickerskick
Joined: 25 May 2011
#12
ok im in demo mode thats why i dont have root or permission. sorry about that. thanks for your help, im just testing it out before i installed. maybe i will install it later today, i will try it out the brightness thing sorry man thanks for the help. after i install it and it wont work ill come back and ask for more help if you dont mind thanks.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#13
you can become root while running live cd ( demo mode ), you should not need a hard drive install to test. If you are running live cd then try
menu --> run
type:roxterm
type: su
type: root ( for the password )
then try the command
echo -n 50 > /proc/acpi/video/OVGA/DD04/brightness
Posts: 9
kickerskick
Joined: 25 May 2011
#14
thanks dave this worked very well.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#15
copy and paste to a textfile named brightness

Code: Select all

#!/bin/bash
#Script for working brightness function keys

LEVEL=`cat /proc/acpi/video/VGA/LCD/brightness | grep current | cut -d : -f2 | grep -o [1-9].*`;

function up {
 echo `expr"$LEVEL" +"10"` > /proc/acpi/video/OVGA/DD04/brightness;
 }

function down {
 echo `expr"$LEVEL" -"10"` > /proc/acpi/video/OVGA/DD04/brightness;
 }
 
# Initializing variables
UP=false
DOWN=false

for args; do
case"$1" in
        -u|--up) UP=true;;
        -d|--down)     DOWN=true;;
        --)         shift; break;;
        -*)         echo"Unrecognized option: $1"; ERROR=true;;
        *)         break;;
    esac
shift
done

$UP && {
    up;
    exit;
}

$DOWN && {
    down;
    exit;
}
Ok, to make your function keys work
menu --> run
type: roxterm
checkoff: run as root
press: ok
type: root (THIS IS ROOT PASSWORD FOR DEMO, CHANGE WHEN INSTALLED)
type: cp ~/brightness /usr/local/bin/brightness
type: chmod 755 /usr/local/bin/brightness
type: chown root:users /proc/acpi/video/OVGA/DD04/brightness
type: exit
type: echo -n 50 > /proc/acpi/video/OVGA/DD04/brightness ( This is to verify that it can now be done by a user and change 50 to 100 to go back )

FIND FUNCTION KEY NAMES
type: xev
press: function key brightness up (XF86MonBrightnessUp)
output should show

Code: Select all

    KeyRelease event, serial 37, synthetic NO, window 0x1800001,
    root 0x15d, subw 0x0, time 797893, (-283,347), root:(595,369),
    state 0x0, keycode 233 (keysym 0x1008ff02, XF86MonBrightnessUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
your key name will be in the same spot as XF86MonBrightnessUp, though it may not be the same
copy: XF86MonBrightnessUp section
press: Control + C

WINDOW MANAGER DEPENDANT
For FLUXBOX do
type: leafpad ~/.fluxbox/keys
find: the bottom line ( new line )
paste: (previously copied)
type:" :Exec brightness -u" 1 space, 1 colon,"Exec", 1 space,"-u" behind what was just pasted
EG:

Code: Select all

XF86MonBrightnessUp :Exec brightness -u
save and close

For ICEWM do
type: leafpad ~/.icewm/keys
find: the bottom line ( new line )
type:"key"""key", 1 space, one quotation mark
paste: (previously copied) behind what was just typed
type:"" brightness -u" 1 quotation mark, 1 space,"brightness", 1 space,"-u"
EG:

Code: Select all

key"XF86MonBrightnessUp" brightness -u
save and close


For brightness down repeat steps from FIND FUNCTION KEY NAMES with the following changes
1. press function key down instead of up (XF76MonBrightnessDown)
2. change all"brightness -u" sections to"brightness -d"

NOTES:
- The brightness code from above will decrease / increase screen brightness by increments of ten
- You will need to restart the window manager for the keys to begin to work
Fluxbox
menu --> Fluxbox Settings-->restart
Icewm
menu --> logout -->restart icewm