You are not logged in.
Hi,
I currently have a very basic XMonad setup (almost no customisation), and have pm-utils installed as well. When I close my laptop lid and allow it to suspend that way (my /etc/systemd/logind.conf has HandleLidSwitch set to suspend), when I resume, I can'tng use the mod key for the most part - I can't launch dmenu (mod+p), open a terminal (mod+shift+enter), etc. - however closing still seems to work (mod+shift+c), and I can still quit XMonad (mod+shift+q). Once I quit back to tty and manually run startx again, all is well.
However, if I suspend using pm-suspend I don't get any of these issues, but obviously opening a terminal, typing pm-suspend and entering my root password every time I just want to suspend while a small task is quite inconvenient.
What steps should I take to go about configuring my Arch such that I can close the lid and not run into this issue with XMonad?
Thanks.
Offline
You can try to find out what pm-utils does to make it work better and see if you can port that fix to systemd's sleep framework or you can make using pm-suspend easier. For example, configure sudo so you can run it without a password, bind this to a key. Also tell systemd-logind to ignore lidswitch and use acpid to call pm-suspend instead.
Offline
You should rule out if this is caused by closing the lid. I also had xmonad behave weird when no screen turned on.
So see what happens when you suspend using
systemctl suspend while the lid is open.
If xmonad is not working correctly afterwards it might be an issue with systemd.
And look at the logs for errors during suspend/resume
I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do. (Gune | Titan A.E.)
Offline
Looks like systemctl suspend doesn't cause any issues upon system resume either - only when closing the lid.
I just allowed sudo pm-suspend to run without entering the password, and about to assign a shortcut to it.
Offline
Next step would be to find out if the issue is there when you disable suspend on lid close so that nothing should happen when you close the lid.
Is there are a reason why you use pm-suspend instead of systemd's method for your shortcut?
I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do. (Gune | Titan A.E.)
Offline
No reason actually - up until yesterday I had assumed it was the systemd one causing the issue as closing the lid was what created problems - but after testing it from terminal it was fine, so I could actually go with either. I've tested it with doing nothing when the lid closes, and I didn't get any issues.
Offline