swayidle icon indicating copy to clipboard operation
swayidle copied to clipboard

Open lid to trigger resume

Open palb91 opened this issue 6 years ago • 3 comments

Hi!

Setup: My config is the most often an external monitor plugged on my laptop and the laptop lid closed. The swayidle command I use is:

exec swayidle -w                                                 \
    timeout 120  'swaylock'                                      \
    timeout  20  'pgrep swaylock && swaymsg "output * dpms off"' \
         resume  'swaymsg "output * dpms on"'                    \
    before-sleep 'swaylock'

Expected: This works almost great, if the output is off since few seconds, I can just type my password or move my mouse and everything goes back normaly.

Bug: However if the output is off for more than few minutes (I don't know how long), the resume stuff is not triggered and I can't wake up my monitors. The only way I have is to open the laptop lid.

Versions:

  • sway: 1:1.2-5 (Arch Linux community)
  • swayidle: 1.5-1 (Arch Linux community)

I think that the external keyboard and mouse are disabled after dpms has been triggered (It does not append when I remove the dpms timeout/resume stuff), I just don't know why and if I can prevent them to

palb91 avatar Nov 17 '19 17:11 palb91

I had a similar issue before. In my case, the issue was that swaylock was launched in non-demonized mode and that prevented resume coomand from being executed. Once I changed the swaylock command from swaylock to swaylock -f, everything went back to normal.

ikalnytskyi avatar Jan 26 '20 18:01 ikalnytskyi

Thanks for your reply @ikalnytskyi. I use swaylock with a config file where daemonize is set up, it does not seem to be the problem here.

palb91 avatar Jan 26 '20 19:01 palb91

However, I'll try swaylock without config file, directly with the flag.

palb91 avatar Jan 26 '20 19:01 palb91