Init systems => runit => Topic started by: Octane on 05 May 2021, 14:09:51
Title: [SOLVED] System freeze at bootup, previous solution not working
Post by: Octane on 05 May 2021, 14:09:51
For a while I've experienced the same problem as aakodadi described in this thread (https://forum.artixlinux.org/index.php/topic,2345.0.html). However, I can't remember this problem being triggered by any change in hardware configuration, and unfortunately, the solution described in that thread doesn't seem to work for me at all, since I still had to reboot my computer maybe 8 times afterwards before I got it to boot.
May 5 02:28:22 hale-bopp kernel: elogind[1203]: Power key pressed. May 5 02:28:22 hale-bopp kernel: elogind[1203]: Powering Off... May 5 02:28:22 hale-bopp kernel: elogind[1203]: System is powering down.. May 5 02:28:23 hale-bopp kernel: elogind[1203]: Received signal 15 [TERM] May 5 02:29:13 hale-bopp elogind[1257]: elogind is already running as PID 1203 May 5 02:29:14 hale-bopp lightdm[1261]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=981) by (uid=0) May 5 02:29:14 hale-bopp kernel: elogind-daemon[1203]: New session c1 of user lightdm. May 5 02:29:14 hale-bopp elogind[1285]: elogind is already running as PID 1203 May 5 02:29:15 hale-bopp elogind[1301]: elogind is already running as PID 1203 May 5 02:29:16 hale-bopp elogind[1313]: elogind is already running as PID 1203 May 5 02:29:17 hale-bopp elogind[1316]: elogind is already running as PID 1203 May 5 02:29:18 hale-bopp elogind[1319]: elogind is already running as PID 1203 May 5 02:29:19 hale-bopp elogind[1322]: elogind is already running as PID 1203 May 5 02:29:19 hale-bopp lightdm[1308]: gkr-pam: unable to locate daemon control file May 5 02:29:19 hale-bopp lightdm[1308]: gkr-pam: stashed password to try later in open session May 5 02:29:20 hale-bopp kernel: elogind-daemon[1203]: Removed session c1. May 5 02:29:20 hale-bopp lightdm[1261]: pam_unix(lightdm-greeter:session): session closed for user lightdm May 5 02:29:20 hale-bopp lightdm[1261]: pam_elogind(lightdm-greeter:session): Failed to release session: No session 'c1' known May 5 02:29:20 hale-bopp lightdm[1308]: pam_unix(lightdm:session): session opened for user user(uid=1000) by (uid=0) May 5 02:29:20 hale-bopp lightdm[1308]: pam_env(lightdm:session): deprecated reading of user environment enabled May 5 02:29:20 hale-bopp kernel: elogind-daemon[1203]: New session 1 of user user. May 5 02:29:20 hale-bopp lightdm[1308]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring May 5 02:29:20 hale-bopp elogind[1340]: elogind is already running as PID 1203 May 5 02:29:21 hale-bopp elogind[1349]: elogind is already running as PID 1203 May 5 02:29:24 hale-bopp elogind[1402]: elogind is already running as PID 1203 May 5 02:29:24 hale-bopp polkitd[1388]: Loading rules from directory /etc/polkit-1/rules.d May 5 02:29:24 hale-bopp polkitd[1388]: Loading rules from directory /usr/share/polkit-1/rules.d May 5 02:29:24 hale-bopp polkitd[1388]: Finished loading, compiling and executing 4 rules May 5 02:29:24 hale-bopp polkitd[1388]: Acquired the name org.freedesktop.PolicyKit1 on the system bus May 5 02:29:25 hale-bopp elogind[1423]: elogind is already running as PID 1203 May 5 02:29:26 hale-bopp elogind[1427]: elogind is already running as PID 1203 May 5 02:29:27 hale-bopp elogind[1454]: elogind is already running as PID 1203 May 5 02:29:28 hale-bopp elogind[1475]: elogind is already running as PID 1203 May 5 02:29:29 hale-bopp polkitd[1388]: Registered Authentication Agent for unix-session:1 (system bus name :1.44 [/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1], object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8) May 5 02:29:30 hale-bopp elogind[1502]: elogind is already running as PID 1203 May 5 02:29:31 hale-bopp elogind[1511]: elogind is already running as PID 1203 May 5 02:29:32 hale-bopp elogind[1537]: elogind is already running as PID 1203 May 5 02:29:33 hale-bopp elogind[1550]: elogind is already running as PID 1203 May 5 02:29:33 hale-bopp dbus-daemon[1173]: [system] Rejected send message, 3 matched rules; type="method_call", sender=":1.57" (uid=979 pid=1561 comm="/usr/lib/geoclue ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.0" (uid=0 pid=1179 comm="connmand -n ") May 5 02:29:34 hale-bopp elogind[1571]: elogind is already running as PID 1203 May 5 02:29:35 hale-bopp elogind[1585]: elogind is already running as PID 1203 May 5 02:29:36 hale-bopp elogind[1612]: elogind is already running as PID 1203 May 5 02:29:37 hale-bopp elogind[1635]: elogind is already running as PID 1203 May 5 02:29:38 hale-bopp elogind[1646]: elogind is already running as PID 1203
Title: Re: System freeze at bootup, previous solution not working
Post by: alium on 05 May 2021, 14:34:06
hi, please try to start by typing here some relevant information related to your computer , read https://forum.artixlinux.org/index.php/topic,1923.0.html specially if it's a HW problem... if your system freeze at bootup, how he can run lightdm? it freeze at bootup or at login?? please clarify (precise) your problem please.
Title: Re: System freeze at bootup, previous solution not working
Post by: Octane on 05 May 2021, 15:18:33
hi, please try to start by typing here some relevant information related to your computer , read https://forum.artixlinux.org/index.php/topic,1923.0.html specially if it's a HW problem...
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 002: ID 0c45:6366 Microdia USB Live Camcra Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 0810:e501 Personal Communication Systems, Inc. SNES Gamepad Bus 001 Device 003: ID 0c76:1676 JMTek, LLC. USB PnP Audio Device Bus 001 Device 002: ID 5332:1400 Clearly Superior Technologies. CST Laser Trackball Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
if your system freeze at bootup, how he can run lightdm? it freeze at bootup or at login?? please clarify (precise) your problem please.
I have to reboot it several times usually, last night I had to do that maybe 8 times before I could get it to boot. Eventually LightDM actually starts up.
Title: Re: System freeze at bootup, previous solution not working
Post by: alium on 05 May 2021, 16:09:29
nice logs, no error, nothing failed, nothing to indicate any problems (in dmesg and X.org) :-) newest BIOS too ;-)
If I understand correctly, will your system freeze during boot without often reach to login manager? what do you use for init?
Title: Re: System freeze at bootup, previous solution not working
Post by: Octane on 05 May 2021, 16:21:27
Yes, it freezes before I reach the login manager. I use Runit for init, hence why I posted it in the Runit forum.
runit... ok, that I overlooked :D
so no services even start when it freezes? (I want to rule out that some services would freeze / have a delay) that it's really a HW problem....
can you try boot system from our (live) ISO or boot to another live ISO? if your computer boot normally from ISO several times in a row , it should be no HW error. Can be kernel issue, or another SW issue, but no HW issue (if booting without freezing). by excluding HW issue we can focus on finding SW issue
Title: Re: System freeze at bootup, previous solution not working
Post by: Octane on 05 May 2021, 17:25:58
so no services even start when it freezes? (I want to rule out that some services would freeze / have a delay) that it's really a HW problem....
can you try boot system from our (live) ISO or boot to another live ISO? if your computer boot normally from ISO several times in a row , it should be no HW error. Can be kernel issue, or another SW issue, but no HW issue (if booting without freezing). by excluding HW issue we can focus on finding SW issue
I don't know if the services freeze or anything, all I know is that I simply getting a blinking cursor in the upper left. And I can't exit into the text terminal, just like in the thread I linked to I will only see the Neofetch and login prompt for a split second before it goes back to the blinking cursor.
I actually have this problem with my laptop (also running Artix) as well, so I highly doubt it's a hardware issue. But sure, I'll try this with the live ISO a few times later today.
Title: Re: System freeze at bootup, previous solution not working
Post by: alium on 05 May 2021, 18:02:30
that sound like pure sw problem. as first I would replace lightdm with something else (gdm / sddm), lightdm seems to be problematic not only in your case... what for DE/WM you use?
Title: Re: System freeze at bootup, previous solution not working
Post by: Octane on 05 May 2021, 18:33:32
that sound like pure sw problem. as first I would replace lightdm with something else (gdm / sddm), lightdm seems to be problematic not only in your case... what for DE/WM you use?
I use XFCE. I would be cool with simply having a text-based login prompt that runs neofetch and then asks me to enter my username and password, as long as I can keep the screensaver lock that comes with LightDM.
EDIT: Alright, just played around with the packaged display managers a bit, and I could only get LXDM to work properly, which I don't really like. Is there any guide to just turning off the display manager and simply being given the neofetch screen and login prompt by default, and having startx run by itself afterwards?
Title: Re: System freeze at bootup, previous solution not working
Post by: strajder on 05 May 2021, 23:44:36
EDIT: Alright, just played around with the packaged display managers a bit, and I could only get LXDM to work properly, which I don't really like. Is there any guide to just turning off the display manager and simply being given the neofetch screen and login prompt by default, and having startx run by itself afterwards?
I'm using the setup you described (tty + startx), it's the best, the least bloated and the fastest. You need to stop your DM's service (depends on your init system - I use s6), prevent it from starting upon login, then edit ~/.bash_profile to call startx if running a login shell. For example, I have (also killing gpg-agent upon login):
I'm using the setup you described (tty + startx), it's the best, the least bloated and the fastest. You need to stop your DM's service (depends on your init system - I use s6), prevent it from starting upon login, then edit ~/.bash_profile to call startx if running a login shell. For example, I have (also killing gpg-agent upon login):
And that's enough? Also, what if I want to switch to another shell, will it carry over?
Yes, that is enough. The code I posted is Bash-specific. If you use some other shell, you need to adjust it to your shell. The gist is to call startx if the shell is a login shell (and not, for example, run in a terminal emulator like xterm).
Title: Re: System freeze at bootup, previous solution not working
Post by: Octane on 08 May 2021, 19:03:34
Yes, that is enough. The code I posted is Bash-specific. If you use some other shell, you need to adjust it to your shell. The gist is to call startx if the shell is a login shell (and not, for example, run in a terminal emulator like xterm).
Alright, just tried this out, and I could unfortunately not get it to work. I decided to finally try this out after having configured zsh. So I tried out the command given here (https://wiki.parabola.nu/Start_X_at_Boot) since it specifies that it works for zsh. It's not exactly for Arch-derived distros, but I assumed it would work. Anyway, after I had added that to ~/.zprofile, uninstalled lxdm-runit and rebooted, I couldn't even get startx to run by running it manually. I had to reinstall lxdm-runit to be able to get into x again.
Title: Re: System freeze at bootup, previous solution not working
Post by: strajder on 08 May 2021, 23:52:11
I couldn't even get startx to run by running it manually. I had to reinstall lxdm-runit to be able to get into x again.
This indicates a problem with Xorg. Properly installed X should be able to be run without a DM. It is strange that you could get into X with lxdm. I could theorize that probably when you reinstalled lxdm pacman picked up some missing dependency and installed it. Aside from providing your X log at the time when you failed to start X by the command startx, you should now try to just disable the service, without uninstalling the lxdm package and then try to run startx again.
Title: Re: System freeze at bootup, previous solution not working
Post by: ####### on 09 May 2021, 03:31:33
and perhaps you need to add this to the agetty7 options however you do that in Runit "--autologin <yourusername>" Also you can configure startx for logging in .bashrc something like this:
This indicates a problem with Xorg. Properly installed X should be able to be run without a DM. It is strange that you could get into X with lxdm. I could theorize that probably when you reinstalled lxdm pacman picked up some missing dependency and installed it. Aside from providing your X log at the time when you failed to start X by the command startx, you should now try to just disable the service, without uninstalling the lxdm package and then try to run startx again.
Alright, just tried to disable the service, which immediately kicked me out of XFCE. As before, I couldn't get X to start using startx, and here's the X log for this. The only way I could get back in was to manually run lxdm. https://paste.artixlinux.org/view/856cc9ab (https://paste.artixlinux.org/view/856cc9ab) EDIT: Now I also have to start lxdm manually every time I boot up my computer. For whatever reason it doesn't want to start automatically even though the service is enabled.
Title: Re: System freeze at bootup, previous solution not working
Post by: ####### on 09 May 2021, 21:49:57
There are a couple of error messages in that last log: [ 24143.785] (EE) Failed to load module "ati" (module does not exist, 0) [ 24143.855] (EE) AMDGPU(0): Failed to make import prime FD as pixmap: 22 Searching them brings up various diverse issues and solutions from the last year or two. I tried booting XFCE with nomodeset on the kernel command line last year and then at least it wouldn't start without modesetting. I only tried it with startx, perhaps lxdm alters things somehow. You could try temporarily installing another desktop as well as XFCE, to see if it made a difference, and perhaps allow you to more easily gather debugging info.
Title: Re: System freeze at bootup, previous solution not working
Post by: Octane on 09 May 2021, 22:28:53
Alright, just decided to reboot my machine and take a two photos of the error screens to analyze. What I maybe should have stated before is that in order to even log in I need to press Ctrl+F5 to open another console, the default one just gives me errors and asks for my username and password again. Login attempt on default tty (https://i.postimg.cc/VYp0wkB8/IMG-20210509-221050-SCALED.jpg) Login attempt on F5 tty (https://i.postimg.cc/0kSMy1cJ/IMG-20210509-221146-SCALED.jpg) I noticed that there are log files for Xorg that are saved in the home directory, and here they are as well. Login attempt on default tty (https://paste.artixlinux.org/view/6a5fc59a) Login attempt on F5 tty (https://paste.artixlinux.org/view/d174b5b2)
EDIT: And now the audio is gone as well. My external audio card is connected according to lsusb, but neither it nor the built-in one shows up in the audio mixer or anything. I'm having real bad luck right now it seems. PulseAudio is still running by the way, and seemingly no one else has had a similar problem where the audio interfaces just disappear. Either way, this is likely caused by the mess related to lxdm I was already in.
Title: Re: System freeze at bootup, previous solution not working
Post by: strajder on 10 May 2021, 15:45:08
The manpage for xinit(1) states:
Quote
The xinit program is used to start the X Window System server and a first client program on systems that are not using a display manager such as xdm(1) or in environments that use multiple window systems. When this first client exits, xinit will kill the X server and then terminate.
If no specific client program is given on the command line, xinit will look for a file in the user's home directory called .xinitrc to run as a shell script to start up client programs. If no such file exists, xinit will use the following as a default:
xterm -geometry +1+1 -n login -display :0
If no specific server program is given on the command line, xinit will look for a file in the user's home directory called .xserverrc to run as a shell script to start up the server. If no such file exists, xinit will use the following as a default:
X :0
Note that this assumes that there is a program named X in the current search path. The site administrator should, therefore, make a link to the appropriate type of server on the machine, or create a shell script that runs xinit with the appropriate server.
The file /etc/X11/xinit/xinitrc, as well as ~/.xinitrc, is just an ordinary shell script. If there is no ~/.xinitrc, the one in /etc gets executed by X when it starts without a display manager. The default contents of a /etc/X11/xinit/xinitrc is this:
As you can see, there is a number of lines near the bottom which call programs which might not be installed in your system. Those are:
twm window manager
xclock application
xterm terminal emulator
What to do? You either have your own ~/.xinitrc, which conveniently just overrides all this nonsense from /etc, or simply comment out those lines calling the nonexistant programs and put some Xorg program as the last line, preceeded by exec. Alternatively, you could also install xorg-twm, xorg-xclock and xterm packages to get no error, but start those programs by xinitrc when you run startx. I also use dwm globally on my system, so I have exec dwm as the last line there. I haven't used lxde yet as my "daily driver", nor feel the need to in the future, so I'm afraid I can't help you with specifically setting it up to start without a DM. It could be as simple as putting exec lxde (or whatever the program to start lxde is called) to the end of xinitrc.
This reminded me, I might take the time and write a guide on how to set up Xorg to start dwm without a display manager.
Title: Re: System freeze at bootup, previous solution not working
Post by: strajder on 10 May 2021, 15:57:55
The manpage for xinit(1) states: The file /etc/X11/xinit/xinitrc, as well as ~/.xinitrc, is just an ordinary shell script. If there is no ~/.xinitrc, the one in /etc gets executed by X when it starts without a display manager. The default contents of a /etc/X11/xinit/xinitrc is this:
As you can see, there is a number of lines near the bottom which call programs which might not be installed in your system. Those are:
twm window manager
xclock application
xterm terminal emulator
What to do? You either have your own ~/.xinitrc, which conveniently just overrides all this nonsense from /etc, or simply comment out those lines calling the nonexistant programs and put some Xorg program as the last line, preceeded by exec. Alternatively, you could also install xorg-twm, xorg-xclock and xterm packages to get no error, but start those programs by xinitrc when you run startx. I also use dwm globally on my system, so I have exec dwm as the last line there. I haven't used lxde yet as my "daily driver", nor feel the need to in the future, so I'm afraid I can't help you with specifically setting it up to start without a DM. It could be as simple as putting exec lxde (or whatever the program to start lxde is called) to the end of xinitrc.
This reminded me, I might take the time and write a guide on how to set up Xorg to start dwm without a display manager.
I actually use XFCE, I was only using lxdm as a display manager because it was the only one I could get to work, but it was pretty easy to find the equivalent command. So, after having commented out those lines from the /etc file and adding a .xinitrc to my home directory, I could finally log in from the tty without any issues. It didn't start x automatically, but creating a .zlogin file and adding this helped a ton:
# this should run startx if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startxfce4 # # Could use xinit instead of startx # #exec xinit -- /usr/bin/X -nolisten tcp vt7 fi
Now every issue is resolved, besides the fact that I need to press enter once on the login screen before typing in my info since it gives me some message about a wpa supplicant, but that's small potatoes. I declare this issue solved at this point now that I'm finally free from lxdm. Thank you!
Title: Re: [SOLVED] System freeze at bootup, previous solution not working
Post by: The Dark Side on 10 May 2021, 22:44:49
I do not understand why they put this problem as solved, when it is clearly not !!!!
Comment, I'm using the Mate environment with runit. I installed in my system the packages of dependencies of which is talked about up in the code of file of .xinitrc that name (xorg-TWM, xorg-Xclock and Xterm) and I added exec mate-session and does not start, the system is dead and I have to restart off from the hardware.
It would be good to contribute a solution clearly, for those who do not know so much for this problem, my experience in Artix was good until this serious failure. I really do not know what to do....
Title: Re: [SOLVED] System freeze at bootup, previous solution not working
Post by: alium on 10 May 2021, 22:52:30
@The Dark Side : maybe because as wrote octane, all his problems are solved?
Quote
Now every issue is resolved, besides the fact that I need to press enter once on the login screen before typing in my info since it gives me some message about a wpa supplicant, but that's small potatoes. I declare this issue solved at this point now that I'm finally free from lxdm. Thank you!
and he marked it as solved. If you have a problem, please feel free open new topic with our problem, thank you.
Title: Re: [SOLVED] System freeze at bootup, previous solution not working
Post by: strajder on 11 May 2021, 11:34:09
@Dark side: I linked the Arch wiki article above which has links to further articles on setting up DM-less login. The only parts which are different in Artix are those having to do with taking down and disabling services, which also differ between the various init systems used in Artix.
Read the manuals/guides.
Title: Re: [SOLVED] System freeze at bootup, previous solution not working
Post by: The Dark Side on 11 May 2021, 21:20:58
I'm going to take a look at the wiki and try to solve it, let's see how I find it. Greetings and thanks.
Title: Re: [SOLVED] System freeze at bootup, previous solution not working
Post by: mandog on 12 May 2021, 17:32:09
Please do not negro bump other users threads it ends in confussion as this one has. Plus its different inits.