opnSense 23.1 and screensaver or blank screen

Started by none, June 24, 2023, 04:22:37 AM

Previous topic - Next topic
Hi,

I am using an old notebook and the screen is on all the time. I am looking on how I can make it turn off after some time. I looked for it on google and could not find any hints on how to do it on opnSense.

Is there how to make it turn off after some time?

I tried changing the console type, no go here :(

thanks,

none

June 24, 2023, 02:35:53 PM #1 Last Edit: June 24, 2023, 02:37:48 PM by DEC670airp414user
would closing the lid solve this?

Quote from: none on June 24, 2023, 04:22:37 AM
Hi,

I am using an old notebook and the screen is on all the time. I am looking on how I can make it turn off after some time. I looked for it on google and could not find any hints on how to do it on opnSense.

Is there how to make it turn off after some time?

I tried changing the console type, no go here :(

thanks,

none

Unfortunately, I don't have any advice to offer but I'd definitely be interested in whatever you find.

I'd also be curious if there was a way to make OPNSense always output video even if there isn't a display detected.  That way I don't have to reboot it if I need to connect a monitor. :)

Quote from: DEC670airp414user on June 24, 2023, 02:35:53 PM
would closing the lid solve this?

The problem with closing the lid is that some machines are designed so that keeping the lid open helps with cooling.  When you close it that can cause problems.

Hi, unfortunately not. The light is still on.

Thanks,

none

Quote from: CJRoss on June 24, 2023, 04:48:45 PM
Quote from: none on June 24, 2023, 04:22:37 AM
Hi,

I am using an old notebook and the screen is on all the time. I am looking on how I can make it turn off after some time. I looked for it on google and could not find any hints on how to do it on opnSense.

Is there how to make it turn off after some time?

I tried changing the console type, no go here :(

thanks,

none

Unfortunately, I don't have any advice to offer but I'd definitely be interested in whatever you find.

I'd also be curious if there was a way to make OPNSense always output video even if there isn't a display detected.  That way I don't have to reboot it if I need to connect a monitor. :)

Quote from: DEC670airp414user on June 24, 2023, 02:35:53 PM
would closing the lid solve this?

The problem with closing the lid is that some machines are designed so that keeping the lid open helps with cooling.  When you close it that can cause problems.

Closing the lid really would not be my first choice, due to heat. I live in a really warm place. But would easy the pain here, but no go :(

About the always present console, I got few issues using VGA monitors, machines that have HDMI I got some issues like yours.

none

Quote from: none on June 24, 2023, 05:00:53 PM
About the always present console, I got few issues using VGA monitors, machines that have HDMI I got some issues like yours.

The always on was more just my musing.  My OPNSense sits on a KVM and if it boots without being selected, then I end up not getting any video output until I reboot with it selected.  I could configure it to always be the selected machine but then I run into the same issue as you where it's always displaying and my monitor never goes to sleep.

Just for the record, I tried using external monitors through VGA or HDMI. Still no luck :(

Does opnsense is not built with the FreeBSD console options for that? The kernel modules loaded show no green or screensaver modules.

Thanks,

none

Quote from: none on June 24, 2023, 06:24:47 PM
Just for the record, I tried using external monitors through VGA or HDMI. Still no luck :(

I wouldn't have expected it to.  I was just explaining my situation.  I use a desktop, not a laptop for my OPNSense.

Quote from: none on June 24, 2023, 06:24:47 PM
Does opnsense is not built with the FreeBSD console options for that? The kernel modules loaded show no green or screensaver modules.

I don't think you're going to have much luck with this as it's an uncommon situation.  I guess you could crack open the laptop and unplug the screen so that you use an external monitor only but that seems like a lot of work for not much reward.

Any reason not to switch to one of those small four port boxes or even an old desktop?

Quote from: none on June 24, 2023, 04:22:37 AM
Hi,

I am using an old notebook and the screen is on all the time. I am looking on how I can make it turn off after some time. I looked for it on google and could not find any hints on how to do it on opnSense.

Is there how to make it turn off after some time?

I tried changing the console type, no go here :(

thanks,

none
Maybe you could look at your acpi options. $ sudo sysctl -a | grep hw.acpi.. Consult the freebsd manual i.e. https://man.freebsd.org/cgi/man.cgi?query=acpi_video&apropos=0&sektion=4&manpath=FreeBSD+13.1-RELEASE&arch=default&format=html
So you could try experimenting with hw.acpi.lid_switch_state for instance. Please note, I suggest you do this in a separate installation for testing. The wrong settings and you could blank out your console and need to re-install. At your risk.

Quote from: none on June 24, 2023, 06:24:47 PM
Just for the record, I tried using external monitors through VGA or HDMI. Still no luck :(

Does opnsense is not built with the FreeBSD console options for that? The kernel modules loaded show no green or screensaver modules.

Thanks,

none
I think the issue here is that there is no desktop environment with screensavers, compositors, etc. which would have those modules like screensavers. OPN by default only set to output to a text console, where these facilities don't exist in freebsd now using vt as the console.
It might be possible to go back to sc https://forums.freebsd.org/threads/how-do-you-set-a-screensaver-in-console-mode.54934/ but again BIG notice: test separately, you are likely to break something. This is a customisation of OPN you would be doing and probably remove prior to updates.
I am not suggesting you do this, only pointing to what might be the reason for the experienced behaviour.