Skip to content

Instantly share code, notes, and snippets.

@sirhopcount
Last active May 15, 2025 20:26
Show Gist options
  • Select an option

  • Save sirhopcount/66b2d1555817eca73e65a5bf42c7431d to your computer and use it in GitHub Desktop.

Select an option

Save sirhopcount/66b2d1555817eca73e65a5bf42c7431d to your computer and use it in GitHub Desktop.

Revisions

  1. sirhopcount renamed this gist May 15, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. sirhopcount created this gist May 15, 2025.
    50 changes: 50 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    # Proxmox on a laptop

    This is how you disable the screen and susped (on lid action)

    ## Disable screen

    Disable the console after 60 second. Edit the grub config:

    ```
    vi "/etc/default/grub
    ```
    Update `GRUB_CMDLINE_LINUX` like so:

    ```
    GRUB_CMDLINE_LINUX="consoleblank=60"
    ```
    Save, exit and update the grub config

    ```
    update-grub
    ````

    ## Disable suspend (on lid)

    Edit `/etc/systemd/logind.conf`

    Add the following:

    ```
    HandleLidSwitch=ignore
    HandleLidSwitchExternalPower=ignore
    HandleLidSwitchDocked=ignore
    LidSwitchIgnoreInhibited=yes
    ```
    And restart systemd-logind

    ```
    systemctl restart systemd-logind
    ```

    ## References

    * https://forum.proxmox.com/threads/ve-5-1-host-how-to-turn-off-laptop-screen.38115/post-188205
    * https://www.reddit.com/r/Proxmox/comments/kxdjrc/i_am_running_proxmox_on_a_thinkpad_laptop_how_can/
    * https://www.reddit.com/r/Proxmox/comments/tdcvx9/turning_off_the_screen_on_a_laptop_running_proxmox/
    * https://mensfeld.pl/2018/08/ubuntu-18-04-disable-screen-on-lid-close/
    * https://bbs.archlinux.org/viewtopic.php?pid=1228192#p1228192
    * https://github.com/systemd/systemd/issues/11638
    * https://www.freedesktop.org/software/systemd/man/latest/logind.conf.html
    * https://unix.stackexchange.com/a/563730