You are not logged in.

#1 2016-09-20 11:06:29

kyrisu
Member
Registered: 2015-05-19
Posts: 4

[SOLVED] i3wm stops responding after uplugging the power cord

I have this weird issue where if I unplug the power cord from my laptop my i3 stops responding. I can control any window I was last in, but cannot create new ones or change between open windows. The only option is to kill X.

I doubt it's an i3 issue because after turning on the debug logs there's nothing new added after the power cord is unplugged, but when I do:

sudo strace -s 99 -p `pidof i3`

after unplugging my laptop I get:

strace: Process 2466 attached
epoll_wait(5, 0x7f18f0, 64, 59743)      = -1 EINTR (Interrupted system call)
--- SIGTTIN {si_signo=SIGTTIN, si_code=SI_KERNEL} ---
--- stopped by SIGTTIN ---
strace: Process 2466 detached

I may be some weird acpi event handling but I don't have acpid or pm-utils installed.

There are only 2 events that I handle by a custom script

* low battery event

$ cat /etc/udev/rules.d/99-lowbat.rules 
# Suspend the system when battery level drops to 5% or lower
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/bin/systemctl suspend"

* lock on sleep

$ cat /etc/systemd/system/lock-on-sleep@.service 
[Unit]
Description=Lock user X session on suspend
Before=sleep.target

[Service]
User=%I
Type=forking
Environment=DISPLAY=:0
ExecStart=/home/kyrisu/.i3/bin/session lock

[Install]
WantedBy=sleep.target

but none of them should be triggered on power loss.

Any feedback regarding places where I can look to figure it out is highly appreciated.

P.S. I was working before, but unfortunately, I don't know when it stopped so I cannot attribute the issue to a specific configuration change or package upgrade.

Last edited by kyrisu (2016-09-21 13:57:46)

Offline

#2 2016-09-21 12:46:44

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: [SOLVED] i3wm stops responding after uplugging the power cord

Offline

#3 2016-09-21 13:57:15

kyrisu
Member
Registered: 2015-05-19
Posts: 4

Re: [SOLVED] i3wm stops responding after uplugging the power cord

Thanks seth! - that was exactly my issue. Problem solved! smile

Offline

Board footer

Powered by FluxBB