I'm running Ubuntu Server on an old iMac. The server monitor does not shut off after boot, but that only started happening after a recent update. Until now, setterm -blank 10 in my ~/.bashrc did the trick (and, yes, I did try --blank instead of -blank, even though the latter has been working for months). But now, it stays on constantly.
I've tried the following (via ssh):
sudo vbetool dpms off
mmap /dev/zero: Operation not permitted
Failed to initialise LRMI (Linux Real-Mode Interface).
I edited /etc/sudoers by granting myuname ALL=(ALL) NOPASSWD: /usr/sbin/vbetool, but to no effect.
sudo xset dpms force off
xset: unable to open display ""
xrandr --query
Can't open display.
The $DISPLAY environment variable is not set.
Neither ps aux | grep "X " nor ps aux | grep -i display produce any output to help identify display IDs.
And that's the depth of my toolbox, I'm afraid. Any help to shut off my monitor would be greatly appreciated.
xset -display :0 dpms force offworks for me (withoutsudo). – Jos Jul 12 '21 at 22:30ls /tmp/.X11-unix/? Every X display should correspond to an entry there. – Jos Jul 12 '21 at 22:38total 8.0K drwxrwxrwt 2 root root 4.0K Jul 12 20:59 . drwxrwxrwt 16 root root 4.0K Jul 12 21:31 ..– chaoborid Jul 12 '21 at 22:40vbetool dpms offstill seems to be the way to go. – Jos Jul 12 '21 at 22:43vbetool dpms off(without sudo) as I reported above. It's not clear to me what "Failed to initialise LRMI (Linux Real-Mode Interface)" means. – chaoborid Jul 12 '21 at 22:46https://bugs.launchpad.net/ubuntu/+source/vbetool/+bug/1875240where a solution for this error was found: editinggrubby addingiomem=relaxed, and rebooting. – Jos Jul 12 '21 at 22:49iomem=relaxed(updating grub, and rebooting), as well as using themount -o remount,exec /devwhich was recorded as a solution on that bug report. Both yielded the same LRMI initialization error when running the vbetool. – chaoborid Jul 12 '21 at 23:06consoleblank=60to theGRUB_CMDLINE_LINUX_DEFAULT=in the/etc/default/grubfile, then runsudo update-gruband reboot the system. 1 minute (60 seconds) after boot, the monitor should turn off. – Terrance Jul 12 '21 at 23:52