Mailinglist Archive: opensuse (1352 mails)

< Previous Next >
Re: [opensuse] leap15 - how do I enable display power saving ?
On 05/25/2018 03:29 AM, Per Jessen wrote:
Per Jessen wrote:

Per Jessen wrote:

On Leap15.0 (HP L1950, xgi z7/z9, via kvm) I'm trying out the
following:

/etc/systemd/system/getty@.service.d/powersave.conf :

[Service]
ExecStartPost=/usr/bin/setterm -powersave on -blank 2 -powerdown 5

When a new console is started (ctrl-fx), I got this:

setterm[1510]: setterm: cannot (un)set powersave mode: Inappropriate
ioctl for device

I changed to this:

# /etc/systemd/system/getty@.service.d/powersave.conf
[Service]
Environment=TERM=linux
ExecStartPost=/usr/bin/setterm -powersave on -blank 2 -powerdown 5
/dev/%I

but I still get that message. I'm going to go see what Google says
about it.



The problem is the default was stripped and this is yet another "feature" that
was apparently turned over to systemd -- the only problem is nobody ever
implemented a service for consoleblank so all monitors not under X just remain
on forever (so much for energy conservation...)

To fix it we need a service file for console blanking. (we need a package,
but..), you can create a custom service, e.g.

/usr/lib/systemd/system/console-blanking.service

Just create/edit the file (adjust as desired) and add:

[Unit]
Description=Enable virtual console blanking and poweroff

[Service]
Type=oneshot
Environment=TERM=linux
StandardOutput=tty
TTYPath=/dev/console
ExecStart=/usr/bin/setterm -blank 5 -powerdown 6

[Install]
WantedBy=multi-user.target

Then reload the systemd daemon

# systemctl daemon-reload

and enable/start the service

# systemctl enable console-blanking
# systemctl start console-blanking

Things are good again:

$ cat /sys/module/kernel/parameters/consoleblank
300

(thanks to Celti on the Arch list for the service file...)

--
David C. Rankin, J.D.,P.E.

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >