0

I'm running two 4k monitors on i3 (regolith variant) on X on Ubuntu 20.04. Since initial install a couple months ago, I've had some frustrating issues around display; the most vexing issue is that:

  • sometimes(1) when woken after sleep/lockscreen, one of my monitors is blank. From the behavior of application windows on the remaining monitor, it appears as though it's unplugged or otherwise disabled.

The only thing I've found that works to fix besides rebooting is physically unplugging one of the DisplayPort cables, then re-plugging.

As such, that's my specific question (although feel free to suggest other routes I can persue) - what's the closest I can come to this via bash (or python)

Perhaps disable a port than re-enable? Force a re-enumerate of some sort? It's OK if it takes a number of seconds to run; it's a major PITA to do a reach-around on the monitors. I can execute the script by switching over to a TTY and running the script (easy even though it's sideways, since the monitor that 'remains' is always the portrait one!)

Thanks!

  1. seems vary per boot/uptime. On some boots, it will never occur. On others it occurs most times the monitors go to 'sleep'. This is a development machine; typical uptime is around 1 week ~ 1 month.
  2. FWIW i've dug through journalctl and dmesg logs looking for relevant errors, but haven't had any luck.
  3. as mentioned there are some other issues, such as my monitor layout being broken after waking the box. However, i have a simple xrandr script that easily solves that problem when it occurs. That script does NOT work when the 2nd monitor is "off", only when it's in the wrong orientation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.