How to change the Xorg gamma/brightness? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionHow to use command line to change brightness and color?xrandr configurationHow to change LCD intensivity/brightnessLinux Mint brightness has too few settingsHow to change brightness on puppy linux?Can't set xrandr brightness and gamma correctlySet the screen brightness: xbacklight does not work on HDMI, xrandr --brightness does not stickHow to change screen brightness Centos 7Update GNOME Shell brightness slider automatically on brightness changeHow to change brightness from tty?

What would be Julian Assange's expected punishment, on the current English criminal law?

Two different pronunciation of "понял"

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

What did Darwin mean by 'squib' here?

Was credit for the black hole image misattributed?

Stop battery usage [Ubuntu 18]

I'm having difficulty getting my players to do stuff in a sandbox campaign

How is simplicity better than precision and clarity in prose?

Why use gamma over alpha radiation?

Why does this iterative way of solving of equation work?

Mortgage adviser recommends a longer term than necessary combined with overpayments

What kind of display is this?

Can a zero nonce be safely used with AES-GCM if the key is random and never used again?

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

How do you clear the ApexPages.getMessages() collection in a test?

What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?

What was the last x86 CPU that did not have the x87 floating-point unit built in?

Simulating Exploding Dice

Determine whether f is a function, an injection, a surjection

How to colour the US map with Yellow, Green, Red and Blue to minimize the number of states with the colour of Green

What computer would be fastest for Mathematica Home Edition?

Working around an AWS network ACL rule limit

Complexity of many constant time steps with occasional logarithmic steps

Antler Helmet: Can it work?



How to change the Xorg gamma/brightness?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionHow to use command line to change brightness and color?xrandr configurationHow to change LCD intensivity/brightnessLinux Mint brightness has too few settingsHow to change brightness on puppy linux?Can't set xrandr brightness and gamma correctlySet the screen brightness: xbacklight does not work on HDMI, xrandr --brightness does not stickHow to change screen brightness Centos 7Update GNOME Shell brightness slider automatically on brightness changeHow to change brightness from tty?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








13















I'm trying to play a game (Deus Ex) which I have to modify the brightness since it is very dark in my ambiance. The game has a "Brightness" setting, but lately it doesn't work. I tried to figure out how to change it and find out that xgamma do a similar effect with xgamma -gamma 5. But whenever I change it, the settings revert back after almost a second (so yeah, my screen light up then shuts down). How can I either, make the xgamma settings permanent (or persistent) or I have to use another tool?



My system is a desktop.



Seemsly xrandr --output DVI-0 --brightness 2 do the same, but still reverts back to 0 whenever I apply the settings.



Each time I try to change it the following output fill the Xorg.0.log file:



[ 14768.313] (II) RADEON(0): EDID vendor "HWP", prod id 9798
[ 14768.313] (II) RADEON(0): Using hsync ranges from config file
[ 14768.313] (II) RADEON(0): Using vrefresh ranges from config file
[ 14768.313] (II) RADEON(0): Printing DDC gathered Modelines:
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz eP)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 664 704 832 480 489 492 520 -hsync -vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "832x624"x0.0 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)


So, apparently my monitor gets redetected each time.










share|improve this question
























  • Your monitor doesn't have hardware controls for that?

    – jordanm
    Oct 26 '13 at 19:10











  • @jordanm yeah, those are maxed out. The screen isn't very bright to begin with.

    – Braiam
    Oct 26 '13 at 19:16

















13















I'm trying to play a game (Deus Ex) which I have to modify the brightness since it is very dark in my ambiance. The game has a "Brightness" setting, but lately it doesn't work. I tried to figure out how to change it and find out that xgamma do a similar effect with xgamma -gamma 5. But whenever I change it, the settings revert back after almost a second (so yeah, my screen light up then shuts down). How can I either, make the xgamma settings permanent (or persistent) or I have to use another tool?



My system is a desktop.



Seemsly xrandr --output DVI-0 --brightness 2 do the same, but still reverts back to 0 whenever I apply the settings.



Each time I try to change it the following output fill the Xorg.0.log file:



[ 14768.313] (II) RADEON(0): EDID vendor "HWP", prod id 9798
[ 14768.313] (II) RADEON(0): Using hsync ranges from config file
[ 14768.313] (II) RADEON(0): Using vrefresh ranges from config file
[ 14768.313] (II) RADEON(0): Printing DDC gathered Modelines:
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz eP)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 664 704 832 480 489 492 520 -hsync -vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "832x624"x0.0 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)


So, apparently my monitor gets redetected each time.










share|improve this question
























  • Your monitor doesn't have hardware controls for that?

    – jordanm
    Oct 26 '13 at 19:10











  • @jordanm yeah, those are maxed out. The screen isn't very bright to begin with.

    – Braiam
    Oct 26 '13 at 19:16













13












13








13


2






I'm trying to play a game (Deus Ex) which I have to modify the brightness since it is very dark in my ambiance. The game has a "Brightness" setting, but lately it doesn't work. I tried to figure out how to change it and find out that xgamma do a similar effect with xgamma -gamma 5. But whenever I change it, the settings revert back after almost a second (so yeah, my screen light up then shuts down). How can I either, make the xgamma settings permanent (or persistent) or I have to use another tool?



My system is a desktop.



Seemsly xrandr --output DVI-0 --brightness 2 do the same, but still reverts back to 0 whenever I apply the settings.



Each time I try to change it the following output fill the Xorg.0.log file:



[ 14768.313] (II) RADEON(0): EDID vendor "HWP", prod id 9798
[ 14768.313] (II) RADEON(0): Using hsync ranges from config file
[ 14768.313] (II) RADEON(0): Using vrefresh ranges from config file
[ 14768.313] (II) RADEON(0): Printing DDC gathered Modelines:
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz eP)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 664 704 832 480 489 492 520 -hsync -vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "832x624"x0.0 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)


So, apparently my monitor gets redetected each time.










share|improve this question
















I'm trying to play a game (Deus Ex) which I have to modify the brightness since it is very dark in my ambiance. The game has a "Brightness" setting, but lately it doesn't work. I tried to figure out how to change it and find out that xgamma do a similar effect with xgamma -gamma 5. But whenever I change it, the settings revert back after almost a second (so yeah, my screen light up then shuts down). How can I either, make the xgamma settings permanent (or persistent) or I have to use another tool?



My system is a desktop.



Seemsly xrandr --output DVI-0 --brightness 2 do the same, but still reverts back to 0 whenever I apply the settings.



Each time I try to change it the following output fill the Xorg.0.log file:



[ 14768.313] (II) RADEON(0): EDID vendor "HWP", prod id 9798
[ 14768.313] (II) RADEON(0): Using hsync ranges from config file
[ 14768.313] (II) RADEON(0): Using vrefresh ranges from config file
[ 14768.313] (II) RADEON(0): Printing DDC gathered Modelines:
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz eP)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 31.50 640 664 704 832 480 489 492 520 -hsync -vsync (37.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "720x400"x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.0 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0 75.00 1024 1048 1184 1328 768 771 777 806 -hsync -vsync (56.5 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "832x624"x0.0 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0 50.00 800 856 976 1040 600 637 643 666 +hsync +vsync (48.1 kHz e)


So, apparently my monitor gets redetected each time.







xorg display-settings brightness






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 26 '13 at 19:06







Braiam

















asked Oct 26 '13 at 18:56









BraiamBraiam

23.8k2078143




23.8k2078143












  • Your monitor doesn't have hardware controls for that?

    – jordanm
    Oct 26 '13 at 19:10











  • @jordanm yeah, those are maxed out. The screen isn't very bright to begin with.

    – Braiam
    Oct 26 '13 at 19:16

















  • Your monitor doesn't have hardware controls for that?

    – jordanm
    Oct 26 '13 at 19:10











  • @jordanm yeah, those are maxed out. The screen isn't very bright to begin with.

    – Braiam
    Oct 26 '13 at 19:16
















Your monitor doesn't have hardware controls for that?

– jordanm
Oct 26 '13 at 19:10





Your monitor doesn't have hardware controls for that?

– jordanm
Oct 26 '13 at 19:10













@jordanm yeah, those are maxed out. The screen isn't very bright to begin with.

– Braiam
Oct 26 '13 at 19:16





@jordanm yeah, those are maxed out. The screen isn't very bright to begin with.

– Braiam
Oct 26 '13 at 19:16










2 Answers
2






active

oldest

votes


















22














Silly me! I have xflux with fluxgui activated, each time I would like to modify the settings xflux will be in my way. All commands worked, just that xflux would revert it back.



Those who want to change their gamma/brightness:



Use xrandr to list your outputs:



$ xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
DVI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm


As you can see my output is DVI-0 to change the brightness:



xrandr --output DVI-0 --brightness 2


To change the gamma:



xrandr --output DVI-0 --gamma 2:2:1





share|improve this answer




















  • 3





    Is there an interactive gui for these xrandr settings? I can't fine one.

    – Fabio A.
    Feb 6 '17 at 13:40











  • @FabioA. If you haven't found a GUI yet you might want to post a new question on this site or Ask Ubuntu site.

    – WinEunuuchs2Unix
    Feb 4 '18 at 19:02


















1














I was hoping there was some interactive program for adjusting xrandr's settings (gamma/brightness in particular), but couldn't find anything.



So I wrote this shell script which allows some interactive adjustment of brightness/gamma, as well as saving/restoring the settings.



Save the file to irandr.sh, do a chmod u+x irandr.sh to make it executable, and run as ./irandr.sh <outputname>.



The d/f/D/F/j/k/J/K keys adjust the brightness (d/f/D/F) or gamma (j/k/J/K) settings by steps of 5 (lower case) or 1 (upper case.)




  • s saves the settings to the dotfile


  • l loads the settings from the dotfile


  • r resets brightness/gamma to the defaults (1.0)


  • q quits.

The dotfile for a given output is ~/irandr-<outputname>.dat. If you run without an argument, it will list the valid xrandr outputs.



You can append a -setonly argument to the command line, which will read the settings for the given display's dotfile, update the display, and exit. (Useful, perhaps, in a ~/.bashrc file to automatically set a gamma/brightness.)



#!/bin/bash
# irandr.sh, by Dale Gass (dale@gass.ca)
# Wed Apr 10 16:43:22 EDT 2019

# Process arguments
if [ "$1" != "" ]
then
output="$1"
else
echo "Usage: irandr.sh <outputname> [-setonly]"
echo "(Settings saved to ~/.xrandr-<outputname>.dat)"
echo
echo "Valid outputs:"
xrandr | egrep -v '^( |Screen)'
exit 1
fi
setonly=0
if [ "$2" = "-setonly" ]; then setonly=1; fi

# Initialize variables, read for dotfile if exists
cmdhelp="d/f/D/F=brightness j/k/J/K=gamma r=reset s=save l=load q=quit"
brightness=100
gamma=100
dotfile=~/.irandr-"$output".dat
if [ -s "$dotfile" ]; then read brightness gamma <"$dotfile"; fi
if [ $setonly -eq 0 ]; then
echo $cmdhelp
stty -echo raw intr $'00' # Allow single character input
fi

# Main loop for setting adjustment
echo 'Bright Gamma'
while :
do
b=$(bc <<< "scale=2; $brightness/100") # Make 0.0-1.0
g=$(bc <<< "scale=2; $gamma/100")
xrandr --output "$output" --brightness "$b" --gamma "$g:$g:$g"
printf "r%4d %4d " $brightness $gamma
if [ $setonly -eq 1 ]; then echo; exit 0; fi

read -n1 ch # Get input character from user
case $ch in
d) let brightness=brightness-5;; D) let brightness=brightness-1;;
f) let brightness=brightness+5;; F) let brightness=brightness+1;;
j) let gamma=gamma-5;; J) let gamma=gamma-1;;
k) let gamma=gamma+5;; K) let gamma=gamma+1;;
r) brightness=100; gamma=100;;
s) echo "$brightness $gamma" >"$dotfile" && echo -e "Savedr";;
l) read brightness gamma <"$dotfile" && echo -e "Loadedr";;
q|$'03') break;;
*) echo -e "$cmdhelpr";;
esac
done

stty echo -raw intr $'03' # Undo single character input





share|improve this answer










New contributor




Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f97721%2fhow-to-change-the-xorg-gamma-brightness%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    22














    Silly me! I have xflux with fluxgui activated, each time I would like to modify the settings xflux will be in my way. All commands worked, just that xflux would revert it back.



    Those who want to change their gamma/brightness:



    Use xrandr to list your outputs:



    $ xrandr
    Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
    DVI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm


    As you can see my output is DVI-0 to change the brightness:



    xrandr --output DVI-0 --brightness 2


    To change the gamma:



    xrandr --output DVI-0 --gamma 2:2:1





    share|improve this answer




















    • 3





      Is there an interactive gui for these xrandr settings? I can't fine one.

      – Fabio A.
      Feb 6 '17 at 13:40











    • @FabioA. If you haven't found a GUI yet you might want to post a new question on this site or Ask Ubuntu site.

      – WinEunuuchs2Unix
      Feb 4 '18 at 19:02















    22














    Silly me! I have xflux with fluxgui activated, each time I would like to modify the settings xflux will be in my way. All commands worked, just that xflux would revert it back.



    Those who want to change their gamma/brightness:



    Use xrandr to list your outputs:



    $ xrandr
    Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
    DVI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm


    As you can see my output is DVI-0 to change the brightness:



    xrandr --output DVI-0 --brightness 2


    To change the gamma:



    xrandr --output DVI-0 --gamma 2:2:1





    share|improve this answer




















    • 3





      Is there an interactive gui for these xrandr settings? I can't fine one.

      – Fabio A.
      Feb 6 '17 at 13:40











    • @FabioA. If you haven't found a GUI yet you might want to post a new question on this site or Ask Ubuntu site.

      – WinEunuuchs2Unix
      Feb 4 '18 at 19:02













    22












    22








    22







    Silly me! I have xflux with fluxgui activated, each time I would like to modify the settings xflux will be in my way. All commands worked, just that xflux would revert it back.



    Those who want to change their gamma/brightness:



    Use xrandr to list your outputs:



    $ xrandr
    Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
    DVI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm


    As you can see my output is DVI-0 to change the brightness:



    xrandr --output DVI-0 --brightness 2


    To change the gamma:



    xrandr --output DVI-0 --gamma 2:2:1





    share|improve this answer















    Silly me! I have xflux with fluxgui activated, each time I would like to modify the settings xflux will be in my way. All commands worked, just that xflux would revert it back.



    Those who want to change their gamma/brightness:



    Use xrandr to list your outputs:



    $ xrandr
    Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
    DVI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm


    As you can see my output is DVI-0 to change the brightness:



    xrandr --output DVI-0 --brightness 2


    To change the gamma:



    xrandr --output DVI-0 --gamma 2:2:1






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Oct 26 '13 at 21:25









    slm

    256k71544690




    256k71544690










    answered Oct 26 '13 at 19:28









    BraiamBraiam

    23.8k2078143




    23.8k2078143







    • 3





      Is there an interactive gui for these xrandr settings? I can't fine one.

      – Fabio A.
      Feb 6 '17 at 13:40











    • @FabioA. If you haven't found a GUI yet you might want to post a new question on this site or Ask Ubuntu site.

      – WinEunuuchs2Unix
      Feb 4 '18 at 19:02












    • 3





      Is there an interactive gui for these xrandr settings? I can't fine one.

      – Fabio A.
      Feb 6 '17 at 13:40











    • @FabioA. If you haven't found a GUI yet you might want to post a new question on this site or Ask Ubuntu site.

      – WinEunuuchs2Unix
      Feb 4 '18 at 19:02







    3




    3





    Is there an interactive gui for these xrandr settings? I can't fine one.

    – Fabio A.
    Feb 6 '17 at 13:40





    Is there an interactive gui for these xrandr settings? I can't fine one.

    – Fabio A.
    Feb 6 '17 at 13:40













    @FabioA. If you haven't found a GUI yet you might want to post a new question on this site or Ask Ubuntu site.

    – WinEunuuchs2Unix
    Feb 4 '18 at 19:02





    @FabioA. If you haven't found a GUI yet you might want to post a new question on this site or Ask Ubuntu site.

    – WinEunuuchs2Unix
    Feb 4 '18 at 19:02













    1














    I was hoping there was some interactive program for adjusting xrandr's settings (gamma/brightness in particular), but couldn't find anything.



    So I wrote this shell script which allows some interactive adjustment of brightness/gamma, as well as saving/restoring the settings.



    Save the file to irandr.sh, do a chmod u+x irandr.sh to make it executable, and run as ./irandr.sh <outputname>.



    The d/f/D/F/j/k/J/K keys adjust the brightness (d/f/D/F) or gamma (j/k/J/K) settings by steps of 5 (lower case) or 1 (upper case.)




    • s saves the settings to the dotfile


    • l loads the settings from the dotfile


    • r resets brightness/gamma to the defaults (1.0)


    • q quits.

    The dotfile for a given output is ~/irandr-<outputname>.dat. If you run without an argument, it will list the valid xrandr outputs.



    You can append a -setonly argument to the command line, which will read the settings for the given display's dotfile, update the display, and exit. (Useful, perhaps, in a ~/.bashrc file to automatically set a gamma/brightness.)



    #!/bin/bash
    # irandr.sh, by Dale Gass (dale@gass.ca)
    # Wed Apr 10 16:43:22 EDT 2019

    # Process arguments
    if [ "$1" != "" ]
    then
    output="$1"
    else
    echo "Usage: irandr.sh <outputname> [-setonly]"
    echo "(Settings saved to ~/.xrandr-<outputname>.dat)"
    echo
    echo "Valid outputs:"
    xrandr | egrep -v '^( |Screen)'
    exit 1
    fi
    setonly=0
    if [ "$2" = "-setonly" ]; then setonly=1; fi

    # Initialize variables, read for dotfile if exists
    cmdhelp="d/f/D/F=brightness j/k/J/K=gamma r=reset s=save l=load q=quit"
    brightness=100
    gamma=100
    dotfile=~/.irandr-"$output".dat
    if [ -s "$dotfile" ]; then read brightness gamma <"$dotfile"; fi
    if [ $setonly -eq 0 ]; then
    echo $cmdhelp
    stty -echo raw intr $'00' # Allow single character input
    fi

    # Main loop for setting adjustment
    echo 'Bright Gamma'
    while :
    do
    b=$(bc <<< "scale=2; $brightness/100") # Make 0.0-1.0
    g=$(bc <<< "scale=2; $gamma/100")
    xrandr --output "$output" --brightness "$b" --gamma "$g:$g:$g"
    printf "r%4d %4d " $brightness $gamma
    if [ $setonly -eq 1 ]; then echo; exit 0; fi

    read -n1 ch # Get input character from user
    case $ch in
    d) let brightness=brightness-5;; D) let brightness=brightness-1;;
    f) let brightness=brightness+5;; F) let brightness=brightness+1;;
    j) let gamma=gamma-5;; J) let gamma=gamma-1;;
    k) let gamma=gamma+5;; K) let gamma=gamma+1;;
    r) brightness=100; gamma=100;;
    s) echo "$brightness $gamma" >"$dotfile" && echo -e "Savedr";;
    l) read brightness gamma <"$dotfile" && echo -e "Loadedr";;
    q|$'03') break;;
    *) echo -e "$cmdhelpr";;
    esac
    done

    stty echo -raw intr $'03' # Undo single character input





    share|improve this answer










    New contributor




    Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      1














      I was hoping there was some interactive program for adjusting xrandr's settings (gamma/brightness in particular), but couldn't find anything.



      So I wrote this shell script which allows some interactive adjustment of brightness/gamma, as well as saving/restoring the settings.



      Save the file to irandr.sh, do a chmod u+x irandr.sh to make it executable, and run as ./irandr.sh <outputname>.



      The d/f/D/F/j/k/J/K keys adjust the brightness (d/f/D/F) or gamma (j/k/J/K) settings by steps of 5 (lower case) or 1 (upper case.)




      • s saves the settings to the dotfile


      • l loads the settings from the dotfile


      • r resets brightness/gamma to the defaults (1.0)


      • q quits.

      The dotfile for a given output is ~/irandr-<outputname>.dat. If you run without an argument, it will list the valid xrandr outputs.



      You can append a -setonly argument to the command line, which will read the settings for the given display's dotfile, update the display, and exit. (Useful, perhaps, in a ~/.bashrc file to automatically set a gamma/brightness.)



      #!/bin/bash
      # irandr.sh, by Dale Gass (dale@gass.ca)
      # Wed Apr 10 16:43:22 EDT 2019

      # Process arguments
      if [ "$1" != "" ]
      then
      output="$1"
      else
      echo "Usage: irandr.sh <outputname> [-setonly]"
      echo "(Settings saved to ~/.xrandr-<outputname>.dat)"
      echo
      echo "Valid outputs:"
      xrandr | egrep -v '^( |Screen)'
      exit 1
      fi
      setonly=0
      if [ "$2" = "-setonly" ]; then setonly=1; fi

      # Initialize variables, read for dotfile if exists
      cmdhelp="d/f/D/F=brightness j/k/J/K=gamma r=reset s=save l=load q=quit"
      brightness=100
      gamma=100
      dotfile=~/.irandr-"$output".dat
      if [ -s "$dotfile" ]; then read brightness gamma <"$dotfile"; fi
      if [ $setonly -eq 0 ]; then
      echo $cmdhelp
      stty -echo raw intr $'00' # Allow single character input
      fi

      # Main loop for setting adjustment
      echo 'Bright Gamma'
      while :
      do
      b=$(bc <<< "scale=2; $brightness/100") # Make 0.0-1.0
      g=$(bc <<< "scale=2; $gamma/100")
      xrandr --output "$output" --brightness "$b" --gamma "$g:$g:$g"
      printf "r%4d %4d " $brightness $gamma
      if [ $setonly -eq 1 ]; then echo; exit 0; fi

      read -n1 ch # Get input character from user
      case $ch in
      d) let brightness=brightness-5;; D) let brightness=brightness-1;;
      f) let brightness=brightness+5;; F) let brightness=brightness+1;;
      j) let gamma=gamma-5;; J) let gamma=gamma-1;;
      k) let gamma=gamma+5;; K) let gamma=gamma+1;;
      r) brightness=100; gamma=100;;
      s) echo "$brightness $gamma" >"$dotfile" && echo -e "Savedr";;
      l) read brightness gamma <"$dotfile" && echo -e "Loadedr";;
      q|$'03') break;;
      *) echo -e "$cmdhelpr";;
      esac
      done

      stty echo -raw intr $'03' # Undo single character input





      share|improve this answer










      New contributor




      Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        1












        1








        1







        I was hoping there was some interactive program for adjusting xrandr's settings (gamma/brightness in particular), but couldn't find anything.



        So I wrote this shell script which allows some interactive adjustment of brightness/gamma, as well as saving/restoring the settings.



        Save the file to irandr.sh, do a chmod u+x irandr.sh to make it executable, and run as ./irandr.sh <outputname>.



        The d/f/D/F/j/k/J/K keys adjust the brightness (d/f/D/F) or gamma (j/k/J/K) settings by steps of 5 (lower case) or 1 (upper case.)




        • s saves the settings to the dotfile


        • l loads the settings from the dotfile


        • r resets brightness/gamma to the defaults (1.0)


        • q quits.

        The dotfile for a given output is ~/irandr-<outputname>.dat. If you run without an argument, it will list the valid xrandr outputs.



        You can append a -setonly argument to the command line, which will read the settings for the given display's dotfile, update the display, and exit. (Useful, perhaps, in a ~/.bashrc file to automatically set a gamma/brightness.)



        #!/bin/bash
        # irandr.sh, by Dale Gass (dale@gass.ca)
        # Wed Apr 10 16:43:22 EDT 2019

        # Process arguments
        if [ "$1" != "" ]
        then
        output="$1"
        else
        echo "Usage: irandr.sh <outputname> [-setonly]"
        echo "(Settings saved to ~/.xrandr-<outputname>.dat)"
        echo
        echo "Valid outputs:"
        xrandr | egrep -v '^( |Screen)'
        exit 1
        fi
        setonly=0
        if [ "$2" = "-setonly" ]; then setonly=1; fi

        # Initialize variables, read for dotfile if exists
        cmdhelp="d/f/D/F=brightness j/k/J/K=gamma r=reset s=save l=load q=quit"
        brightness=100
        gamma=100
        dotfile=~/.irandr-"$output".dat
        if [ -s "$dotfile" ]; then read brightness gamma <"$dotfile"; fi
        if [ $setonly -eq 0 ]; then
        echo $cmdhelp
        stty -echo raw intr $'00' # Allow single character input
        fi

        # Main loop for setting adjustment
        echo 'Bright Gamma'
        while :
        do
        b=$(bc <<< "scale=2; $brightness/100") # Make 0.0-1.0
        g=$(bc <<< "scale=2; $gamma/100")
        xrandr --output "$output" --brightness "$b" --gamma "$g:$g:$g"
        printf "r%4d %4d " $brightness $gamma
        if [ $setonly -eq 1 ]; then echo; exit 0; fi

        read -n1 ch # Get input character from user
        case $ch in
        d) let brightness=brightness-5;; D) let brightness=brightness-1;;
        f) let brightness=brightness+5;; F) let brightness=brightness+1;;
        j) let gamma=gamma-5;; J) let gamma=gamma-1;;
        k) let gamma=gamma+5;; K) let gamma=gamma+1;;
        r) brightness=100; gamma=100;;
        s) echo "$brightness $gamma" >"$dotfile" && echo -e "Savedr";;
        l) read brightness gamma <"$dotfile" && echo -e "Loadedr";;
        q|$'03') break;;
        *) echo -e "$cmdhelpr";;
        esac
        done

        stty echo -raw intr $'03' # Undo single character input





        share|improve this answer










        New contributor




        Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        I was hoping there was some interactive program for adjusting xrandr's settings (gamma/brightness in particular), but couldn't find anything.



        So I wrote this shell script which allows some interactive adjustment of brightness/gamma, as well as saving/restoring the settings.



        Save the file to irandr.sh, do a chmod u+x irandr.sh to make it executable, and run as ./irandr.sh <outputname>.



        The d/f/D/F/j/k/J/K keys adjust the brightness (d/f/D/F) or gamma (j/k/J/K) settings by steps of 5 (lower case) or 1 (upper case.)




        • s saves the settings to the dotfile


        • l loads the settings from the dotfile


        • r resets brightness/gamma to the defaults (1.0)


        • q quits.

        The dotfile for a given output is ~/irandr-<outputname>.dat. If you run without an argument, it will list the valid xrandr outputs.



        You can append a -setonly argument to the command line, which will read the settings for the given display's dotfile, update the display, and exit. (Useful, perhaps, in a ~/.bashrc file to automatically set a gamma/brightness.)



        #!/bin/bash
        # irandr.sh, by Dale Gass (dale@gass.ca)
        # Wed Apr 10 16:43:22 EDT 2019

        # Process arguments
        if [ "$1" != "" ]
        then
        output="$1"
        else
        echo "Usage: irandr.sh <outputname> [-setonly]"
        echo "(Settings saved to ~/.xrandr-<outputname>.dat)"
        echo
        echo "Valid outputs:"
        xrandr | egrep -v '^( |Screen)'
        exit 1
        fi
        setonly=0
        if [ "$2" = "-setonly" ]; then setonly=1; fi

        # Initialize variables, read for dotfile if exists
        cmdhelp="d/f/D/F=brightness j/k/J/K=gamma r=reset s=save l=load q=quit"
        brightness=100
        gamma=100
        dotfile=~/.irandr-"$output".dat
        if [ -s "$dotfile" ]; then read brightness gamma <"$dotfile"; fi
        if [ $setonly -eq 0 ]; then
        echo $cmdhelp
        stty -echo raw intr $'00' # Allow single character input
        fi

        # Main loop for setting adjustment
        echo 'Bright Gamma'
        while :
        do
        b=$(bc <<< "scale=2; $brightness/100") # Make 0.0-1.0
        g=$(bc <<< "scale=2; $gamma/100")
        xrandr --output "$output" --brightness "$b" --gamma "$g:$g:$g"
        printf "r%4d %4d " $brightness $gamma
        if [ $setonly -eq 1 ]; then echo; exit 0; fi

        read -n1 ch # Get input character from user
        case $ch in
        d) let brightness=brightness-5;; D) let brightness=brightness-1;;
        f) let brightness=brightness+5;; F) let brightness=brightness+1;;
        j) let gamma=gamma-5;; J) let gamma=gamma-1;;
        k) let gamma=gamma+5;; K) let gamma=gamma+1;;
        r) brightness=100; gamma=100;;
        s) echo "$brightness $gamma" >"$dotfile" && echo -e "Savedr";;
        l) read brightness gamma <"$dotfile" && echo -e "Loadedr";;
        q|$'03') break;;
        *) echo -e "$cmdhelpr";;
        esac
        done

        stty echo -raw intr $'03' # Undo single character input






        share|improve this answer










        New contributor




        Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer








        edited Apr 10 at 23:17









        slm

        256k71544690




        256k71544690






        New contributor




        Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Apr 10 at 21:02









        DaleDale

        111




        111




        New contributor




        Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f97721%2fhow-to-change-the-xorg-gamma-brightness%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

            Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

            Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.