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












8














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
















bumped to the homepage by Community 8 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    8














    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
















    bumped to the homepage by Community 8 hours ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      8












      8








      8


      2





      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

      529k12810601585




      529k12810601585










      asked Jul 24 '16 at 11:34









      tuxedozombie

      5315




      5315





      bumped to the homepage by Community 8 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 8 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          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



















          0














          Are you using redshift?



          I had your exact same issue and it was resolved by killing redshift.



          killall redshift

          xrandr --output HDMI-0 --brightness .5





          share|improve this answer





















            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%2f297935%2fset-the-screen-brightness-xbacklight-does-not-work-on-hdmi-xrandr-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









            0














            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
















            0














            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














            0












            0








            0






            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

            25.5k1750107




            25.5k1750107








            • 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













            0














            Are you using redshift?



            I had your exact same issue and it was resolved by killing redshift.



            killall redshift

            xrandr --output HDMI-0 --brightness .5





            share|improve this answer


























              0














              Are you using redshift?



              I had your exact same issue and it was resolved by killing redshift.



              killall redshift

              xrandr --output HDMI-0 --brightness .5





              share|improve this answer
























                0












                0








                0






                Are you using redshift?



                I had your exact same issue and it was resolved by killing redshift.



                killall redshift

                xrandr --output HDMI-0 --brightness .5





                share|improve this answer












                Are you using redshift?



                I had your exact same issue and it was resolved by killing redshift.



                killall redshift

                xrandr --output HDMI-0 --brightness .5






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 25 '18 at 6:02









                Sean Wright

                1




                1






























                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2f297935%2fset-the-screen-brightness-xbacklight-does-not-work-on-hdmi-xrandr-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

                    宮崎県

                    濃尾地震

                    6月16日