Hi, Switching to one of the console terminals exits the current X session when using an external display with the laptop's internal display turned off.
I have a laptop that I occasionally hook up to a larger display and, when I do so, I prefer that the lid on my laptop be closed. In other words, the laptop's display is unused. I issue the following with sysctl(8) to prevent sleep on close but do not commit this to sysctl.conf as this is only temporary: # sysctl machdep.lidaction=0 I then use xrandr(1) to set up the displays. The laptop's display is eDP-1 and the external display is connected to DP-2: $ xrandr --output eDP-1 --off --output DP-2 --auto At this point I can close the laptop's lid. If I then Ctrl+Alt+F2 to ttyC1 and then switch back to X with Ctrl+Alt+F5, my X session is finished and back at xenodm(1) and all the displays are switched back on. This is on OpenBSD 6.6 with all current errata patches applied. The laptop in question is a Thinkpad X1 Carbon 5th Gen. Anecdotally, I have noticed that the console logs: acpivideo0: unknown event 0x00 whenever the laptop's lid is closed. Is this by design and how might I prevent this from occurring? My ultimate goal would be to have a setup such that whenever the laptop's lid is closed with an attached keyboard and external display that the laptop's display be switched off. If either of those things do not hold then the laptop should go to sleep. If anyone has any advice in that regard I would love to read about it. -- Chris