Set the screen brightness: xbacklight does not work on HDMI, xrandr --brightness does not stick

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
8
down vote

favorite
1












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 :)










share|improve this question



























    up vote
    8
    down vote

    favorite
    1












    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 :)










    share|improve this question

























      up vote
      8
      down vote

      favorite
      1









      up vote
      8
      down vote

      favorite
      1






      1





      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 :)










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 24 '16 at 21:04









      Gilles

      511k12010091540




      511k12010091540










      asked Jul 24 '16 at 11:34









      tuxedozombie

      4815




      4815




















          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





          share|improve this answer
















          • 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 of lspci | grep 'vga' and glxinfo | grep "OpenGL vendor string" ?
            – GAD3R
            Jul 25 '16 at 8:35










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f297935%2fset-the-screen-brightness-xbacklight-does-not-work-on-hdmi-xrandr-brightness%23new-answer', 'question_page');

          );

          Post as a guest






























          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





          share|improve this answer
















          • 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 of lspci | grep 'vga' and glxinfo | grep "OpenGL vendor string" ?
            – GAD3R
            Jul 25 '16 at 8:35














          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





          share|improve this answer
















          • 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 of lspci | grep 'vga' and glxinfo | grep "OpenGL vendor string" ?
            – GAD3R
            Jul 25 '16 at 8:35












          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





          share|improve this answer












          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






          share|improve this answer












          share|improve this answer



          share|improve this answer










          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 of lspci | grep 'vga' and glxinfo | grep "OpenGL vendor string" ?
            – GAD3R
            Jul 25 '16 at 8:35












          • 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 of lspci | grep 'vga' and glxinfo | 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

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?