I'm in the process of moving from a machine running 20.04 (windowing system X11) to a new one running 22.04 (windowing system Wayland), and I have not been able to find a functional method for adjusting monitor brightness from the command line.
I have tried the following on the new machine:
- Running
xrandr --output MONITOR_NAME --brightness 0.5
(on my new machineMONITOR_NAME
isXWAYLAND0
or similar, while on the old it wasHDMI-1
): the command appears to run without error, but the brightness does not change. - Changing the windowing system from Wayland back to X11 (as suggested by this post): this seemed to cause unrecoverable screen freezes, and I had to force several reboots before I was able to put it back to Wayland.
- Using
wlr-randr
: I get an error that sayscompositor doesn't support wlr-output-management-unstable-v1
, and further investigation indeed suggests gnome doesn't support wlr-randr
Has anyone come up with a functional method for changing brightness from the command line in 22.04 with Wayland as the windowing system?
(My end goal here is to be able to run an alias dim
in the terminal and have it dim my external monitor to a pre-selected level, which worked very nicely on my old laptop but doesn't seem possible now.)
Edit: The solutions suggested in this question also don't seem to work so far, since I'm specifically hoping to adjust brightness on an external monitor.
gammastep
throws the errorError: Failed to start adjustment method: wayland
(and doesn't seem like an optimized tool for brightness-specific changes in the first place)- As noted in the other question,
brightnessctl
andlight
don't recognize external monitors - it looks like there might be an option to fiddle around with a kernel module and getbrightnessctl
to work, so I'm going to try that next, but I'd still prefer a solution that doesn't require that. - As noted above,
wlr-randr
isn't supported by gnome