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

After wm crash not able to login again (Hyprland) #182

Open
xVermillionx opened this issue Oct 13, 2023 · 13 comments
Open

After wm crash not able to login again (Hyprland) #182

xVermillionx opened this issue Oct 13, 2023 · 13 comments

Comments

@xVermillionx
Copy link

I have had this problem for a while, where if my wm crashes, in this case Hyprland, I am not able to login again.

/etc/lemurs/wayland/hyprland

#!/bin/sh
exec /usr/bin/Hyprland

I am not sure if it is a problem with Hyprland or in lemurs, and I also have not found signs of others with this problem.

What I do know is that in a tty I am able to restart Hyprland on a crash again.

@coastalwhite
Copy link
Owner

coastalwhite commented Oct 13, 2023

Heya! I think it crashing might be causing lemurs to think it never properly started.

Do you have a log (/var/log/lemurs.log) of that happening?

@Yohannnn
Copy link

I am also having this issue but its not only when it crashes its if I exit Hyprland at all I can't go back into it without rebooting. Also ik that Hyprland doesn't officially support display mangers so this could be a Hyprland bug but also I have heard that sddm works fine with Hyprland.
I have the lemurs.log file of this happening.
lemurs.log

@mxaddict
Copy link

mxaddict commented Dec 6, 2023

Having the same issue, not when hyprland crashes, but when I logout via hyprctl dispatch exit which should close hyprland gracefully with exit status 0

/var/log/lemurs.client.log

terminate called after throwing an instance of 'std::runtime_error'
  what():  wlr_backend_autocreate() failed!

/var/log/lemurs.log

[2023-12-06T07:58:19Z INFO  lemurs] Main lemurs logger is running
[2023-12-06T07:58:19Z INFO  lemurs] Switching to tty 2
[2023-12-06T07:58:19Z INFO  lemurs] UI booted up
[2023-12-06T07:58:19Z WARN  lemurs::post_login] Failed to read from the X folder '/etc/lemurs/wms'
[2023-12-06T07:58:19Z INFO  lemurs::info_caching] Attempting to get a cached information from '/var/cache/lemurs'
[2023-12-06T07:58:19Z INFO  lemurs::info_caching] Read cache file and found environment 'Hyprland' and username 'mxaddict'
[2023-12-06T07:58:19Z INFO  lemurs::ui] Loading username 'mxaddict' from cache
[2023-12-06T07:58:19Z INFO  lemurs::ui] Loading environment 'Hyprland' from cache
[2023-12-06T07:58:23Z INFO  lemurs] Starting new session for 'mxaddict' in environment 'Wayland { script_path: "/etc/lemurs/wayland/Hyprland" }'
[2023-12-06T07:58:23Z INFO  lemurs::post_login::env_variables] Setting XDG Session Parameters
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_CLASS' to 'user'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_TYPE' to 'wayland'
[2023-12-06T07:58:23Z INFO  lemurs::post_login::env_variables] Clearing XDG preemptively to set later
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Preemptively removed environment variable 'XDG_SESSION_CLASS'
[2023-12-06T07:58:23Z INFO  lemurs::auth] Login attempt for 'mxaddict'
[2023-12-06T07:58:23Z INFO  lemurs::auth::pam] Started opening session
[2023-12-06T07:58:23Z INFO  lemurs::auth::pam] Gotten Authenticator
[2023-12-06T07:58:23Z INFO  lemurs::auth::pam] Got handler
[2023-12-06T07:58:23Z INFO  lemurs::auth::pam] Validated account
[2023-12-06T07:58:23Z INFO  lemurs::auth::pam] Opened session
[2023-12-06T07:58:23Z INFO  lemurs::ui] Setting cached information
[2023-12-06T07:58:23Z INFO  lemurs::info_caching] Attempting to set cache
[2023-12-06T07:58:23Z INFO  lemurs::info_caching] Successfully set username in cache file
[2023-12-06T07:58:23Z INFO  lemurs::post_login::env_variables] Setting XDG Seat Variables
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SEAT'. It was already set to 'seat0'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Skipped setting environment variable 'XDG_VTNR'. It was already set to '2'
[2023-12-06T07:58:23Z INFO  lemurs::post_login::env_variables] Setting XDG Session Variables
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Skipped setting environment variable 'XDG_RUNTIME_DIR'. It was already set to '/run/user/1000'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SESSION_ID'. It was already set to 'c2'
[2023-12-06T07:58:23Z INFO  lemurs::post_login::env_variables] Setting Basic Environment Variables
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Successfully changed working directory to /home/mxaddict!
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'HOME' to '/home/mxaddict'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'SHELL' to '/usr/bin/fish'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'USER' to 'mxaddict'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'LOGNAME' to 'mxaddict'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[2023-12-06T07:58:23Z INFO  lemurs::post_login::env_variables] Setting XDG Common Paths
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_HOME' to '/home/mxaddict/.config'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_CACHE_HOME' to '/home/mxaddict/.cache'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_DATA_HOME' to '/home/mxaddict/.local/share'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_STATE_HOME' to '/home/mxaddict/.local/state'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[2023-12-06T07:58:23Z INFO  lemurs::post_login] Starting Wayland session
[2023-12-06T07:58:23Z INFO  lemurs::auth::utmpx] Adding UTMPX record
[2023-12-06T07:58:23Z INFO  lemurs::auth::utmpx] Added UTMPX record
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Removing session environment variables
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Reverting to environment before session
[2023-12-06T07:58:23Z INFO  lemurs::env_container] Reverting to environment before session
[2023-12-06T07:58:23Z INFO  lemurs] Waiting for environment to terminate
[2023-12-06T07:58:23Z INFO  lemurs::post_login] Waiting for client to exit
[2023-12-06T07:58:33Z INFO  lemurs::post_login::wait_with_log] Joining with logging thread.
[2023-12-06T07:58:33Z INFO  lemurs::post_login] Client exited with exit code `signal: 11 (SIGSEGV) (core dumped)`
[2023-12-06T07:58:33Z INFO  lemurs] Environment terminated. Returning to Lemurs...
[2023-12-06T07:58:33Z INFO  lemurs::auth::utmpx] Removing UTMPX record
[2023-12-06T07:58:35Z INFO  lemurs] Starting new session for 'mxaddict' in environment 'Wayland { script_path: "/etc/lemurs/wayland/Hyprland" }'
[2023-12-06T07:58:35Z INFO  lemurs::post_login::env_variables] Setting XDG Session Parameters
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_CLASS' to 'user'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_TYPE' to 'wayland'
[2023-12-06T07:58:35Z INFO  lemurs::post_login::env_variables] Clearing XDG preemptively to set later
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Preemptively removed environment variable 'XDG_SESSION_CLASS'
[2023-12-06T07:58:35Z INFO  lemurs::auth] Login attempt for 'mxaddict'
[2023-12-06T07:58:35Z INFO  lemurs::auth::pam] Started opening session
[2023-12-06T07:58:35Z INFO  lemurs::auth::pam] Gotten Authenticator
[2023-12-06T07:58:35Z INFO  lemurs::auth::pam] Got handler
[2023-12-06T07:58:35Z INFO  lemurs::auth::pam] Validated account
[2023-12-06T07:58:35Z INFO  lemurs::auth::pam] Opened session
[2023-12-06T07:58:35Z INFO  lemurs::ui] Setting cached information
[2023-12-06T07:58:35Z INFO  lemurs::info_caching] Attempting to set cache
[2023-12-06T07:58:35Z INFO  lemurs::info_caching] Successfully set username in cache file
[2023-12-06T07:58:35Z INFO  lemurs::post_login::env_variables] Setting XDG Seat Variables
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_SEAT' to 'seat0'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_VTNR' to '2'
[2023-12-06T07:58:35Z INFO  lemurs::post_login::env_variables] Setting XDG Session Variables
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_RUNTIME_DIR' to '/run/user/1000'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_ID' to '1'
[2023-12-06T07:58:35Z INFO  lemurs::post_login::env_variables] Setting Basic Environment Variables
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Successfully changed working directory to /home/mxaddict!
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'HOME' to '/home/mxaddict'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'SHELL' to '/usr/bin/fish'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'USER' to 'mxaddict'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'LOGNAME' to 'mxaddict'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[2023-12-06T07:58:35Z INFO  lemurs::post_login::env_variables] Setting XDG Common Paths
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_HOME' to '/home/mxaddict/.config'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_CACHE_HOME' to '/home/mxaddict/.cache'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_DATA_HOME' to '/home/mxaddict/.local/share'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_STATE_HOME' to '/home/mxaddict/.local/state'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[2023-12-06T07:58:35Z INFO  lemurs::post_login] Starting Wayland session
[2023-12-06T07:58:35Z INFO  lemurs::auth::utmpx] Adding UTMPX record
[2023-12-06T07:58:35Z INFO  lemurs::auth::utmpx] Added UTMPX record
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Removing session environment variables
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Reverting to environment before session
[2023-12-06T07:58:35Z INFO  lemurs::env_container] Reverting to environment before session
[2023-12-06T07:58:35Z INFO  lemurs] Waiting for environment to terminate
[2023-12-06T07:58:35Z INFO  lemurs::post_login] Waiting for client to exit
[2023-12-06T07:58:35Z INFO  lemurs::post_login::wait_with_log] Joining with logging thread.
[2023-12-06T07:58:35Z INFO  lemurs::post_login] Client exited with exit code `signal: 6 (SIGABRT) (core dumped)`
[2023-12-06T07:58:35Z INFO  lemurs] Environment terminated. Returning to Lemurs...
[2023-12-06T07:58:35Z INFO  lemurs::auth::utmpx] Removing UTMPX record

@mxaddict
Copy link

mxaddict commented Dec 6, 2023

As you can see from the /var/log/lemurs.log first launch of Hyprland works fine, but once you've logged out or killed hyprland, second login attempt will cause hyprland to crash repeatedly.

@coastalwhite
Copy link
Owner

To be honest, this might very well be linked to #184. I think we should solve that and assess if this bug still exists.

@mxaddict
Copy link

mxaddict commented Dec 6, 2023

To be honest, this might very well be linked to #184. I think we should solve that and assess if this bug still exists.

Yes, the symptoms for both issues are similar.

@sungyoonc
Copy link

I think there is something going wrong with lemurs and systemd-logind. When I tried using seatd, I was able to logout and login again.

~/.cache/hyprland/hyprlandCrashReport[PID].txt

[libseat] [libseat/backend/logind.c:642] Could not check if session was active: No such device or address
[libseat] [libseat/libseat.c:79] No backend was able to open a seat
[backend/session/session.c:84] Unable to create seat: Function not implemented
[backend/session/session.c:249] Failed to load session backend
[backend/backend.c:80] Failed to start a session
[backend/backend.c:358] Failed to start a DRM session
[CRITICAL] m_sWLRBackend was NULL!
[CRITICAL] Critical error thrown: wlr_backend_autocreate() failed!

@coastalwhite
Copy link
Owner

All interactions with systemd-logind are currently handled via pam-logind, this is not perfect sadly.

As is stated in documentation of systemd you ideally want to subscribe to the dbus interface of logind. This is something we don't do. I don't think this matters in the single seat case though.

@Samxamnom
Copy link

Samxamnom commented Feb 2, 2024

I think there is something going wrong with lemurs and systemd-logind. When I tried using seatd, I was able to logout and login again.

~/.cache/hyprland/hyprlandCrashReport[PID].txt

[libseat] [libseat/backend/logind.c:642] Could not check if session was active: No such device or address
[libseat] [libseat/libseat.c:79] No backend was able to open a seat
[backend/session/session.c:84] Unable to create seat: Function not implemented
[backend/session/session.c:249] Failed to load session backend
[backend/backend.c:80] Failed to start a session
[backend/backend.c:358] Failed to start a DRM session
[CRITICAL] m_sWLRBackend was NULL!
[CRITICAL] Critical error thrown: wlr_backend_autocreate() failed!

I get a kind of similar error everytime i try to start Hyprland using lemurs.
My Error:

[LOG] Disabling stdout logs! Check the log for further logs.
[wlr] [libseat] [libseat/backend/logind.c:642] Could not check if session was active: No such device or address
[wlr] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
[wlr] [libseat] [seatd/seat.c:61] Could not open tty0 to update VT: Permission denied
[wlr] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
[wlr] [libseat] [seatd/seat.c:72] Could not open terminal for VT 0: Permission denied
[wlr] [libseat] [seatd/seat.c:461] Could not open VT for client
[wlr] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
[wlr] [libseat] [seatd/seat.c:86] Could not open terminal to clean up VT 0: Permission denied
[wlr] [backend/backend.c:107] Timeout waiting session to become active
[wlr] [backend/backend.c:366] Failed to start a DRM session
[CRITICAL] m_sWLRBackend was NULL!
[CRITICAL] Critical error thrown: wlr_backend_autocreate() failed!
[CRITICAL] Hyprland has crashed :( Consult the crash report at /home/samxamnam/.cache/hyprland/hyprlandCrashReport3746.txt for more information.
[wlr] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
[wlr] [libseat] [seatd/seat.c:86] Could not open terminal to clean up VT 0: Permission denied

Is there any way to get around this?

@SpudGunMcGee
Copy link

Hey guys, also having this issue. what is funny is that if i test using Lemurs with Hyprland in a virtual machine, it works as intended. The only thing that I think could be different here is the graphics drivers?

@cassop
Copy link

cassop commented Apr 1, 2024

same here with v 0.3.2

@fucksophie
Copy link

same here!

@sagarreddypatil
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants