Disable screen saver on Ubuntu minimum

Post Reply
hsu95066
Posts: 51
Joined: Wed Aug 10, 2016 5:01 pm
languages_spoken: Chinese, English
ODROIDs: C1, C1+, C2, XU4
Has thanked: 3 times
Been thanked: 6 times
Contact:

Disable screen saver on Ubuntu minimum

Unread post by hsu95066 » Mon May 13, 2019 7:46 pm

Hi,

I follow by "ubuntu_minimal_quick_guide" document - Disable screen blank to disable screen saver.

Open /etc/rc.local with your favorite editor and add this on the second line.
setterm -blank 0 -powerdown 0 -powersave off
But it still sleeped after 10 minutes.
Is my approach correct?

joy
Posts: 1057
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 58 times
Been thanked: 110 times
Contact:

Re: Disable screen saver on Ubuntu minimum

Unread post by joy » Tue May 14, 2019 9:43 am

Hi hsu95066,

I've checked it today and as I tested, it works.
Default console value is "600" and after the setup, the value will be changed to "0".

Code: Select all

$ cat /sys/module/kernel/parameters/consoleblank 
600
$ setterm -blank 0 -powerdown 0 -powersave off
$ cat /sys/module/kernel/parameters/consoleblank 
0
(updated)
I think the init logic of setterm on /etc/rc.local seems not to be working.

Code: Select all

(from log of /var/log/syslog )
setterm: terminal vt220 does not support --blank
setterm: cannot (un)set powersave mode: Inappropriate ioctl for device

joy
Posts: 1057
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 58 times
Been thanked: 110 times
Contact:

Re: Disable screen saver on Ubuntu minimum

Unread post by joy » Tue May 14, 2019 11:02 am

Hello @hsu96066,
Could you try this?

[ Approach 1 : add consoleblank on kernel command ]
Please add consoleblank=0 in bootargs of boot.ini.
Then, do system reboot.

Code: Select all

# Boot Args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnam
es=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmod
e=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan}"

setenv bootargs ${bootargs} consoleblank=0
After reboot, you can check "consoleblank" is set as "0".

Code: Select all

$ cat /sys/module/kernel/parameters/consoleblank 
0
[ Approach 2 : add setterm setting in ~/.bashrc]
Please add the line at the end of /root/.bashrc.

Code: Select all

$ setterm -blank 0 -powerdown 0 -powersave off
But for this approach, you need to log-in as the user root on display console. (or another user id) to activate .bashrc.
Last edited by joy on Tue May 14, 2019 11:43 am, edited 1 time in total.
These users thanked the author joy for the post:
hsu95066 (Tue May 14, 2019 12:35 pm)

hsu95066
Posts: 51
Joined: Wed Aug 10, 2016 5:01 pm
languages_spoken: Chinese, English
ODROIDs: C1, C1+, C2, XU4
Has thanked: 3 times
Been thanked: 6 times
Contact:

Re: Disable screen saver on Ubuntu minimum

Unread post by hsu95066 » Tue May 14, 2019 11:19 am

Hi joy,

I am now testing approach 1, and the full test takes about 1 hour.
Thanks you!

joy
Posts: 1057
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 58 times
Been thanked: 110 times
Contact:

Re: Disable screen saver on Ubuntu minimum

Unread post by joy » Tue May 14, 2019 11:35 am

@hsu95066,
Thanks for the update. :)
Please share the result once it's done.
Your test will be very helpful for other users and I will update the wiki page guide following your update.
Also I'm testing it for 30 mins.

In case of the approach 2, you need to log-in as "root" to activate .bashrc logic.
So I hope approach 1 works without any problem.

hsu95066
Posts: 51
Joined: Wed Aug 10, 2016 5:01 pm
languages_spoken: Chinese, English
ODROIDs: C1, C1+, C2, XU4
Has thanked: 3 times
Been thanked: 6 times
Contact:

Re: Disable screen saver on Ubuntu minimum

Unread post by hsu95066 » Tue May 14, 2019 12:34 pm

Hi joy,

The Ubuntu minimum fail to boot by approach 1 after reboot.
Then, I directly append consoleblank=0 in bootargs of boot.ini.

Code: Select all

# Boot Args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnam
es=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmod
e=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} consoleblank=0"
After rebooting, I check that "consoleblank" is indeed "0".
It won't sleep after more than 10 minutes.

Approach 2 also work fine.
These users thanked the author hsu95066 for the post:
joy (Tue May 14, 2019 1:51 pm)

joy
Posts: 1057
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 58 times
Been thanked: 110 times
Contact:

Re: Disable screen saver on Ubuntu minimum

Unread post by joy » Tue May 14, 2019 1:51 pm

Hi hsu95066,
Thank you so much for sharing your test result! :)
I've updated the wiki page.
https://wiki.odroid.com/odroid-n2/ubunt ... reen_blank

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: Google [Bot] and 0 guests