Set the screen brightness: xbacklight does not work on HDMI, xrandr --brightness does not stick
Clash Royale CLAN TAG#URR8PPP
up vote
8
down vote
favorite
I'm trying to set custom screen bindings in i3WM and looking for a way to decrease/increase the brightness on button press. I've tried using the following:
xbacklight -dec10
xbacklight -set 70
xbacklight would work however it does not affect my HDMI connected monitor, no backlight apparently:
xrandr --verbose
HDMI-0 has no "Backlight" property unlike the laptop screen, the above code works fine on my laptop screen, however I want to reduce the brightness on all monitors.
Next I tried:
xrandr --output DP-0 --brightness 0.5
xrandr --output HMDI-0 --brightness 0.5
Which works! Well, for about 1 second then it defaults back. My question: is there any way I can get these changes to stick, at least until the next reboot?
PS - Running Debian GNU/Linux 8.5 | 4.5.0-0.bpo.1-amd64 | i3 4.8-2
PPS - I can easily set the i3 configuration and key bindings, no assistance needed with that part :)
xorg xrandr monitors hdmi brightness
add a comment |Â
up vote
8
down vote
favorite
I'm trying to set custom screen bindings in i3WM and looking for a way to decrease/increase the brightness on button press. I've tried using the following:
xbacklight -dec10
xbacklight -set 70
xbacklight would work however it does not affect my HDMI connected monitor, no backlight apparently:
xrandr --verbose
HDMI-0 has no "Backlight" property unlike the laptop screen, the above code works fine on my laptop screen, however I want to reduce the brightness on all monitors.
Next I tried:
xrandr --output DP-0 --brightness 0.5
xrandr --output HMDI-0 --brightness 0.5
Which works! Well, for about 1 second then it defaults back. My question: is there any way I can get these changes to stick, at least until the next reboot?
PS - Running Debian GNU/Linux 8.5 | 4.5.0-0.bpo.1-amd64 | i3 4.8-2
PPS - I can easily set the i3 configuration and key bindings, no assistance needed with that part :)
xorg xrandr monitors hdmi brightness
add a comment |Â
up vote
8
down vote
favorite
up vote
8
down vote
favorite
I'm trying to set custom screen bindings in i3WM and looking for a way to decrease/increase the brightness on button press. I've tried using the following:
xbacklight -dec10
xbacklight -set 70
xbacklight would work however it does not affect my HDMI connected monitor, no backlight apparently:
xrandr --verbose
HDMI-0 has no "Backlight" property unlike the laptop screen, the above code works fine on my laptop screen, however I want to reduce the brightness on all monitors.
Next I tried:
xrandr --output DP-0 --brightness 0.5
xrandr --output HMDI-0 --brightness 0.5
Which works! Well, for about 1 second then it defaults back. My question: is there any way I can get these changes to stick, at least until the next reboot?
PS - Running Debian GNU/Linux 8.5 | 4.5.0-0.bpo.1-amd64 | i3 4.8-2
PPS - I can easily set the i3 configuration and key bindings, no assistance needed with that part :)
xorg xrandr monitors hdmi brightness
I'm trying to set custom screen bindings in i3WM and looking for a way to decrease/increase the brightness on button press. I've tried using the following:
xbacklight -dec10
xbacklight -set 70
xbacklight would work however it does not affect my HDMI connected monitor, no backlight apparently:
xrandr --verbose
HDMI-0 has no "Backlight" property unlike the laptop screen, the above code works fine on my laptop screen, however I want to reduce the brightness on all monitors.
Next I tried:
xrandr --output DP-0 --brightness 0.5
xrandr --output HMDI-0 --brightness 0.5
Which works! Well, for about 1 second then it defaults back. My question: is there any way I can get these changes to stick, at least until the next reboot?
PS - Running Debian GNU/Linux 8.5 | 4.5.0-0.bpo.1-amd64 | i3 4.8-2
PPS - I can easily set the i3 configuration and key bindings, no assistance needed with that part :)
xorg xrandr monitors hdmi brightness
xorg xrandr monitors hdmi brightness
edited Jul 24 '16 at 21:04
Gilles
511k12010091540
511k12010091540
asked Jul 24 '16 at 11:34
tuxedozombie
4815
4815
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
You can use the following script found on doc.ubuntu-fr.org(based on xbacklight
tool):
Create a new configuration file brightness
under /usr/local/bin
with the following contents:
#!/bin/bash
error="Usage: $0 up | $0 down"
xbl=`xbacklight`
limite1=2
limite2=10
limite3=40
limite4=100
if [ "$#" -eq 1 ]
then
if [ $1 = "up" ]
then
# Augmenter le rétroéclairage
if [ $(echo "$xbl == $limite4"|bc) -eq 1 ]
then
echo "Rétroéclairage au maximum !"
xbacklight = 100
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight +1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight +10
else
xbacklight +20
fi
fi
fi
elif [ $1 = "down" ]
then
# Diminuer le rétroéclairage
if [ $(echo "$xbl < $limite1"|bc) -eq 1 ]
then
echo "Rétroéclairage au minimum !"
xbacklight =1
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight -1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight -10
else
xbacklight -20
fi
fi
fi
else
echo $error
fi
else
echo $error
fi
exit
Make it executable:
sudo chmod +x /usr/local/bin/brightness
To increase the brightness , open the terminal and type:
brightness up
To decrease the brightness ,type:
brightness down
1
Couple of things, firstly, I get a permission denied when trying to run the brightness up/down command. I've made it executable, tried changing the owner to my user and moving the script to another location. No luck. Second, I'm not sure this will fix the problem I'm having, my second screen has no backlight property so the xbacklight tool will not work, I don't think
â tuxedozombie
Jul 24 '16 at 20:06
You should install the graphic driver first . what is the output oflspci | grep 'vga'
andglxinfo | grep "OpenGL vendor string"
?
â GAD3R
Jul 25 '16 at 8:35
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You can use the following script found on doc.ubuntu-fr.org(based on xbacklight
tool):
Create a new configuration file brightness
under /usr/local/bin
with the following contents:
#!/bin/bash
error="Usage: $0 up | $0 down"
xbl=`xbacklight`
limite1=2
limite2=10
limite3=40
limite4=100
if [ "$#" -eq 1 ]
then
if [ $1 = "up" ]
then
# Augmenter le rétroéclairage
if [ $(echo "$xbl == $limite4"|bc) -eq 1 ]
then
echo "Rétroéclairage au maximum !"
xbacklight = 100
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight +1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight +10
else
xbacklight +20
fi
fi
fi
elif [ $1 = "down" ]
then
# Diminuer le rétroéclairage
if [ $(echo "$xbl < $limite1"|bc) -eq 1 ]
then
echo "Rétroéclairage au minimum !"
xbacklight =1
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight -1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight -10
else
xbacklight -20
fi
fi
fi
else
echo $error
fi
else
echo $error
fi
exit
Make it executable:
sudo chmod +x /usr/local/bin/brightness
To increase the brightness , open the terminal and type:
brightness up
To decrease the brightness ,type:
brightness down
1
Couple of things, firstly, I get a permission denied when trying to run the brightness up/down command. I've made it executable, tried changing the owner to my user and moving the script to another location. No luck. Second, I'm not sure this will fix the problem I'm having, my second screen has no backlight property so the xbacklight tool will not work, I don't think
â tuxedozombie
Jul 24 '16 at 20:06
You should install the graphic driver first . what is the output oflspci | grep 'vga'
andglxinfo | grep "OpenGL vendor string"
?
â GAD3R
Jul 25 '16 at 8:35
add a comment |Â
up vote
0
down vote
You can use the following script found on doc.ubuntu-fr.org(based on xbacklight
tool):
Create a new configuration file brightness
under /usr/local/bin
with the following contents:
#!/bin/bash
error="Usage: $0 up | $0 down"
xbl=`xbacklight`
limite1=2
limite2=10
limite3=40
limite4=100
if [ "$#" -eq 1 ]
then
if [ $1 = "up" ]
then
# Augmenter le rétroéclairage
if [ $(echo "$xbl == $limite4"|bc) -eq 1 ]
then
echo "Rétroéclairage au maximum !"
xbacklight = 100
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight +1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight +10
else
xbacklight +20
fi
fi
fi
elif [ $1 = "down" ]
then
# Diminuer le rétroéclairage
if [ $(echo "$xbl < $limite1"|bc) -eq 1 ]
then
echo "Rétroéclairage au minimum !"
xbacklight =1
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight -1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight -10
else
xbacklight -20
fi
fi
fi
else
echo $error
fi
else
echo $error
fi
exit
Make it executable:
sudo chmod +x /usr/local/bin/brightness
To increase the brightness , open the terminal and type:
brightness up
To decrease the brightness ,type:
brightness down
1
Couple of things, firstly, I get a permission denied when trying to run the brightness up/down command. I've made it executable, tried changing the owner to my user and moving the script to another location. No luck. Second, I'm not sure this will fix the problem I'm having, my second screen has no backlight property so the xbacklight tool will not work, I don't think
â tuxedozombie
Jul 24 '16 at 20:06
You should install the graphic driver first . what is the output oflspci | grep 'vga'
andglxinfo | grep "OpenGL vendor string"
?
â GAD3R
Jul 25 '16 at 8:35
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You can use the following script found on doc.ubuntu-fr.org(based on xbacklight
tool):
Create a new configuration file brightness
under /usr/local/bin
with the following contents:
#!/bin/bash
error="Usage: $0 up | $0 down"
xbl=`xbacklight`
limite1=2
limite2=10
limite3=40
limite4=100
if [ "$#" -eq 1 ]
then
if [ $1 = "up" ]
then
# Augmenter le rétroéclairage
if [ $(echo "$xbl == $limite4"|bc) -eq 1 ]
then
echo "Rétroéclairage au maximum !"
xbacklight = 100
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight +1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight +10
else
xbacklight +20
fi
fi
fi
elif [ $1 = "down" ]
then
# Diminuer le rétroéclairage
if [ $(echo "$xbl < $limite1"|bc) -eq 1 ]
then
echo "Rétroéclairage au minimum !"
xbacklight =1
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight -1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight -10
else
xbacklight -20
fi
fi
fi
else
echo $error
fi
else
echo $error
fi
exit
Make it executable:
sudo chmod +x /usr/local/bin/brightness
To increase the brightness , open the terminal and type:
brightness up
To decrease the brightness ,type:
brightness down
You can use the following script found on doc.ubuntu-fr.org(based on xbacklight
tool):
Create a new configuration file brightness
under /usr/local/bin
with the following contents:
#!/bin/bash
error="Usage: $0 up | $0 down"
xbl=`xbacklight`
limite1=2
limite2=10
limite3=40
limite4=100
if [ "$#" -eq 1 ]
then
if [ $1 = "up" ]
then
# Augmenter le rétroéclairage
if [ $(echo "$xbl == $limite4"|bc) -eq 1 ]
then
echo "Rétroéclairage au maximum !"
xbacklight = 100
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight +1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight +10
else
xbacklight +20
fi
fi
fi
elif [ $1 = "down" ]
then
# Diminuer le rétroéclairage
if [ $(echo "$xbl < $limite1"|bc) -eq 1 ]
then
echo "Rétroéclairage au minimum !"
xbacklight =1
else
if [ $(echo "$xbl < $limite2"|bc) -eq 1 ]
then
xbacklight -1
else
if [ $(echo "$xbl < $limite3"|bc) -eq 1 ]
then
xbacklight -10
else
xbacklight -20
fi
fi
fi
else
echo $error
fi
else
echo $error
fi
exit
Make it executable:
sudo chmod +x /usr/local/bin/brightness
To increase the brightness , open the terminal and type:
brightness up
To decrease the brightness ,type:
brightness down
answered Jul 24 '16 at 14:12
GAD3R
22.9k164895
22.9k164895
1
Couple of things, firstly, I get a permission denied when trying to run the brightness up/down command. I've made it executable, tried changing the owner to my user and moving the script to another location. No luck. Second, I'm not sure this will fix the problem I'm having, my second screen has no backlight property so the xbacklight tool will not work, I don't think
â tuxedozombie
Jul 24 '16 at 20:06
You should install the graphic driver first . what is the output oflspci | grep 'vga'
andglxinfo | grep "OpenGL vendor string"
?
â GAD3R
Jul 25 '16 at 8:35
add a comment |Â
1
Couple of things, firstly, I get a permission denied when trying to run the brightness up/down command. I've made it executable, tried changing the owner to my user and moving the script to another location. No luck. Second, I'm not sure this will fix the problem I'm having, my second screen has no backlight property so the xbacklight tool will not work, I don't think
â tuxedozombie
Jul 24 '16 at 20:06
You should install the graphic driver first . what is the output oflspci | grep 'vga'
andglxinfo | grep "OpenGL vendor string"
?
â GAD3R
Jul 25 '16 at 8:35
1
1
Couple of things, firstly, I get a permission denied when trying to run the brightness up/down command. I've made it executable, tried changing the owner to my user and moving the script to another location. No luck. Second, I'm not sure this will fix the problem I'm having, my second screen has no backlight property so the xbacklight tool will not work, I don't think
â tuxedozombie
Jul 24 '16 at 20:06
Couple of things, firstly, I get a permission denied when trying to run the brightness up/down command. I've made it executable, tried changing the owner to my user and moving the script to another location. No luck. Second, I'm not sure this will fix the problem I'm having, my second screen has no backlight property so the xbacklight tool will not work, I don't think
â tuxedozombie
Jul 24 '16 at 20:06
You should install the graphic driver first . what is the output of
lspci | grep 'vga'
and glxinfo | grep "OpenGL vendor string"
?â GAD3R
Jul 25 '16 at 8:35
You should install the graphic driver first . what is the output of
lspci | grep 'vga'
and glxinfo | grep "OpenGL vendor string"
?â GAD3R
Jul 25 '16 at 8:35
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f297935%2fset-the-screen-brightness-xbacklight-does-not-work-on-hdmi-xrandr-brightness%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password