How do I adjust the screen brightness using CMD prompt in XFCE?

How do I adjust the screen brightness using CMD prompt in manj XFCE?

The screen brightness is adjusted via the dedicated keyboard shortcuts.
In any DE.

What command is triggered each time one of the + or - buttons is pressed?

… would be a better question, I think.

My screen brightness changed on me a few days ago without doing anything to my comp. The screen brighness buttons also stopped working so I can’t use them. I need to adjust my screen brightness and I seen someone in a related post tell someone to use the CMD promt to adjust the brightness. That’s what I need to do to get my brighness to adjust. I guess.

I don’t know what you mean <<<What command is triggered each time one of the + or - buttons is pressed?>>>

I could suggest at least one way - after some research, because it has been a while that I used it (on BSD).

But that is not the proper way.

The proper way is to fix it - it did work, but now it doesn’t anymore.
What changed since then?

it’s a bit like an XY problem.

https://xyproblem.info/

solve the cause, not the issue caused by it …

that may be … hard to debug … but working around it is the wrong approach, in my opinion

2 Likes

This is an interesting take - generally, Screen brightness can be controlled with keyboard shortcuts (for me, with a knob, I can hold Alt to modify the knob to control brightness.

Now, to control the monitor - you have to communicate with the monitor which isn’t quite as simple as it sounds (depends on hardware).

xbacklight command would be the terminal answer here…

You can use direct commands xbacklight -set 50 for 50%, or use ā€˜-inc 10’ or ā€˜-dec 10’ for 10% adjustments… but xbacklight might not work on all hardware - and probably nVidia will throw a spanner in the works if it is able.

Manjaro also has brightnessctl, though I have no idea whether it would work for me, as I can use a hidden panel applet to scroll, or my keyboard knob directly.

I’m curious, though, why you would need to open a terminal to do this task - though possibly it could be interesting to have a script to wake up your machine, then set brightness to suit your morning taste - and possibly also adjust the brightness at dusk to a lower level.

On Plasma, the keyboard shortcuts includes power management ā€˜Monitor Brightness Up/Down’ (mapped to ā€˜Alt+Volume Up/Down’)… negating the requirement for dedicated keyboard shortcuts (I think I must switch my keyboard to ā€˜MAC’ mode to bring those functions to the Fn_F keys).

4 Likes

In Xfce, you should also be able to adjust brightness via the battery icon in the Panel, either by clicking it and setting the slider or by hovering the pointer over it and using the mouse scroll wheel or trackpad edge.

It may also help if you provide the output of inxi -zv8. :wink:

Backlight - ArchWiki

Screen brightness might be tricky to control. On some machines physical hardware switches are missing and software solutions may not work well. However, it is generally possible to find a functional method for a given hardware.

the control method can be divided into these categories:

  • brightness is controlled by vendor-specified hotkey and there is no interface for the OS to adjust the brightness.
  • brightness is controlled by either the ACPI, graphic or platform driver. In this case, backlight control is exposed to the user through /sys/class/backlight which can be used by user-space backlight utilities.
  • brightness is controlled by writing into a graphics card register through setpci.

Backlight - xbacklight - ArchWiki

  • xbacklight only works with Intel. Other drivers did not add support for the RandR backlight property.
  • xbacklight currently does not work with the modesetting driver

xfce4-power-manager:panel-plugin [Xfce Docs]

Display Brightness

Allows control of the laptop’s display brightness with the slider

xfce4-power-manager:preferences [Xfce Docs]

Brightness buttons

If you want to control screen brightness with the laptop function keys, enable the Handle display brightness keys option. When this options is unchecked, the brightness keys are not handled by the Power Manager but directly by the kernel (if supported).

Hidden setting: Minimum brightness value

Depending on your hardware and setup you may want to specify a minimum brightness level. On some hardware the brightness handling allows the display to be turned off completely, which can be problematic if the user does not know how to turn up the brightness again. To enable this setting run this command (ā€œ5ā€ being an example minimum value).

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -s 5

Alternatively you can also create the property via xfce4-settings-editor.

2 Likes