# Blanking Console Screen



## ksiu (Jun 28, 2021)

Hi,

How do I get the console screen to automatically go blank when there is no keyboard/mouse action for a period of time?
Right now, the console screen stays on forever.

By console, I mean the login screen right after I boot up the computer, and before I type "startx".

And this is a Thinkpad T440P laptop.  Thanks!

`$ uname -a
FreeBSD tb440.localhost 12.2-RELEASE-p7 FreeBSD 12.2-RELEASE-p7 GENERIC  amd64
$`


----------



## CuatroTorres (Jun 28, 2021)

`sleep n` + `clear` in ~/.bashrc? x11/xlockmore?


----------



## ksiu (Jun 28, 2021)

CuatroTorres said:


> `sleep n` + `clear` in ~/.bashrc? x11/xlockmore?


sorry, I meant automatically go blank.


----------



## mer (Jun 28, 2021)

vidcontrol -t N where N is in seconds.
If that works, there should be a hook in /etc/rc.conf (or /etc/defaults/rc.conf) named blanktime or something that should get called from somewhere.  It's been a while since I've tried or used it.


----------



## CuatroTorres (Jun 28, 2021)

What mer said is probably what you're looking for if you want to put the screen to idle. I understood that you wanted to clear the framebuffer between login and startx, I bypassed the keyboard inactivity and transcribed in my mind _blanking _(empty) to _clear up_. 



> x11/xlockmore -> security/vlock, I meant


----------



## Phishfry (Jun 28, 2021)

You could also poke around /etc/ttys.
The FreeBSD bsdinstaller script has a Hardening option for -Secure Console-
It should have a setting for time before it blanks.
As seen on line 84 of /usr/src/usr.sbin/bsdinstall/scripts/hardening

```
sed "s/unknown    off secure/unknown    off insecure/g" $BSDINSTALL_CHROOT/etc/ttys > $BSDINSTALL_TMPETC/ttys.hardening
```


----------



## Phishfry (Jun 28, 2021)

Related thread:








						Configuring tty for incoming connections
					

I have a serial port on my server which I want to connect to. But when I try to connect to this port via console cable, I can not see any outputs on the screen but I can hit any keys as inputs. The related device is /dev/ttyu2. Here's my relevant part of my /etc/ttys file:  console	none...




					forums.freebsd.org
				











						who keeping history
					

Maybe I don't understand something... But command who shows who is currently online. I'm using 2 desktops to connect to server. If I use exit I will not be in the list. I did not use exit, i've only  clicked shutdown desktop pc. Now server who shows that there are like 10 connections. (2 ips, 2...




					forums.freebsd.org


----------



## Phishfry (Jun 28, 2021)

This will autologout on FreeBSD default tcsh shell after 1 minute.
`set -r autologout='1'`


----------



## Phishfry (Jun 28, 2021)

Like mer said to truly blank (without involving suspend) you need vidcontrol.
In /etc/rc.conf

```
blanktime="300"
```

Broken on FreeBSD vt(4) terminal





						233356 – 12.0-RC1 vt(4) doesn't support rc.conf parameters saver=  or  blanktime=
					






					bugs.freebsd.org


----------



## mer (Jun 28, 2021)

Phishfry that's interesting.  I believe vt is the default console device instead of syscons.  And that it's been that way for a bit.  Interesting.  Implies folks are probably doing power related stuff (is there a console equivalent of the xset dpms?)


----------



## Phishfry (Jun 28, 2021)

Ed Maste commented on that PR that a setting needs to be added.
On my 12.2 codebase it is fixed from my viewing.
Yet blanktime the setting does not work for me.


----------



## mer (Jun 28, 2021)

Hmm.  Curiouser and Curiouser.


----------

