I use a script that runs xrandr
to turn off laptop display, showing only the external monitor screen.
I have another script that basically "reverses" this (showing only laptop display) which I use every time I have to take my laptop to a coffee shop.
Sometimes, in a hurry, I don't do this and just unplug my laptop directly before putting it in the bag. Now when I reach the coffee shop and try to use it, I would only see a blank screen which is due to what I assume to be my video configuration still being in "external screen only" mode. Question: how do I go to "laptop screen only" mode here? Otherwise, is there a way I can avoid having this problem in the first place?
Without knowing this I simply force reboot my laptop, which sucks.
For the record I run NixOS on Thinkpad P71.