how to set brightness

Forum Forums New users New Users and General Questions how to set brightness

  • This topic has 9 replies, 6 voices, and was last updated Sep 26-9:56 pm by manyroads.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #53922
    Member
    stephenbbb

      Hello,

      is it possible to set the screen brightness in a config file, so it will use that level after a restart?
      also is it possible to make antix use the keys on the laptop keyboard that increase/decrease brightness? there is a blue FN key and when pressed in combination with the left arrow, it should decrease the screen brightness.
      I know I can do that by running the control center and then the special tool for brightness.
      Thanks everybody.
      S

      #53932
      Forum Admin
      Dave
        Helpful
        Up
        0
        ::

        Currently you can add
        backlight-brightness -s 50
        to your startup file (~/.desktop-session/startup or ~/.wm/startup) where 50 is percentage value from 0-100.
        Maybe we can make this more streamlined.

        The up and down keys can be handled in a similar way by binding the key pair to run
        backlight-brightness +10
        or
        backlight-brightness -10

        Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

        #53966
        Member
        stephenbbb
          Helpful
          Up
          0
          ::

          I use Icewm. setting the startup value worked.
          then I tried:

          
          key "Fn+KP_Left" backlight-brightness -10
          key "Fn+KP_Right" backlight-brightness +10
          

          and that does not work. there are no examples of how to refer to the blue Fn key and I am not sure if KP_Left is the correct way to refer to my left arrow key. this is a laptop without a number pad on the right.

          #53967
          Moderator
          Brian Masinick
            #53968
            Forum Admin
            Dave
              Helpful
              Up
              0
              ::

              You should be able to use the command ‘xev’ to find the key map names.

              Edit: Being a function key they may not show up. If they do not I am not 100% certain on how to make them work. You may be able to change the behaviour in the bios. It may also be made to work by adding / modifying acpi settings via the grub boot line (such as acpi_osi= ).

              • This reply was modified 2 years, 2 months ago by Dave.

              Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

              #67577
              Member
              ensabahnur
                Helpful
                Up
                0
                ::

                I’m facing the same problem here, did you figure out how to set the brightness using the brightness key from the laptop? 🙂

                #67629
                Member
                stephenbbb
                  Helpful
                  Up
                  0
                  ::

                  I could never figure out how to refer to the keys on my laptop even after looking at the keymap reference provided. the only line in my .icewm/startup is the line setting initial brightness to 50%. however, the keys started working after updating some antix system files. try updating your antix.

                  #67631
                  Member
                  Xecure
                    Helpful
                    Up
                    1
                    ::

                    Editing the keys file for your preferred window manager.

                    For icewm:

                    ###Brightness keys
                    key "XF86MonBrightnessDown" backlight-brightness -5
                    key "XF86MonBrightnessUp"   backlight-brightness +5

                    For fluxbox:

                    ! Brightness keys
                    XF86MonBrightnessDown :ExecCommand backlight-brightness -5
                    XF86MonBrightnessUp :ExecCommand backlight-brightness +5

                    For jwm:

                    <Key key="XF86MonBrightnessDown" exec:backlight-brightness -5</Key>
                    <Key key="XF86MonBrightnessUp" exec:backlight-brightness +5</Key>

                    I took them from the latest update to antiX 21 (not sure if also available in antiX 19)

                    antiX Live system enthusiast.
                    General Live Boot Parameters for antiX.

                    #67950
                    Member
                    ensabahnur
                      Helpful
                      Up
                      0
                      ::

                      Unfortunately none of these keys worked here on any windows manager. 🙁

                      I don’t know if is related with kernel problem or kernel commands or sysvinit config, but in MX is working flawlessly. However my machine supports only antiX its really a pretty old one.

                      Anyway, thanks a lot for your answers guys.

                      #67957
                      Member
                      manyroads
                        Helpful
                        Up
                        0
                        ::

                        Have you tried using brightnessctl? From your start script(s) you should be able to define any key binding. Here’s what I use:

                        I start this in .xsessionrc:

                        # shared common keybindings (applications)
                        sxhkd -c ~/.config/sxhkd/base.conf &

                        Then in base.conf I have:

                        #Brightness control
                        XF86MonBrightnessDown
                        	sudo brightnessctl s 10%- && notify-send -u normal -t 5000 "Backlight    (Down)"
                        XF86MonBrightnessUp
                        	sudo brightnessctl s 10%+  && notify-send -u normal -t 5000 "Backlight    (Up)"

                        You could define XF86MonBrightnessDown (if you don’t have that) to be something like:

                        #Brightness control
                        Super + d
                        	sudo brightnessctl s 10%- && notify-send -u normal -t 5000 "Backlight    (Down)"
                        • This reply was modified 1 year, 7 months ago by manyroads.

                        Pax vobiscum,
                        Mark Rabideau - http://many-roads.com
                        "For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
                        dwm & i3wm ~Reg. Linux User #449130
                        20 Jan 2021 ~ "End of an Error"

                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • You must be logged in to reply to this topic.