How to stop lightdm from restarting forever (runit) ? 15 August 2024, 11:52:21 First things first. this topic is not connected in any case with lightdm or nvidia (I know how to deal with these). Just some observation and the need to change the runit behavior.So, I've been fiddling recently with nvidia drivers and stuff and encountered a problem (well, my own problem) with LightDM. It didn't start because I simply forgot to update my Xorg configuration file (leaving nouveau instead of nvidia there). I know it's my fault, no issue here. I know how to handle this.The problem is:I cannot change virtual consoles. After pressing Alt+F1 (or any other F) it switches to that console for a second and then instantly back to the faulty F7 with a blinking cursor. I mean I cannot change to another console to simply stop the LightDM service and fix things. The LightDM service just keeps trying to respawn forever blocking me from other virtual consoles.The need is to tell runit to stop a service after, say, three retries if it meets certain conditions like a successful start, for example. Can it be scripted somehow? Probably a finish script inside lightdm dir or something.TIA Last Edit: 19 August 2024, 17:19:01 by TheExplorer
Re: Race condition in lightdm (XFCE, runit) ? Reply #1 – 16 August 2024, 12:22:32 I guess I should've posted this in the Runit forum section. Last Edit: 19 August 2024, 12:01:49 by TheExplorer
Re: Race condition in lightdm (XFCE, runit) ? Reply #2 – 17 August 2024, 14:11:09 The problem is runit which keeps restarting lightdm ad infinitum. Not sure if it's possible to limit its retries though, I've never used runit. 1 Likes
Re: Race condition in lightdm (XFCE, runit) ? Reply #3 – 17 August 2024, 18:27:59 Quote from: nous – on 17 August 2024, 14:11:09The problem is runit which keeps restarting lightdm ad infinitum. Not sure if it's possible to limit its retries though, I've never used runit.Thanks, I guess I need to google more and learn how to script it.
Re: Race condition in lightdm (XFCE, runit) ? Reply #4 – 19 August 2024, 11:58:31 Quote from: nous – on 17 August 2024, 14:11:09The problem is runitCan you please move the topic to Runit forum?
Re: How to stop lightdm from restarting forever (runit) ? Reply #5 – 19 August 2024, 12:55:45 Quote from: TheExplorer – on 15 August 2024, 11:52:21Been fiddling recently with nvidia drivers and stuff ... RTFM:https://unix.stackexchange.com/questions/735868/tty-disabled-when-using-nvidia-gpu-arch
Re: How to stop lightdm from restarting forever (runit) ? Reply #6 – 19 August 2024, 13:01:49 Afaik runit only restarts lightdm if this errors out.Did you check the log file in /var/log/lightdm?You can also try to run the lightdm command from the runit service manually to see what happens.artist
Re: How to stop lightdm from restarting forever (runit) ? Reply #7 – 19 August 2024, 15:24:32 Quote from: Artist – on 19 August 2024, 13:01:49Afaik runit only restarts lightdm if this errors out.Did you check the log file in /var/log/lightdm?You can also try to run the lightdm command from the runit service manually to see what happens.artistYeah, the question is how to stop the lightdm service after a certain number of retries because I simply cannot change to another TTY. The culprit here is actually runit.I want to find anything related to it and how can I alter its behavior. Probably adding some finish script for it, not sure. That's why I've asked to move this topic to Runit forum section. Also, to get rid of such people like lq above with unrelated comments who cannot read the initial topic properly.
Re: How to stop lightdm from restarting forever (runit) ? Reply #8 – 19 August 2024, 15:46:28 Quote from: Artist – on 19 August 2024, 13:01:49Did you check the log file in /var/log/lightdm?Nothing special. Obvious errors because Xorg and LightDM couldn't start. Notice these "Using VT 7" and "Releasing VT 7" messages stuck in a loop.Quote from: Artist – on 19 August 2024, 13:01:49You can also try to run the lightdm command from the runit service manually to see what happens.You simply cannot change to another TTY in order to get to the command line at all.After pressing Alt+F1 (or any other F) it switches to that console for a second and then instantly back to the faulty F7 with a blinking cursor. I mean I cannot change to another console to simply stop the LightDM service and fix things.That's the problem. The runit docs are pretty scarce, at least I couldn't find anything related.
Re: How to stop lightdm from restarting forever (runit) ? Reply #9 – 19 August 2024, 16:07:22 For starters, disable the lightdm service so runit won't auto-start it. Then fire up lightdm from the console as root and see if it spews any errors.
Re: How to stop lightdm from restarting forever (runit) ? Reply #10 – 19 August 2024, 16:32:49 Quote from: nous – on 19 August 2024, 16:07:22For starters, disable the lightdm service so runit won't auto-start it. Then fire up lightdm from the console as root and see if it spews any errors.I'm sure it will spew the same as in my logs above. It can happen to any service actually, whether system or custom/local. The need is to tell runit to stop a service after, say, three retries if it meets certain conditions like a successful start, for example. Something should be altered/added to a runit service. Or scripted somehow.This topic is not connected in any case with lightdm or nvidia (I know how to deal with these).Please move this topic to Runit section.