Automatically turn off idle screen with LXC GPU passthrough on LXC restart

ajeun

Member
Sep 19, 2023
5
0
6
I am using GPU passthrough to LXC on proxmox running on a laptop and don't want the screen always on so I set `consoleblank=30`:

```
# /etc/kernel/cmdline
root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on iommu=pt consoleblank=30
```


This seems to work correctly without any LXCs running. The computer boots up and after 30 seconds the screen turns off as expected.

Now I added an LXC with GPU passthrough for running frigate. Frigate works fine and on boot the screen works as expected, turning off after 30 seconds.

However, if I restart the LXC, then the screens turn on. It initially flashes to black, then it shows the output from the proxmox console but with characters missing, and slowly more characters disappear. The screen does not turn off even after waiting 30 minutes.

Initial output of console:
PXL_20250923_220506623.jpg

Screen with characters missing after LXC is restarted.
PXL_20250923_220602310.jpg

If I press enter, then the normal login prompt for the proxmox shows up and it turns off after 30 seconds.

Anybody know why the display is behaving strangely and how to get it to automatically turn off after LXC restarts without keyboard intervention?


This is my LXC config:
```
arch: amd64
cores: 8
dev0: /dev/dri/renderD128,gid=992
features: keyctl=1,nesting=1
hostname: camera
memory: 6144
mp0: lvm:subvol-230-disk-1,mp=/var/lib/containers,backup=0,mountoptions=discard;noatime,size=5G
mp1: /mnt/frigate,mp=/root/frigate/storage,mountoptions=discard;noatime
net0: name=ethmanagement,bridge=lan,hwaddr=<mac>,ip=dhcp,tag=1,type=veth
net1: name=ethserver,bridge=lan,hwaddr=<mac>,ip=manual,tag=60,type=veth
onboot: 1
ostype: debian
rootfs: lvm:subvol-230-disk-0,size=5G,mountoptions=discard;noatime
startup: order=2,up=10
swap: 0
tags: management;podman;server
unprivileged: 1
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
lxc.idmap: u 0 100000 165536
lxc.idmap: g 0 100000 165536
lxc.cgroup2.devices.allow: c 189:* rwm # Coral USB
lxc.mount.entry: /dev/bus/usb/004 dev/bus/usb/004 none bind,optional,create=dir,mode=664 # Coral USB
lxc.hook.pre-start: sh -c "chown -R 100000:100000 /dev/bus/usb/004" # Coral USB
```