Centos 8 minimal install screen enable powersave

Issues related to hardware problems
Post Reply
jjasoncool
Posts: 9
Joined: 2019/10/27 05:23:16

Centos 8 minimal install screen enable powersave

Post by jjasoncool » 2020/08/25 08:14:56

I have google many answers, but I can't found any useful solution.
I have try to execute `setterm --blank 3 --powerdown 5 --powersave powerdown`
When I leave the computer, I want to make the screen blank to save power.
But when I reboot, the setting will be reset to the default value (the screen is always displayed).

Is there any method to set screen powersave so that it will not fail after reboot?
(I don't use rc.local because this is deprecated way.)
And why `setterm` can't be use in ssh?
https://imgur.com/nh3Ut9d

Thank you.

tunk
Posts: 768
Joined: 2017/02/22 15:08:17

Re: Centos 8 minimal install screen enable powersave

Post by tunk » 2020/08/25 11:27:07

You could try to set it in .bashrc and .bash_profile

jjasoncool
Posts: 9
Joined: 2019/10/27 05:23:16

Re: Centos 8 minimal install screen enable powersave

Post by jjasoncool » 2020/08/26 14:40:44

tunk wrote:
2020/08/25 11:27:07
You could try to set it in .bashrc and .bash_profile
.bashrc need to login to shell, I need the script be execute on boot.

BShT
Posts: 278
Joined: 2019/10/09 12:31:40

Re: Centos 8 minimal install screen enable powersave

Post by BShT » 2020/08/26 20:21:19

rc.local is deprecated but it works

@reboot at crontab also works

it is simpler then create a systemd service unit

jjasoncool
Posts: 9
Joined: 2019/10/27 05:23:16

Re: Centos 8 minimal install screen enable powersave

Post by jjasoncool » 2020/08/28 08:45:52

BShT wrote:
2020/08/26 20:21:19
rc.local is deprecated but it works

@reboot at crontab also works

it is simpler then create a systemd service unit
Thank you, big helps!
I will try crontab

jjasoncool
Posts: 9
Joined: 2019/10/27 05:23:16

Re: Centos 8 minimal install screen enable powersave

Post by jjasoncool » 2020/09/03 03:35:35

BShT wrote:
2020/08/26 20:21:19
rc.local is deprecated but it works

@reboot at crontab also works

it is simpler then create a systemd service unit
Can I ask a question?
should I need to use which user to set "crontab -e"?
root or any user?

and the log files say:
setterm: $TERM is not defined.

BShT
Posts: 278
Joined: 2019/10/09 12:31:40

Re: Centos 8 minimal install screen enable powersave

Post by BShT » 2020/09/03 11:30:37

you are not logged you have no terminal

jjasoncool
Posts: 9
Joined: 2019/10/27 05:23:16

Re: Centos 8 minimal install screen enable powersave

Post by jjasoncool » 2020/09/07 02:36:52

BShT wrote:
2020/09/03 11:30:37
you are not logged you have no terminal
If I want to make screen blank at this screen.
https://imgur.com/TU3HUDV
Is this possible?

jjasoncool
Posts: 9
Joined: 2019/10/27 05:23:16

Re: Centos 8 minimal install screen enable powersave

Post by jjasoncool » 2020/09/08 15:59:30

jjasoncool wrote:
2020/09/07 02:36:52
BShT wrote:
2020/09/03 11:30:37
you are not logged you have no terminal
If I want to make screen blank at this screen.
https://imgur.com/TU3HUDV
Is this possible?
problem solved.
Record for others' reference.

Code: Select all

setterm --term=linux --blank 3 --powerdown 5 --powersave powerdown >> /var/log/crontab/screenblank.log 2>&1

Post Reply

Return to “CentOS 8 - Hardware Support”