I have a Lenovo Thinkpad x1 carbon with a WQHD display (2560x1440) running Linux Mint 18.2 Cinnamon with the Double HiDPi UI scaling enabled, as well as an xrandr
configuration startup script that sets the scaling more to my liking. When waking from suspend (lid closed) the scaling remains but the virtual window shrinks, causing the display to be only partially filled (i.e. about 2/3 of it is black with a smaller version of my desktop in the upper left region).
I implemented a systemd
service that calls xrandr --auto
upon resuming from suspend. It fixes the problem after it occurs but seems like a rather ham-fisted solution. I would like to know why this issue happens in the first place, especially considering that it only happens after resuming from suspend with the lid closed, not from the menu or command line. Is it a bug? An issue with the laptop's compatibility? Something going on with X Server? I've tried a number of troubleshooting steps, and I haven't made any other scripts besides the aforementioned that modify the display properties, so it has to be something with how Mint handles laptop-related events. Any ideas?
Initial startup:
xrandr --output eDP1 --scale 1.25x1.25 --fb 3200x1800 --panning 3200x1800
Resume command (called in a systemd unit)
xrandr --auto