You are not logged in.

#1 2015-04-20 23:50:06

jting
Member
Registered: 2014-10-24
Posts: 11

XMonad breaks after laptop resumes from suspend (but not pm-suspend)

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

#2 2015-04-21 07:28:39

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: XMonad breaks after laptop resumes from suspend (but not pm-suspend)

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

#3 2015-04-21 10:22:40

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: XMonad breaks after laptop resumes from suspend (but not pm-suspend)

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

#4 2015-04-21 11:56:15

jting
Member
Registered: 2014-10-24
Posts: 11

Re: XMonad breaks after laptop resumes from suspend (but not pm-suspend)

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

#5 2015-04-21 13:46:51

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: XMonad breaks after laptop resumes from suspend (but not pm-suspend)

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

#6 2015-04-22 00:17:12

jting
Member
Registered: 2014-10-24
Posts: 11

Re: XMonad breaks after laptop resumes from suspend (but not pm-suspend)

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

Board footer

Powered by FluxBB