Console blank screen (vt)

I might be a moron. I checked the handbook and searched online but no matter what I try, I can’t get my console to go dark after 3 minutes. It always stays on. Xfce works just fine, but I want my screen to go blank (off) too, if I’m on the console. Can someone tell me what i exactly need to do to accomplish this simple fact?
 
That's one of the features that were not ported from the old syscons sc(4) to the new vt(4) console driver.

Personally I still use sc. To be honest, I think that vt sucks, because too many important features a missing. The manpage promises that it enables “switching between the X Window System and virtual terminals”, but that didn't work for me when I tried it. So there's no reason for me to use vt.
 
That's one of the features that were not ported from the old syscons sc(4) to the new vt(4) console driver.

Personally I still use sc. To be honest, I think that vt sucks, because too many important features a missing. The manpage promises that it enables “switching between the X Window System and virtual terminals”, but that didn't work for me when I tried it. So there;s no reason for me to use vt.
Aha. That explains it. For me vt works ok. I can change from console to X and back without any problems. The one problem I still must solve is that all errror messages are echoed to the first vt (which I’m mostly working on) and that’s rather annoying. If I remember correctly there is a way to reroute the messages to another console but I don’t know how. I’ve used FreeBSD back in the days of version 8 and 9. Then switched over to Sun Solaris and switched to Linux after Oracle had taken over Sun. Spent some time on OpenIndiana but it didn’t feel like Solaris. I’m glad to be back on real Unix though. FreeBSD has come a long way and I love ZFS.
 
The one problem I still must solve is that all errror messages are echoed to the first vt (which I’m mostly working on) and that’s rather annoying.
Edit syslog.conf and remark the first line:
Code:
*.err;kern.warning;auth.notice;mail.crit                /dev/console
 
The same things are logged in /var/log/messages. You can also uncomment this one:
Code:
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                            /var/log/all.log
 
To be honest, I think that vt sucks, because too many important features a missing.

Still? I'm still using sc as well. Haven't checked for a while, but was hoping vt was coming along faster than that. Would like to use vt ~someday~.
 
Still? I'm still using sc as well. Haven't checked for a while, but was hoping vt was coming along faster than that. Would like to use vt ~someday~.
When i want to use sc, which settings do I need to change on a standard FreeBSD-12-RELEASE?
 
In /boot/loader.conf:
Code:
kern.vty=sc

Note however that sc(4) has no support for KVM. So you may have problems with Xorg and the Intel or AMD drivers.
 
In /boot/loader.conf:
Code:
kern.vty=sc

Note however that sc(4) has no support for KVM. So you may have problems with Xorg and the Intel or AMD drivers.
Hm. I’ll stay on vt then because I also need high ascii. UTF-8 is not or not well supported on sc
 
Out of curiosity, what were you doing originally that didn't work? If sysrc saver="green" doesn't work with vt, I might switch back to sc as well, at least for headless systems.

And for the record, I'm definitely able to get the screen to turn off on my FreeBSD laptop, which runs vt for KMS. I'd have to look at my configuration again to remember what (if anything) I did to achieve it though. That said, I never use the console, I always just look at its messages from syslog files.
 
And for the record, I'm definitely able to get the screen to turn off on my FreeBSD laptop, which runs vt for KMS. I'd have to look at my configuration again to remember what (if anything) I did to achieve it though. That said, I never use the console, I always just look at its messages from syslog files.
Keep in mind that Xorg has its own power-saving settings and your desktop environment might have its own screensaver. Turning the screen off (power saving) with Xorg is done through DPMS.
 
Out of curiosity, what were you doing originally that didn't work? If sysrc saver="green" doesn't work with vt, I might switch back to sc as well, at least for headless systems.

I'm probably missing something obvious, but.. Why would you care about console driver on a headless system?
 
Out of curiosity, what were you doing originally that didn't work? If sysrc saver="green" doesn't work with vt, I might switch back to sc as well, at least for headless systems.

And for the record, I'm definitely able to get the screen to turn off on my FreeBSD laptop, which runs vt for KMS. I'd have to look at my configuration again to remember what (if anything) I did to achieve it though. That said, I never use the console, I always just look at its messages from syslog files.
I would be grateful if you’d lookup your conf to make this happen. I like to work on the cli although I have xfce running smoothly too.
 
He probably meant a system without X (not headless).
No, I mean headless. Almost all of the servers I deal with have KVM but that's a last resort and basically never used. They also have KVM over IP (thanks to IPMI), but again, I almost never use it. My main hope was to save power, and possibly the monitor (both backlight and to prevent burn in) if it's ever accidentally left on. Because I'm diligent about turning it off, I'm not sure if the green saver is actually working or not, but I should probably test it some time to see.

I would be grateful if you’d lookup your conf to make this happen. I like to work on the cli although I have xfce running smoothly too.
It's my work laptop, so I'll check when I'm next in at work. As SirDice pointed out though, it's done through DPMS, so it's completely separate from the sc/vt screensavers. I am using xfce though, so the config will hopefully be more or less the same for you.

And most of my work is done within a CLI/terminal too, but I just open one within the desktop environment. It's often handy to have a browser and a terminal up on the same screen.
 
Sorry for the late reply, but I finally remembered to look at this while at work. I've got x11/i3lock installed, which is what I use to lock the screen when I'm AFK. I then wrote two scripts to work with it, depending on what I want to do. If I just want to lock, I run the wrapper script:
Code:
cat `which i3wrap`
#!/bin/sh
revert() {
    xset dpms 0 0 0
}

trap revert HUP INT TERM
xset +dpms dpms 5 5 5
i3lock -nc 670000
revert
Alternatively, if I want to lock the machine and have it sleep, I run this:
Code:
cat `which i3sleep`
#!/bin/sh
i3lock -c 670000
sudo zzz
...which needs security/sudo installed and permissions configured to run zzz as root without a password. I put both of these scripts into /usr/local/bin/ (don't forget to chmod +x) and set them to keybinds so I can quickly lock/sleep with just a keypress combination.

Edit: Now that I look closer, the "FreeBSD red" is actually #ad221d (and not #670000), so you might want to change the color in the scripts if you're a super-nerd like me.
 
Thanks
Sorry for the late reply, but I finally remembered to look at this while at work. I've got x11/i3lock installed, which is what I use to lock the screen when I'm AFK. I then wrote two scripts to work with it, depending on what I want to do. If I just want to lock, I run the wrapper script:
Code:
cat `which i3wrap`
#!/bin/sh
revert() {
    xset dpms 0 0 0
}

trap revert HUP INT TERM
xset +dpms dpms 5 5 5
i3lock -nc 670000
revert
Alternatively, if I want to lock the machine and have it sleep, I run this:
Code:
cat `which i3sleep`
#!/bin/sh
i3lock -c 670000
sudo zzz
...which needs security/sudo installed and permissions configured to run zzz as root without a password. I put both of these scripts into /usr/local/bin/ (don't forget to chmod +x) and set them to keybinds so I can quickly lock/sleep with just a keypress combination.

Edit: Now that I look closer, the "FreeBSD red" is actually #ad221d (and not #670000), so you might want to change the color in the scripts if you're a super-nerd like me.
Thanks for this informative answer.
 
Back
Top