Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: System freezes while booting (Read 1130 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

System freezes while booting

My setup:

Code: [Select]
$ lsblk
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                                             8:0    0 447,1G  0 disk  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (This is my SSD)
├─sda1                                          8:1    0   300M  0 part  /boot/efi
├─sda2                                          8:2    0 431,8G  0 part 
│ └─luks-c1dec924-cacc-463a-b0b1-da15fd3791ad 254:0    0 431,8G  0 crypt / <<<<<<<< (5.11.1-artix1-1)
└─sda3                                          8:3    0    15G  0 part 
  └─luks-c86d3e5b-d4de-4e44-95b7-aae30d93e57c 254:1    0    15G  0 crypt [SWAP] <<<< (My swap partition, obviously  :P )
sdb                                             8:16   0 931,5G  0 disk  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (My HDD)
├─sdb1                                          8:17   0    16M  0 part  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (Windows UEFI partition)
├─sdb2                                          8:18   0 292,5G  0 part  <<<<<<<<<<<<<<<<<<<<<<<<<<<<< (Windows 10)
├─sdb3                                          8:19   0   499M  0 part  <<<<<<<<<<<<<<<<<<<<<<<<<<<<< (No idea what is this. Probably some partition created by Windows for some unknown reason)
├─sdb4                                          8:20   0 185,9G  0 part  <<<<<<<<<<<<<<<<<<<<<<<<<<<<< (NTFS backup partition)
└─sdb5                                          8:21   0 452,6G  0 part  <<<<<<<<<<<<<<<<<<<<<<<<<<<<< (ext4 backup partition)
  └─luks-3e1e88b2-1dce-4602-88c4-6c0e6bc0afe5 254:2    0 452,6G  0 crypt /mnt/214cd7fa-1ddb-43d9-879b-f78152af9629

I installed today a new WiFi/Bluetooth combo card in my system via PCIe. And started having a random freeze during startup. It happens 1/3 times or so. The system hangs indecently on a black scree with a white cursor in the top left corner. I tried switching to another tty to see if I can unfreeze it. But as soon as I switch, I can see the login prompt for a second and then goes black quickly.

I took a look at the log files and found this in
Code: [Select]
/var/log/auth.log
:

Code: [Select]
Mar  3 23:43:10 vibranium elogind[2025]: elogind is already running as PID 1305
Mar  3 23:43:11 vibranium elogind[2034]: elogind is already running as PID 1305
Mar  3 23:43:12 vibranium elogind[2055]: elogind is already running as PID 1305
Mar  3 23:43:13 vibranium elogind[2065]: elogind is already running as PID 1305
Mar  3 23:43:14 vibranium elogind[2075]: elogind is already running as PID 1305
Mar  3 23:43:15 vibranium elogind[2085]: elogind is already running as PID 1305
Mar  3 23:43:16 vibranium elogind[2098]: elogind is already running as PID 1305
Mar  3 23:43:17 vibranium elogind[2117]: elogind is already running as PID 1305
Mar  3 23:43:18 vibranium elogind[2127]: elogind is already running as PID 1305
Mar  3 23:43:19 vibranium elogind[2141]: elogind is already running as PID 1305
Mar  3 23:43:20 vibranium elogind[2162]: elogind is already running as PID 1305
Mar  3 23:43:21 vibranium elogind[2183]: elogind is already running as PID 1305
Mar  3 23:43:22 vibranium elogind[2211]: elogind is already running as PID 1305
Mar  3 23:43:23 vibranium elogind[2226]: elogind is already running as PID 1305
Mar  3 23:43:24 vibranium elogind[2239]: elogind is already running as PID 1305
Mar  3 23:43:25 vibranium elogind[2249]: elogind is already running as PID 1305
Mar  3 23:43:26 vibranium elogind[2258]: elogind is already running as PID 1305
Mar  3 23:43:27 vibranium elogind[2273]: elogind is already running as PID 1305
Mar  3 23:43:28 vibranium elogind[2282]: elogind is already running as PID 1305
Mar  3 23:43:29 vibranium elogind[2291]: elogind is already running as PID 1305
Mar  3 23:43:30 vibranium elogind[2301]: elogind is already running as PID 1305

I'm not sure if it's related. But this is only thing that seemed wrong in the logs.

Re: System freezes while booting

Reply #1
Elogind racing possibly? I'm not sure why that would affect ttys though.


 

Re: System freezes while booting

Reply #3
Alright, I found the solution to this.

When I looked at the output of dmesg, I found this.

Code: [Select]
[    0.242824] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.
[    0.242916] pci 0000:00:00.2: can't derive routing for PCI INT A
[    0.242917] pci 0000:00:00.2: PCI INT A: not connected
[    0.242945] pci 0000:00:01.0: Adding to iommu group 0
[    0.242954] pci 0000:00:01.2: Adding to iommu group 0
[    0.242967] pci 0000:00:08.0: Adding to iommu group 1
[    0.242973] pci 0000:00:08.1: Adding to iommu group 1
[    0.242985] pci 0000:00:14.0: Adding to iommu group 2
[    0.242991] pci 0000:00:14.3: Adding to iommu group 2
[    0.243018] pci 0000:00:18.0: Adding to iommu group 3
[    0.243025] pci 0000:00:18.1: Adding to iommu group 3

I don't know what it is, so a quick google search and I found this question in Linux Mint forums. The answer to which was to:

Quote
Try adding iommu=pt to the end of the GRUB_CMDLINE_LINUX_DEFAULT= line in /etc/default/grub; run sudo update-grub afterwards, then reboot.

That's what I did and sure enough... It worked! I'm no longer having any boot freezes.

Re: System freezes while booting

Reply #4
Alright, I found the solution to this.

When I looked at the output of dmesg, I found this.

Code: [Select]
[    0.242824] pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.
[    0.242916] pci 0000:00:00.2: can't derive routing for PCI INT A
[    0.242917] pci 0000:00:00.2: PCI INT A: not connected
[    0.242945] pci 0000:00:01.0: Adding to iommu group 0
[    0.242954] pci 0000:00:01.2: Adding to iommu group 0
[    0.242967] pci 0000:00:08.0: Adding to iommu group 1
[    0.242973] pci 0000:00:08.1: Adding to iommu group 1
[    0.242985] pci 0000:00:14.0: Adding to iommu group 2
[    0.242991] pci 0000:00:14.3: Adding to iommu group 2
[    0.243018] pci 0000:00:18.0: Adding to iommu group 3
[    0.243025] pci 0000:00:18.1: Adding to iommu group 3

I don't know what it is, so a quick google search and I found this question in Linux Mint forums. The answer to which was to:

That's what I did and sure enough... It worked! I'm no longer having any boot freezes.

This is an unrelated error  which occurs in VM's.


The actual cause of this error is a racing conditon because elogind is started both with it's own service and also by the dbus service. If you have dbus service enabled just disable the elogind service. That is why you sometimes see it and sometimes not. The dbus service tries to restart the elogind until eternity (so there's the real error), and the regular elogind service just silently stops when it finds there is another PID for  elogind (started by dbus).


Code: [Select]
sudo touch /run/runit/service/elogind/down

or

Code: [Select]
sudo rm /run/runit/service/elogind
.

I was ubable to stop de dbus service.
Probably a bug in the dbus service. It should check if elogind is already running and then stop trying to run it.

Re: System freezes while booting

Reply #5
Probably a bug in the dbus service. It should check if elogind is already running and then stop trying to run it.

If only. Elogind comes with a dbus service does autostarting as a "feature" but as you pointed out it causes racing and such. That said, it should only autostart after you login. If the elogind daemon is up and started by then (which it should be by your init system), then it shouldn't do anything. So in practice, it shouldn't normally be a problem, but several people have gotten weird behavior somehow. The file in question is "/usr/share/dbus-1/system-services/org.freedesktop.login1.service", so if you could modify it to be a no-op.