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

lock screen loses keyboard focus after playing with hyprctl monitor #1548

Open
primalmotion opened this issue Feb 14, 2023 · 24 comments
Open
Labels
bug Something isn't working

Comments

@primalmotion
Copy link

primalmotion commented Feb 14, 2023

Have a laptop, an external display.
run

hyprctl keyword monitor eDP-1,disable; \
  sleep 1; \
  swaylock; \
  sleep 2; \
  hyprctl keyword monitor eDP-1,preferred,auto,1; \
  sleep 2; \
  hyprctl keyword monitor eDP-1,disable

`After that sequence, the keyboard does not input anything anymore. I could not reproduce on Sway

@primalmotion primalmotion added the bug Something isn't working label Feb 14, 2023
@primalmotion
Copy link
Author

more precision: the keyboard will work again if eDP-1 is reactivated after that sequence

@primalmotion primalmotion changed the title lock screen looses external keyboard focus after playing with hyprctl monitor lock screen looses keyboard focus after playing with hyprctl monitor Feb 14, 2023
@vaxerski vaxerski changed the title lock screen looses keyboard focus after playing with hyprctl monitor lock screen loses keyboard focus after playing with hyprctl monitor Feb 14, 2023
@vaxerski
Copy link
Member

patch.txt

how bout this patch?

@primalmotion
Copy link
Author

hum that does not seem to help.

@primalmotion
Copy link
Author

after reading the code for refocus, I was trying some stuff with the mouse, and I got this crash

                Stack trace of thread 1005:
                #0  0x00007f623e1cdce4 wl_resource_get_client (libwayland-server.so.0 + 0x8ce4)
                #1  0x000055a5a515c4af _ZN11CCompositor19doesSeatAcceptInputEP11wlr_surface (Hyprland + 0x444af)
                #2  0x000055a5a52222c1 _ZN13CInputManager22processMouseDownNormalEP24wlr_pointer_button_event (Hyprland + 0x10a2c1)
                #3  0x00007f623e1cef6e wl_signal_emit_mutable (libwayland-server.so.0 + 0x9f6e)
                #4  0x00007f623e1cef6e wl_signal_emit_mutable (libwayland-server.so.0 + 0x9f6e)
                #5  0x00007f623e31cf43 handle_pointer_button (libwlroots.so.12032 + 0x55f43)
                #6  0x00007f623e31bd7b handle_libinput_readable (libwlroots.so.12032 + 0x54d7b)
                #7  0x00007f623e1d09e2 wl_event_loop_dispatch (libwayland-server.so.0 + 0xb9e2)
                #8  0x00007f623e1d1197 wl_display_run (libwayland-server.so.0 + 0xc197)
                #9  0x000055a5a514e45d main (Hyprland + 0x3645d)
                #10 0x00007f623da3c790 n/a (libc.so.6 + 0x23790)
                #11 0x00007f623da3c84a __libc_start_main (libc.so.6 + 0x2384a)
                #12 0x000055a5a5157f65 _start (Hyprland + 0x3ff65)
                
                Stack trace of thread 1034:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1035:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1037:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1045:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1036:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1048:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1042:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1038:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1040:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1047:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1039:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1041:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1046:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1050:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1049:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1052:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1053:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1055:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1054:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1056:
                #0  0x00007f623db228bf accept (libc.so.6 + 0x1098bf)
                #1  0x000055a5a5204d33 _ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZN13CEventManager11startThreadEvEUlvE_EEEEE6_M_runEv (Hyprland + 0xecd33)
                #2  0x00007f623dcd72c3 execute_native_thread_routine (libstdc++.so.6 + 0xd72c3)
                #3  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #4  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1043:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                
                Stack trace of thread 1051:
                #0  0x00007f623da9b766 n/a (libc.so.6 + 0x82766)
                #1  0x00007f623da9df90 pthread_cond_wait (libc.so.6 + 0x84f90)
                #2  0x00007f623b30c47e n/a (iris_dri.so + 0x10c47e)
                #3  0x00007f623b2bc84c n/a (iris_dri.so + 0xbc84c)
                #4  0x00007f623b30c3ac n/a (iris_dri.so + 0x10c3ac)
                #5  0x00007f623da9ebb5 n/a (libc.so.6 + 0x85bb5)
                #6  0x00007f623db20d90 n/a (libc.so.6 + 0x107d90)
                ELF object binary architecture: AMD x86-64

@primalmotion
Copy link
Author

primalmotion commented Feb 17, 2023

my suspicion, that may be completely off, is that it may depend on where the mouse actually is when I turn the laptop monitor off. And since this crash seems to be related to input manager and some mouse thingy...

@primalmotion
Copy link
Author

I confirm that this always crashes when I'm facing the issue with the keyboard not inputing anything on the lock screen then I click with the mouse

@primalmotion
Copy link
Author

trying to follow the logs

journalctl --user -f --identifier=hyprland | grep --line-buffered -i -E "Set keyboard focus|New session lock|Removed monitor|New monitor"

# Locking session
New session lock!
Set keyboard focus to surface f5c80
Set keyboard focus to surface a7c80

# Closing lid (deactivating eDP-1)
Removed monitor eDP-1!

## HERE KB WORKS

# Opening the lid
Added new monitor with name eDP-1 at 10000,10000 with size 1920x1080, pointer 44480
New monitor: WORKSPACEID 2, exists: 0
Set keyboard focus to surface 55880

## HERE KB STILL WORKS

# Closing the lid again
Removed monitor eDP-1!

## HERE KB DOES NOT WORK ANYMORE

# Opening the lid again
Added new monitor with name eDP-1 at 10000,10000 with size 1920x1080, pointer 44480
New monitor: WORKSPACEID 4, exists: 0
Set keyboard focus to surface 3c480

## HERE KB WORKS AGAIN

It seems to me that we miss a ``Set keyboard focus to surface XXX`

@vaxerski
Copy link
Member

patch.txt

?

@vaxerski
Copy link
Member

actually,
patch.txt

for both the crash and kb

@primalmotion
Copy link
Author

primalmotion commented Feb 18, 2023

the first one did not work. let me try the second

@primalmotion
Copy link
Author

the second one fixes the mouse crash, but still not the kb

@vaxerski
Copy link
Member

so you're telling me the first fixes the kb but not the second?

@primalmotion
Copy link
Author

no I edited the message :) it did NOT fix the kb

@vaxerski
Copy link
Member

pushed the second to fix the crash. Not sure what does the kb bug.

@primalmotion
Copy link
Author

here's my config

put both script in PATH or adapt:

lid.sh

#!/bin/env bash
if grep -q open /proc/acpi/button/lid/LID0/state; then
	clam.sh off
else
	if [[ "$(clam.sh count)" == "1" ]]; then
		systemctl suspend
	else
		clam.sh on
	fi
fi

clam.sh

#!/bin/env bash
case "$1" in
count)
	cat /sys/class/drm/*/status | grep -c '^connected'
	;;
on)
	if [[ $(clam.sh count) -gt 1 ]]; then
		hyprctl keyword monitor eDP-1,disable
	fi
	;;
off)
	hyprctl keyword monitor eDP-1,preferred,auto,1
	;;
esac

then in Hyprland.conf

bindl = ,switch:Lid Switch,exec,lid.sh

@primalmotion
Copy link
Author

this seems to happen everytime now after resume

@vaxerski
Copy link
Member

vaxerski commented Mar 2, 2023

well, not for me.

@primalmotion
Copy link
Author

hmmm. It may be due to my usbguard setup. It used to work fine before, but something may have changed when we moved to the new screenlocker protocol, ending up breaking my scripts. With usbguard off, it seems this does not happen anymore. I'll reopen if I notice it again

@primalmotion
Copy link
Author

primalmotion commented Apr 23, 2023

It's happening again. It used to be fairly rare for a while, but now it's back at it after every resume

@primalmotion primalmotion reopened this Apr 23, 2023
@primalmotion
Copy link
Author

primalmotion commented Apr 23, 2023

so this seems to be due to the fact that to prevent a crash in Hyprland when plugging/unplugging monitors while suspended, I force to enable eDP-1 before going into sleep, and rerun my routines to enable/disable it based on the lid switch status on resume

File: .bin/lockscreen.sh

#!/bin/env bash
systemctl --user start swaylock

File: .bin/suspend.sh

clam.sh off
systemctl suspend

File: .bin/clam.sh

#!/bin/bash

action="$1"

case "$action" in
count)
	cat /sys/class/drm/*/status | grep -c '^connected'
	;;
on)
	if [[ $(clam.sh count) -gt 1 ]]; then
		hyprctl keyword monitor eDP-1,disable
	fi
	;;
off)
		hyprctl keyword monitor eDP-1,preferred,10000x10000,1
	;;
esac

File: .bin/lid.sh

#!/bin/env bash

if grep -q open /proc/acpi/button/lid/LID0/state; then
	clam.sh off
else
	# If we are not in CLAMSHELL mode
	if [[ "$(clam.sh count)" == "1" ]]; then
		suspend.sh force
	else
		clam.sh on
	fi
fi

In hyprland conf I run swayidle like this

exec-once = swayidle -w timeout 300 lockscreen.sh timeout 360 suspend.sh resume lid.sh before-sleep lockscreen.sh after-resume lid.sh

This systematically makes swaylock unresponsive until I open the lid.
The issue will not occur if I don't call clam.sh on from `lid.sh (but obviously I end up with my laptop screen on while it should not)

I really whish I don't need all of this and could have a proper clamshell mode management like sway describes here https://github.com/swaywm/sway/wiki#clamshell-mode

@primalmotion
Copy link
Author

seems relevant swaywm/swaylock#282

@primalmotion
Copy link
Author

primalmotion commented Apr 25, 2023

I guess all of my troubles are caused by the need to call clam.sh off when I suspend. otherwise hyprland crashes systematically when I suspend with a monitor plugged, unplug it while suspended, then resume

 Stack trace of thread 910:
                #0  0x00007f381c2a08ec n/a (libc.so.6 + 0x878ec)
                #1  0x00007f381c251ea8 raise (libc.so.6 + 0x38ea8)
                #2  0x00007f381c23b53d abort (libc.so.6 + 0x2253d)
                #3  0x00007f381c49a833 _ZN9__gnu_cxx27__verbose_terminate_handlerEv (libstdc++.so.6 + 0x9a833)
                #4  0x00007f381c4a6d0c _ZN10__cxxabiv111__terminateEPFvvE (libstdc++.so.6 + 0xa6d0c)
                #5  0x00007f381c4a6d79 _ZSt9terminatev (libstdc++.so.6 + 0xa6d79)
                #6  0x00007f381c4a6fdd __cxa_throw (libstdc++.so.6 + 0xa6fdd)
                #7  0x00007f381c49fdb0 _ZNSt10filesystem9canonicalERKNS_7__cxx114pathE (libstdc++.so.6 + 0x9fdb0)
                #8  0x000055df79810ba2 _ZN13CrashReporter18createAndSaveCrashEi (/usr/bin/Hyprland (deleted) + 0xfdba2)
                #9  0x000055df797ac13c _Z25handleUnrecoverableSignali (/usr/bin/Hyprland (deleted) + 0x9913c)
                #10 0x00007f381c251f50 n/a (libc.so.6 + 0x38f50)
                #11 0x000055df79775cb6 _ZN11CCompositor22moveWorkspaceToMonitorEP10CWorkspaceP8CMonitor.cold (/usr/bin/Hyprland (deleted) + 0x62cb6)
                #12 0x000055df7984653f n/a (/usr/bin/Hyprland (deleted) + 0x13353f)
                #13 0x0000000100007ffd n/a (n/a + 0x0)
                ELF object binary architecture: AMD x86-64
--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
"stable"

Hyprland received signal 11 (Segmentation fault)

Version: e195a51cd4dd1cb15a04d9b67e3aec67199c5bea

System info:
	System name: Linux
	Node name: axion
	Release: 6.2.12-arch1-1
	Version: #1 SMP PREEMPT_DYNAMIC Thu, 20 Apr 2023 16:11:55 +0000

GPU:
	00:02.0 VGA compatible controller [0300]: Intel Corporation Comet Lake UHD Graphics [8086:9bca] (rev 04) (prog-if 00 [VGA controller])
	DeviceName: VGA compatible controller


os-release:
	NAME="Arch Linux"
	PRETTY_NAME="Arch Linux"
	ID=arch
	BUILD_ID=rolling
	ANSI_COLOR="38;2;23;147;209"
	HOME_URL="https://archlinux.org/"
	DOCUMENTATION_URL="https://wiki.archlinux.org/"
	SUPPORT_URL="https://bbs.archlinux.org/"
	BUG_REPORT_URL="https://bugs.archlinux.org/"
	PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
	LOGO=archlinux-logo
	


Backtrace:
	#0 | Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x82e) [0x55b0a8f40eae]
		??
		??:0
	#1 | Hyprland(_Z25handleUnrecoverableSignali+0x3c) [0x55b0a8edc15c]
		??
		??:0
	#2 | /usr/lib/libc.so.6(+0x38f50) [0x7faa98651f50]
		??
		??:0
	#3 | Hyprland(+0x62cbd) [0x55b0a8ea5cbd]
		??
		??:0
	#4 | Hyprland(_ZN8CMonitor14setupDefaultWSERK12SMonitorRule+0x38f) [0x55b0a8f768cf]
		??
		??:0
	#5 | Hyprland(_ZN8CMonitor9onConnectEb+0x89b) [0x55b0a8f779fb]
		??
		??:0
	#6 | Hyprland(_ZN13CHyprRenderer16applyMonitorRuleEP8CMonitorP12SMonitorRuleb+0x95d) [0x55b0a8ffccfd]
		??
		??:0
	#7 | Hyprland(_ZN14CConfigManager19ensureMonitorStatusEv+0x1a8) [0x55b0a8f15d78]
		??
		??:0
	#8 | Hyprland(_Z13hyprCtlFDTickijPv+0x1b5) [0x55b0a8f504b5]
		??
		??:0
	#9 | /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7faa9909cae2]
		??
		??:0
	#10 | /usr/lib/libwayland-server.so.0(wl_display_run+0x27) [0x7faa9909d2d7]
		??
		??:0
	#11 | Hyprland(main+0x49b) [0x55b0a8ecd36b]
		??
		??:0
	#12 | /usr/lib/libc.so.6(+0x23790) [0x7faa9863c790]
		??
		??:0
	#13 | /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7faa9863c84a]
		??
		??:0
	#14 | Hyprland(_start+0x25) [0x55b0a8edc005]
		??
		??:0


Log tail:
[LOG] Keybind handling only locked (inhibitor)
[LOG] Destroy called for monitor DP-1
[LOG] onDisconnect called for DP-1
[LOG] Callback 55b0ac316900 -> 55b0ac3168f8,  removed.
[LOG] Callback 55b0ac316a38 -> 55b0ac316a30,  removed.
[LOG] Callback 55b0ac316aa0 -> 55b0ac316a98,  removed.
[LOG] Callback 55b0ac316b08 -> 55b0ac316b00,  removed.
[LOG] LayerSurface 55b0ac6d4350 unmapped
[LOG] Callback 55b0adf859e8 -> 55b0adf859e0, CWLSurface removed.
[LOG] CWLSurface 55b0adf859b8 called destroy()
[LOG] LayerSurface 55b0ac6d4350 destroyed
[LOG] Callback 55b0adf85ba0 -> 55b0adf85b98, layerSurface removed.
[LOG] Callback 55b0adf85a68 -> 55b0adf85a60, layerSurface removed.
[LOG] Callback 55b0adf85ad0 -> 55b0adf85ac8, layerSurface removed.
[LOG] Callback 55b0adf85b38 -> 55b0adf85b30, layerSurface removed.
[LOG] Callback 55b0adf85c08 -> 55b0adf85c00, layerSurface removed.
[LOG] LayerSurface 55b0ab41a510 arranged: x: 11920 y: 9180 w: 2953 h: 28 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor DP-1 layers arranged: reserved: 0.000000 28.000000 0.000000 0.000000
[LOG] LayerSurface 55b0adb21920 unmapped
[LOG] Framebuffer created, status 36053
[LOG] Callback 55b0aa68adb8 -> 55b0aa68adb0, CWLSurface removed.
[LOG] CWLSurface 55b0aa68ad88 called destroy()
[LOG] LayerSurface 55b0adb21920 destroyed
[LOG] Callback 55b0aa68af70 -> 55b0aa68af68, layerSurface removed.
[LOG] Callback 55b0aa68ae38 -> 55b0aa68ae30, layerSurface removed.
[LOG] Callback 55b0aa68aea0 -> 55b0aa68ae98, layerSurface removed.
[LOG] Callback 55b0aa68af08 -> 55b0aa68af00, layerSurface removed.
[LOG] Callback 55b0aa68afd8 -> 55b0aa68afd0, layerSurface removed.
[LOG] Monitor DP-1 layers arranged: reserved: 0.000000 0.000000 0.000000 0.000000
[LOG] Removed monitor DP-1!
[WARN] Unplugged last monitor, entering an unsafe state. Good luck my friend.
[LOG] Callback 55b0ac3169d0 -> 55b0ac3169c8,  removed.
[LOG] Callback 55b0ac316968 -> 55b0ac316960,  removed.
[LOG] SessionLockSurface 55b0ac74d7f0 destroyed
[LOG] Callback 55b0ac74d8f8 -> 55b0ac74d8f0, SSessionLockSurface removed.
[LOG] Callback 55b0ac74d890 -> 55b0ac74d888, SSessionLockSurface removed.
[LOG] Callback 55b0ac74d828 -> 55b0ac74d820, SSessionLockSurface removed.
[LOG] Hyprctl: keyword monitor : eDP-1,preferred,10000x10000,1
[LOG] Applying monitor rule for eDP-1
[LOG] Callback 55b0ab441588 -> 55b0ab441580,  removed.
[LOG] Callback 55b0ab4415f0 -> 55b0ab4415e8,  removed.
[LOG] Registered signal for owner 55b0ab441340: 55b0ab40d860 -> 55b0ab4414f8 (owner: )
[LOG] Registered signal for owner 55b0ab441340: 55b0ab40d8f0 -> 55b0ab441560 (owner: )
[LOG] Registered signal for owner 55b0ab441340: 55b0ab40d8e0 -> 55b0ab4415c8 (owner: )
[LOG] Registered signal for owner 55b0ab441340: 55b0ab40d870 -> 55b0ab441630 (owner: )
[LOG] Registered signal for owner 55b0ab441340: 55b0ab40d880 -> 55b0ab441698 (owner: )
[LOG] Registered signal for owner 55b0ab441340: 55b0ab40d8a0 -> 55b0ab441700 (owner: )
[LOG] Added new monitor with name eDP-1 at 10000,10000 with size 1920x1080, pointer 55b0ab40d710
[LOG] New monitor: WORKSPACEID 1, exists: 1
[LOG] moveWorkspaceToMonitor: Moving 1 to monitor 0

@vaxerski
Copy link
Member

is this still a thing?

@github-usr-name
Copy link
Contributor

Yep, still a thing for me. My particular situation involves DPMS MST, a USB-C hub with various outputs, and the machine's physical connector getting (dis/re)connected when I switch between home & work. I suspect that the issue is linked to the lockscreen triggering when the monitors are disconnected and then losing focus when they're reconnected. Have seen a few things in this area though; gut feel is that perhaps some logic is needed to ensure that overlay layer is always focused when screen is locked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants