You are not logged in.

#1 2026-05-11 14:55:51

Everything2067
Member
Registered: 2025-06-29
Posts: 110

[SOLVED] (niri) Turn off display from the command line

One thing I have not figured out is how to turn off my PC (not a laptop) display in Linux.
The display is a built-in display (not a monitor, somewhat like a laptop display) and is the only one connected to this PC. GNOME and Plasma are able to turn off this display (I have set up a 5 minute timer to do that in both). I am currently using niri and pressing Super+Shift+P can also turn off this display.
Changing the brightness does work with brightnessctl.

What I have tried till now-

xset dpms force off
# xset:  unable to open display ""

# Did not run command as root since it seems to be accessing /dev/mem for some reason
vbetool dpms off
# open /dev/mem: Permission denied

ddcutil obviously does not work since it's not an external monitor.
I have also tried some xrandr related commands that don't seem to work.
Also followed https://wiki.archlinux.org/title/Backlight.

Last edited by Everything2067 (2026-05-11 15:37:24)


How it feels to run shred/wipe in a COW system

Offline

#2 2026-05-11 15:06:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,197

Re: [SOLVED] (niri) Turn off display from the command line

Wayland compositors implement this themselves and often need custom tooling, you have to look for "how to turn off display in niri"  which brings us to https://github.com/niri-wm/niri/discuss … t-12654962 and the "niri msg output" command.

According to the FAQ niri also supports a subset of the WLR protocol, in which case wlr-randr might work as well.

Last edited by V1del (2026-05-11 15:12:09)

Offline

#3 2026-05-11 15:08:34

cryptearth
Member
Registered: 2024-02-03
Posts: 2,161

Re: [SOLVED] (niri) Turn off display from the command line

sudo shutdown now

Offline

#4 2026-05-11 15:34:47

Everything2067
Member
Registered: 2025-06-29
Posts: 110

Re: [SOLVED] (niri) Turn off display from the command line

niri msg output works but I could not turn the display back on by simply shaking the mouse so I had to log into a tty and turn on the display.

But then I found niri msg action power-off-monitors and it did exactly what I wanted. Thank you.


How it feels to run shred/wipe in a COW system

Offline

Board footer

Powered by FluxBB