Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Monitor Enter Powersave when using Console?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Fri Apr 17, 2020 5:40 pm    Post subject: Monitor Enter Powersave when using Console? Reply with quote

When X is not running and my Gentoo system only has consoles, how do I have the video card put the monitor to sleep after an inactivity period? Or, where is there documentation?
(I am using an Nvidia card and using nvidia-drivers-440.64 and openrc)

When X is running, this is not an issue and using xscreensaver-demo I can adjust these settings.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Fri Apr 17, 2020 6:19 pm    Post subject: Reply with quote

setterm (specifically blank)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Fri Apr 17, 2020 7:08 pm    Post subject: Reply with quote

Thanks Anon-E-moose.

Looking at the man page I see setterm --blank or setterm --powersave which is good if you are logged in. How do I set this up for the displayed console when no one is logged in? (ie. the console is at the "login:" prompt)
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Fri Apr 17, 2020 7:37 pm    Post subject: Reply with quote

You could also feed the kernel the consoleblank parm

Code:
    consoleblank=   [KNL] The console blank (screen saver) timeout in
            seconds. A value of 0 disables the blank timer.
            Defaults to 0.


/usr/src/linux/Documentation/admin-guide/kernel-parameters.txt
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Sat Apr 18, 2020 4:51 pm    Post subject: Reply with quote

Anon-E-moose:

Yes, thanks, appending "consoleblank=60" to the end of the linux ... line in grub.cfg does cause a blank screen after 60-seconds of no keyboard activity when using the console (ie. no x11). However, it does not put the monitor in power save mode. Any idea on how to get my monitor to switch to power-save (or "sleep") mode when using the console and no keyboard activity?

I wonder if there is a way to do this in /etc/inittab
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Sat Apr 18, 2020 8:35 pm    Post subject: Reply with quote

I seem to be striking out on getting the console (no x11) to send the monitor into power save mode after a few min. of no key press.

I see no way to do this directly from agetty. (/etc/inittab)
Then I found a little info at the bottom of the following page that shows that I should be able to use something like:
Code:
$ setterm -powerdown 5 >> /etc/issue
to put the character sequence I need in /etc/issue which is displayed before the login prompt on the console. This did not work even though I logged in and then out of the console to ensure the extra characters were "displayed"
https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling
I tried that sequence at the beginning and end of /etc/issue.

Any ideas on this issue would be appreciated.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sat Apr 18, 2020 8:56 pm    Post subject: Reply with quote

Have you checked the monitor menu (I assume it has one) for auto off/sleep mode, that's usually done in the monitor.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland


Last edited by Anon-E-moose on Sat Apr 18, 2020 9:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sat Apr 18, 2020 9:03 pm    Post subject: Reply with quote

jagdpanther wrote:
I seem to be striking out on getting the console (no x11) to send the monitor into power save mode after a few min. of no key press.

I see no way to do this directly from agetty. (/etc/inittab)
Then I found a little info at the bottom of the following page that shows that I should be able to use something like:
Code:
$ setterm -powerdown 5 >> /etc/issue
to put the character sequence I need in /etc/issue which is displayed before the login prompt on the console. This did not work even though I logged in and then out of the console to ensure the extra characters were "displayed"
https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling
I tried that sequence at the beginning and end of /etc/issue.

Any ideas on this issue would be appreciated.


you might try

setterm --powersave powerdown (or one of the other options for powersave)

Code:
 --powersave     [on|vsync|hsync|powerdown|off]
                                   set vesa powersaving features
 --powerdown     [0-60]            set vesa powerdown interval in minutes

_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Sun Apr 19, 2020 1:04 am    Post subject: Reply with quote

Good idea on adding the "--powersave powerdown" option to setterm. Unfortunately this did not solve the issue.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Apr 19, 2020 10:37 am    Post subject: Reply with quote

You should play more with the setterm options. That's likely your best bet.

setterm -blank 10 -powerdown 15

The above should work given the explanation in the man page

I assume you also have acpi options set in the kernel.

Note: for playing/testing with it, I'd set the blank for 1 min and powerdown for 2

Edit to add: look at monitor menu and make sure power saving is enabled there (if allowed)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
spam
n00b
n00b


Joined: 24 Feb 2003
Posts: 10
Location: Nebraska

PostPosted: Wed Jul 27, 2022 12:45 pm    Post subject: Reply with quote

I was just dealing with this myself. The issue was that the framebuffer driver I was using (efifb) didn't support powersave mode. Once I enabled the DRM framebuffer driver for my GPU (https://wiki.gentoo.org/wiki/Framebuffer#DRM_framebuffer_drivers), I could use setterm to enable powersave, and the monitor would actually sleep.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2963
Location: Edge of marsh USA

PostPosted: Thu Jul 28, 2022 3:41 am    Post subject: Reply with quote

Here is the last line in my /etc/baselayout1.start
Code:
setterm -term linux -blank 2 -powerdown 2 > /dev/console

Here is where I found the answer:
https://stackoverflow.com/questions/66537659/automating-setterm
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum