fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.51k stars 306 forks source link

Add a third option "F3 restart ly" #620

Open FranBar1966 opened 5 months ago

FranBar1966 commented 5 months ago

Add a third option "F3 restart ly" in the login screen, next to F1 shutdown and F2 restart.

Currently this is my configuration:

# Command executed when pressing F2
#restart_cmd = /sbin/shutdown -r now
restart_cmd = systemctl restart ly 

The reason is that ly stops working if it doesn't restart when you log out and log back in, especially if you switch from x11 to Wayland or the other way around.

Similar options are found in other display managers.

llc0930 commented 5 months ago

So why not just restart ly all the time?

AnErrupTion commented 5 months ago

@FranBar1966

The reason is that ly stops working if it doesn't restart when you log out and log back in

This is definitely not the right way to do it and looks more like a bug to me. What distro & DE(s)/WM(s) are you using? I'm able to switch between Openbox & Sway sessions just fine on Arch Linux (with the latest Ly code in master).

FranBar1966 commented 5 months ago

If you log out and log in immediately, you always get the error, if you log out and log in with the same user and options after a few minutes, most of the time there is no error, if you change the user or from X11 to Wayland you always get an error.

██████████████████  ████████   
██████████████████  ████████   ----------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Kernel: 6.9.3-3-MANJARO 
████████            ████████   Uptime: 11 mins 
████████  ████████  ████████   Packages: 2014 (pacman), 22 (flatpak) 
████████  ████████  ████████   Shell: zsh 5.9 
████████  ████████  ████████   Resolution: 1920x1080, 1920x1080, 1920x1080 
████████  ████████  ████████   DE: Plasma 6.0.5 
████████  ████████  ████████   WM: KWin 
████████  ████████  ████████   WM Theme: Brisa 
████████  ████████  ████████   Theme: Breeze [Plasma], Breeze [GTK2/3] 
████████  ████████  ████████   Icons: Fluent-teal-dark [Plasma], Fluent-teal-dark [GTK2/3] 
████████  ████████  ████████   Terminal: konsole 
                               Terminal Font: Hack Nerd Font Mono 12 
                               CPU: AMD Ryzen 5 7600X (12) @ 5.400GHz 
                               GPU: NVIDIA GeForce RTX 4070 
                               Memory: 4211MiB / 64018MiB 
FranBar1966 commented 5 months ago

So why not just restart ly all the time?

My first idea, I didn't know how and came up with the reboot option.

The point is that I only restart if there is an error.

FranBar1966 commented 5 months ago

How can I get the error output from ly?

This is what I can find in the system logs:

systemd-coredump    Process 91508 (kcminit_startup) of user 1000 dumped core.

Stack trace of thread 91508:
#0  0x000070df6aca8e44 n/a (libc.so.6 + 0x94e44)
#1  0x000070df6ac50a30 raise (libc.so.6 + 0x3ca30)
#2  0x000070df6ac384c3 abort (libc.so.6 + 0x244c3)
#3  0x000070df6b28c6b7 n/a (libQt6Core.so.6 + 0x8c6b7)
#4  0x000070df6b28ce5b _ZNK14QMessageLogger5fatalEPKcz (libQt6Core.so.6 + 0x8ce5b)
#5  0x000070df6b8daa45 n/a (libQt6Gui.so.6 + 0xdaa45)
#6  0x000070df6b97af38 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt6Gui.so.6 + 0x17af38)
#7  0x000070df6b348d75 _ZN23QCoreApplicationPrivate4initEv (libQt6Core.so.6 + 0x148d75)
#8  0x000070df6b97afce _ZN22QGuiApplicationPrivate4initEv (libQt6Gui.so.6 + 0x17afce)
#9  0x000070df6b973bdd _ZN15QGuiApplicationC2ERiPPci (libQt6Gui.so.6 + 0x173bdd)
#10 0x00005e1de931b198 n/a (kcminit + 0x3198)
#11 0x000070df6ac39c88 n/a (libc.so.6 + 0x25c88)
#12 0x000070df6ac39d4c __libc_start_main (libc.so.6 + 0x25d4c)
#13 0x00005e1de931c675 n/a (kcminit + 0x4675)

Stack trace of thread 91509:
#0  0x000070df6ad1c39d __poll (libc.so.6 + 0x10839d)
#1  0x000070df6a9f68fd n/a (libglib-2.0.so.0 + 0xbe8fd)
#2  0x000070df6a993f95 g_main_context_iteration (libglib-2.0.so.0 + 0x5bf95)
#3  0x000070df6b5a28dd _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3a28dd)
#4  0x000070df6b34f10e _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x14f10e)
#5  0x000070df6b43a4e0 _ZN7QThread4execEv (libQt6Core.so.6 + 0x23a4e0)
#6  0x000070df6c10adfe n/a (libQt6DBus.so.6 + 0x2ddfe)
#7  0x000070df6b4c96e7 n/a (libQt6Core.so.6 + 0x2c96e7)
#8  0x000070df6aca6ded n/a (libc.so.6 + 0x92ded)
#9  0x000070df6ad2a0dc n/a (libc.so.6 + 0x1160dc)
ELF object binary architecture: AMD x86-64
FranBar1966 commented 5 months ago

@FranBar1966

The reason is that ly stops working if it doesn't restart when you log out and log back in

This is definitely not the right way to do it and looks more like a bug to me. What distro & DE(s)/WM(s) are you using? I'm able to switch between Openbox & Sway sessions just fine on Arch Linux (with the latest Ly code in master).

Effectively this is not the way to deal with this particular error, but this would resolve a possible ly unrelated error, it would give me the option to retry another session type.

Also it has not yet been established that the error is ly related. The latest Manjaro update has caused a lot of problems.

AnErrupTion commented 5 months ago

If you log out and log in immediately, you always get the error, if you log out and log in with the same user and options after a few minutes, most of the time there is no error, if you change the user or from X11 to Wayland you always get an error.

██████████████████  ████████   
██████████████████  ████████   ----------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Kernel: 6.9.3-3-MANJARO 
████████            ████████   Uptime: 11 mins 
████████  ████████  ████████   Packages: 2014 (pacman), 22 (flatpak) 
████████  ████████  ████████   Shell: zsh 5.9 
████████  ████████  ████████   Resolution: 1920x1080, 1920x1080, 1920x1080 
████████  ████████  ████████   DE: Plasma 6.0.5 
████████  ████████  ████████   WM: KWin 
████████  ████████  ████████   WM Theme: Brisa 
████████  ████████  ████████   Theme: Breeze [Plasma], Breeze [GTK2/3] 
████████  ████████  ████████   Icons: Fluent-teal-dark [Plasma], Fluent-teal-dark [GTK2/3] 
████████  ████████  ████████   Terminal: konsole 
                               Terminal Font: Hack Nerd Font Mono 12 
                               CPU: AMD Ryzen 5 7600X (12) @ 5.400GHz 
                               GPU: NVIDIA GeForce RTX 4070 
                               Memory: 4211MiB / 64018MiB 

On Arch Linux, with the current latest Ly master code, switching from Plasma X11 to Wayland (and vice versa) immediately, as well as just logging back in without switching sessions, also immediately, works just fine on my end.

How can I get the error output from ly?

It should be possible (at least for X11) by overriding x_cmd in the configuration file to redirect its stdout/stderr to a file.

FranBar1966 commented 5 months ago

En Arch Linux, con la actual Ly código maestro, el cambio de Plasma X11 a Wayland (y viceversa) de forma inmediata, así como a sólo reanudar la sesión sin tener que cambiar de sesiones, también de inmediato, funciona muy bien en mi final.

My intention was not to report a bug, it was to request a feature.

Currently after an error you have to completely reboot or switch TTY and restart ly, as I have F2 set to restart ly... a third option F3 would be ideal.

Thanks, hope I haven't wasted too much of your time.

AnErrupTion commented 5 months ago

Currently after an error you have to completely reboot or switch TTY and restart ly

That's still considered a bug! 😄

Thanks, hope I haven't wasted too much of your time.

You haven't, I'm happy to resolve issues!