A tip to recover blank screens with EXWM

Table of Contents

img

Intro

Sometimes in EXWM when I switch machines to and plug in my dock to an already running system, one or two of my external monitors stay black1. Sometimes this also occurs when my smart-dock2 changes power levels to the dock. It has enough throughput to utilize my whole 100w power inlet, but its “smarts” mean that when I connect my USBC phone, for instance, the amount of power going out changes dramatically and the shift can “lose” my two HDMI monitors until I do the trick below.

Tip: toggling virtual terminals with C-M-<f#>

In Linux you start up your GUI in one of your virtual terminals. Somewhere along the line I learned that you can switch to one of the others, which will be a bare text CLI awaiting your login credentials, by pressing CTRL+ALT+<f#>. Doing this and waiting for one or two seconds will cause the “lost” monitors to come on, mirroring that command prompt. Then I use CTRL+ALT+<f7> to return to my EXWM gui session and those monitors stay on, showing any workspaces that were assigned to them before they became “lost”.

I hope this helps; I presume the reason is that the regular bare TTY sesions require less power than the others and so “wake up” the monitors. Whatever the reason, I use this trick half a dozen times every week when I am frequently detaching my exwm machine from its dock.

Resources

The work-around is reported here: https://github.com/ch11ng/exwm/issues/864

More on the CTRL+ALT+<f#> is all over the web, for example https://unix.stackexchange.com/questions/23363/command-line-to-return-to-the-gui-after-ctrl-alt-f1 and https://www.linuxquestions.org/questions/linux-general-1/alt-ctrl-f1-f7-questions-744811/.

Footnotes

1 This seems to have something to do with sufficient power going to the monitors, and the problem was helped (though not eliminated) when I began to add external power to the dock (also learning that not all USB cables are equal; phone chargers/cables can usually only transmit around 18w).

2 As of time of writing [2022-03-30 Wed], I am using an ITEHIL smart dock, https://www.amazon.com/Charger-ITEHIL-Portable-Foldable-Included/dp/B08Z82SDPT.

Tory Anderson avatar
Tory Anderson
Web App Engineer, Digital Humanist, Researcher, Computer Psychologist