jirutka / swaylock-effects

Swaylock, with fancy effects
MIT License
170 stars 17 forks source link

Consuming 99% CPU, restarts itself (must auth many times) #67

Open spikespaz opened 2 months ago

spikespaz commented 2 months ago

Using Hyprland master, Nixpkgs nixos-unstable, also using #49. I have three monitors, middle, left, and top. Coordinates: middle (1920, 1440), left (0, 1440), top (1600, 0). Sizes and scaling: middle (2880, 1800, 1.5) virtual (1920, 1200), left (1920, 1080, 1.0), top (2560, 1440, 1.0).

With Factorio (Xwayland) open on the top monitor, I noticed the game stuttering. I check top, and see that swaylock is using >99% CPU. Killed the PID, then swaylock restarts. Factorio continues displaying animation frames while the other two screens are showing the lock screen as configured. I then had to authenticate several times because swaylock restarts itself after a successful authentication. Eventually, maybe 5 tries (has been more historically), it finally goes away and there is no more swaylock process.

Questions:

  1. What is going on with Factorio, why does it render above the lock screen surface?
  2. Why was there a zombie swaylock process using infinite cycles?
  3. Is #49 malicious?
  4. Why did the process exit gracefully when I issued kill (TERM: 15) instead of kill -9 (KILL: 9)? Shouldn't it render the session useless if it is killed, and disallow TERM?
  5. Why did it restart itself many times?
  6. Are there several unrelated problems here?

The reason I ask all of these in a single issue is because all of these symptoms cropped up at the same time (considerable time after making #49 part of my setup I might add).

spikespaz commented 2 months ago

This just in: swaylock started randomly, despite me playing a game (active HID input). This time, Factorio was covered by the surface. When I authenticated, the game's keyboard and mouse was unresponsive until I (1) focused another window, (2) resized that window, (3) resized Factorio. After this sequence, I can continue sending input events to Factorio.