Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swaylock 1.8.0 red screens regularily #395

Open
daym opened this issue Feb 7, 2025 · 6 comments
Open

Swaylock 1.8.0 red screens regularily #395

daym opened this issue Feb 7, 2025 · 6 comments

Comments

@daym
Copy link

daym commented Feb 7, 2025

Hi,

So swaylock 1.8.0 seems to red screen after waking up a laptop with attached external screen (on HDMI) with some regularity.

I have Linux 6.12.12 (on AMD Ryzen 9 6900HS with Radeon Graphics, and also with (currently unused) discrete AMD graphics). Mesa 24.3.2.

With Linux 6.6 I had a problem like this once every month.

With Linux 6.12.12 I have it once a day (!)--which might be good in a way because this way it can be reproduced.

I use wayland and sway.

There's a timeout-based autolocker in the sway config that causes swaylock to be called automatically.

I have some

LOCK_RED_SCREEN.txt

logs.

The interesting part seems to be:

2025-02-07 10:52:51 - [source/main.c:278] Could not find config for output HDMI-A-1 (Dell Inc. DELL S2721QS 33RC513)
16:13:44.289 [ERROR] [sway/desktop/output.c:317] Page-flip failed on output HDMI-A-1
16:13:44.289 [ERROR] [sway/desktop/output.c:317] Page-flip failed on output eDP-2

@daym
Copy link
Author

daym commented Feb 7, 2025

dmesg contains (at the same time, but just after I killed sway and gdm to relogin)

Feb 7 10:55:01 localhost vmunix: [220573.067516] traps: gjs[10836] trap int3 ip:7f7e4c242ecf sp:7fffe71bed40 error:0 in libglib-2.0.so.0.7800.0[64ecf,7f7e4c200000+94000]

@kennylevinsen
Copy link
Member

kennylevinsen commented Feb 7, 2025

sway showing a red screen means that the lockscreen is gone without unlocking. This would likely mean that swaylock has crashed. To debug, you would have to share the swaylock crash details. None of the logs you shared are relevant to the failure.

It is possible that your issue is already fixed in master by #393. You could try to give that a go.

I have some ... logs

This appears to be a log of swaylock being launched with WAYLAND_DEBUG=1 set, while another instance of swaylock is already running. This might happen if you manually locked the screen, and then later a swayidle tries to "relock" the screen.

Be very careful with running things with WAYLAND_DEBUG=1 set though, as such log includes all your keyboard and mouse interactions, which is rather bad for an application you are likely to type your password into.

None of the log snippet shared are relevant to the issue.

@daym
Copy link
Author

daym commented Feb 7, 2025

To debug, you would have to share the swaylock crash details

How do I get those?

Right now I have in the sway config:

exec swayidle -w timeout 600 'WAYLAND_DEBUG=1 swaylock -f' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'

Thank you for the heads-up about WAYLAND_DEBUG! I shall be careful.

I'll try swaylock master next.

@Trust2k
Copy link

Trust2k commented Feb 21, 2025

Initial configuration: The laptop is connected to an external monitor.

To reproduce the appearance of the red screen, just follow these steps::

  1. Transfer the PC to lock or suspend.
  2. Turn off the external monitor by pressing the button.
  3. Make sure that the laptop is working.
  4. Turn on the external monitor by pressing the button.
  5. We get a red screen.

It plays stably.

@daym
Copy link
Author

daym commented Mar 18, 2025

I'm so sorry, it was waybar's fault. Specifically the addition of this change Alexays/Waybar#1032 which autokills all child processes every time waybar terminates (for example when one screen of your two screens turns off and a waybar had been on it, it terminates). So if you launch swaylock from waybar, it will kill swaylock when you turn off the screen. WTF.

Standby turned off the screen.

@Trust2k: Is that maybe your setup as well? Then try "setsid swaylock" instead of "swaylock".

I commented on Alexays/Waybar#358

@Trust2k
Copy link

Trust2k commented Mar 18, 2025

I'm so sorry, it was waybar's fault. Specifically the addition of this change Alexays/Waybar#1032 which autokills all child processes every time waybar terminates (for example when one screen of your two screens turns off and a waybar had been on it, it terminates). So if you launch swaylock from waybar, it will kill swaylock when you turn off the screen. WTF.

Standby turned off the screen.

@Trust2k: Is that maybe your setup as well? Then try "setsid swaylock" instead of "swaylock".

I commented on Alexays/Waybar#358

уеs, i'm using waybar.

Sebelino added a commit to Sebelino/nixos-config that referenced this issue Mar 22, 2025
Started seeing a red screen lately when attemping to unlock my swaylock
lockscreen. When I tried using the -d flag to obtain the crash logs, I
found that doing so made the problem go away.

Related:

swaywm/swaylock#395
Sebelino added a commit to Sebelino/nixos-config that referenced this issue Mar 22, 2025
Started seeing a red screen lately when attemping to unlock my swaylock
lockscreen. When I tried using the -d flag to obtain the crash logs, I
found that doing so made the problem go away.

Related:

swaywm/swaylock#395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants