Cannot login after suspend with multiple monitors
Solution 1:
Here is a workaround that uses the idea from Malith's answer, but automates a few steps, let me know if it works for you, and if not, I have some other ideas that may work.
Create a file named /etc/systemd/system/suspend-workaround.service
, with the following content:
[Unit]
Description=suspend lightdm workaround
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/chvt 1
ExecStop=/bin/chvt 7
[Install]
WantedBy=sleep.target
Type the following on a terminal to reload systemd files and enable the unit above:
sudo systemctl enable suspend-workaround.service
sudo systemctl daemon-reload
Try to suspend and report your results.
EDIT: If the above unlocks your session (it shouldn't), you can make your session lock post resume, by replacing the ExecStop=/bin/chvt 7
with ExecStop=/bin/chvt 7 ; /bin/loginctl lock-sessions
.
You can also disable session locking on system settings, and force it to lock post resume using a systemd script like the one above, by calling /bin/loginctl lock-sessions
and leaving all the chvt
stuff out.
Solution 2:
When you needed to suspend, do it using the shell opened by Ctrl + Alt + F2
login to that shell using your username and password.
Then type sudo pm-suspend
to suspend the machine. (If not, try installing pm-utils using sudo apt-get install pm-utils
)
To resume, press any key and you will see the last shell window.
Now you can press Ctrl + Alt + F7 to get your Unity session.