1

I have two macbooks, one running 16.04 server, another running 18.04 server. I'm trying to disable the monitors to save power

It seems setterm is the command I should be using based on this power management doc and this post

If instead you're using the Linux console (not X-Windows), you'll want to use setterm(1):

I've tried a couple of the commands to no avail

  • setterm --powersave on
  • setterm --half-bright on
  • setterm --powersave powerdown

Essentially nothing happens when I run these commands. I'm running them at a console on the laptop itself (not over SSH).

setterm --cursor off|on do work, so I feel like setterm is the right direction, but for some reason the power management options do nothing. Maybe there's something I could install that would fix that?

I was looking into disabling kernel modules as well, I've got the nouveau driver, when I run sudo rmmod -f nouveau I get

rmmod: ERROR: ../libkmod/libkmod-module.c:793 kmod_module_remove_module() could not remove 'nouveau': Resource temporarily unavailable
rmmod: ERROR: could not remove module nouveau: Resource temporarily unavailable

I also tried changing the keyboard layout to a Macbook layout and using the built-in keys, but when I press the function key and the appropriate function key to change the brightness, it just acts as if I'm typing random characters into the terminal.

How can I power off my displays?

1 Answers1

0

Try setterm -blank force. You can also try using xrandr to set the brightness to 0. Use xrandr to get your display name and do xrandr --output <display name here> --brightness 0.

Related questions I found: https://unix.stackexchange.com/questions/366868/macbook-ubuntu-server-how-can-i-have-the-screen-turn-off-when-lid-closed-but-k Manually turn off monitor

Edit: If that doesn’t work, try using DPMS to turn off your monitor. You can use xset. Or, you can also use vbetool although they seem to be the same.

sleep 3; xset dpms force off (note: the sleep is needed so that it doesn’t turn back on which is a known bug with xset dpms force off)

vbetool dpms off

  • I've tried setterm -blank force, but it doesn't power off the display, it just blanks it out. I also tried xrandr, that is for X, which I'm not using. – quickshiftin Nov 27 '18 at 01:22