# How to cut off laptop screen ?



## nuxbsd (Oct 7, 2021)

Hi all,

How to cut off laptop screen in console mode please ?
I don't need the screen because everything is done by ssh.

Thank you


----------



## kpedersen (Oct 7, 2021)

You can enable a screen saver / timeout via `vidcontrol` (https://www.freebsd.org/cgi/man.cgi?vidcontrol(1))

Also, check out *saver* and *blanktime* in rc.conf (https://www.freebsd.org/cgi/man.cgi?rc.conf(5))

Some things to note:

Avoid closing the lid. Many laptops aren't meant for this whilst they are on and may overheat
Consider running Xorg and blank the screen there for the additional power management features that it (and the drivers) provide. This can help the machine run cooler.


----------



## astyle (Oct 7, 2021)

Try a mini-PC like a Gigabyte Brix. It's a better fit than a laptop.


----------



## nuxbsd (Oct 7, 2021)

kpedersen said:


> You can enable a screen saver / timeout via `vidcontrol` (https://www.freebsd.org/cgi/man.cgi?vidcontrol(1))
> 
> Also, check out *saver* and *blanktime* in rc.conf (https://www.freebsd.org/cgi/man.cgi?rc.conf(5))
> 
> ...


Thank you for your reply,
This is what I did:
- in /etc/rc.conf
blanktime = "10"
It does not work.

I would just like to turn off the screen.
I looked at vdicontrol but I don't know which config file I should use it in.


----------



## astyle (Oct 7, 2021)

Worst case, use duct tape.  (To hold a piece of cardboard over the screen)


----------



## nuxbsd (Oct 7, 2021)

astyle said:


> Worst case, use duct tape.  (To hold a piece of cardboard over the screen)


I will think about it ;-) 

But the problem is if I have to do a remote reboot my arm will never be long enough to go to the box !


----------



## astyle (Oct 7, 2021)

nuxbsd said:


> I will think about it ;-)
> 
> But the problem is if I have to do a remote reboot my arm will never be long enough to go to the box !


Just SSH into the box, and then:

```
% su root
# reboot
```
That simple.


----------



## dd_ff_bb (Oct 7, 2021)

you can suspend/resume your vga device with:


```
devctl suspend vgapci0
devctl resume vgapci0
```

Note: you need to ssh into box as you can not resume display device from laptop itself

you can also check man 8 devctl for other options


----------



## astyle (Oct 7, 2021)

Not a bad idea - if the laptop actually cooperates with that.  Laptops are famous for being rather uncooperative with FreeBSD. You can get FreeBSD going OK on a laptop, generally speaking, but when it comes to making this hardware button or that hardware button to work (beyond the power button) - that is a bit of a tossup.


----------



## nuxbsd (Oct 7, 2021)

dd_ff_bb said:


> you can suspend/resume your vga device with:
> 
> 
> ```
> ...


Thank you.
I tested this according to the devctl man:


```
devctl suspends vgapci0
devctl disable vgapci0
devctl detach vgapci0
```

Nothing is happening.

On one of my other machines running OpenBSD I add this to /etc/wsconsctl.conf.

```
echo "display.screen_off = 60000" >> /etc/wsconsctl.conf
```
After the time indicated the screen stops.

Here I am looking for a way to run it but under FreeBSD.
I also have an error:

```
CPU0: local APIC error 0x40
```
In BIOS it is not possible to configure or disable it.
Could this be a problem?


----------



## bsduck (Oct 7, 2021)

In case your laptop uses Intel graphics, I noticed (but didn't try) the sysctl `hw.i915kms.disable_display`. Requires a reboot.
There may be similar sysctls for other drivers.

From Xorg, you can use `xset dpms force off`.


----------



## Geezer (Oct 8, 2021)

astyle said:


> Just SSH into the box, and then:
> 
> ```
> % su root
> ...



Better to do :

```
% su root
# shutdown -r now
```


----------



## grahamperrin@ (Oct 8, 2021)

Not an answer, but it seems that I can not have the case (lid) closed to cut off the screen of a notebook, where external displays are in use:









						Waking a notebook whilst closed with hw.acpi.lid_switch_state: NONE
					

HP 2012 120W Advanced Docking Station with DisplayPort x2, each connected to a Philips 271P4QPJKEB/00.   HP EliteBook 8570p |  % sysctl hw.acpi.lid_switch_state hw.acpi.lid_switch_state: NONE %   I dock the notebook then, without opening the case, I press the power button on the docking station...




					forums.freebsd.org


----------

