2024
03.13

1 Keep the system running while the lid is closed
1.1 Connect to PVE via SSH OR log in to PVE web gui https://IP:8006 then Right Click on the host/node name -> >_Shell OR via console/terminal directly

1.2 Edit the /etc/systemd/logind.conf file using nano

nano /etc/systemd/logind.conf
1.3 Under the [Login] section, Add the following lines

HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
Ctrl + X, Y, Enter key to Save and Exit

1.4 Update the changes

systemctl restart systemd-logind.service


Note: Some times this is not enough, in some cases, screen dim/screen timeout/screen automatic off/screen auto off feature will not work anymore, follow the below steps to get it fixed.

2 Screen/Display auto off feature does not work anymore/not working properly
2.1 Repeat step 1.1

2.2 Edit the /etc/default/grub file

nano /etc/default/grub
2.3 Add consoleblank=120 to line GRUB_CMDLINE_LINUX=””

So GRUB_CMDLINE_LINUX=”” becomes GRUB_CMDLINE_LINUX=”consoleblank=120″

Note: 120 seconds = 2 minutes

Ctrl + X, Y, Enter key to Save and Exit

2.4 Update grab

update-grub
2.5 Restart the system, now it should dim the scree/display after 2 minutes