Ubuntu 22.04.2 failes booting every other time

414 views Asked by At

Yesterday [2023-06-21] I ran # apt upgrade on my Ubuntu 22.04.2 and during updating some errors happend -- smth related to dkms. I was not focused on the process, so I just try to run # apt upgrade again and it processed then witout errors. Today, after restarting my laptop, I get stuck booting with some randomness - after one or two reboots it can boot successfully, but there could be some issues:

  • I have external display, and now the system doesn't see it
  • there is a builtin USB-hub in the display, and I connect Ethernet via Ethernet-2-USB adapter > Display USB Hub > USB Type-C data cable > Laptop. It works now only if I connect display to my laptop with both USB Type-C and HDMI. xrandr --listmonitors doesn't see HDMI devices, and there is no Ethernet over HDMI, but laptop keeps monitor alive via HDMI or smth. like that. Before that Ethernet works fine without HDMI - it required only USB Type-C connection.
  • one single time system loaded totally fine: display worked, Ethernet worked (w/ and w/o HDMI connected)
  • I have built in Nvidia mx250. Now i need to switch it off using prime-select intel. X is not working via discrete card.
  • one time while booting there were errors related to iwlwifi
  • every booting (successfull or not) the last printed error is SGX is disabled by BIOS (on my Acer Swift 3 there is no options to manage this feature)
uname -a

# Linux hostname 5.19.0-32-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
# Mon Jan 30 17:03:34 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
dpkg --list | grep linux-image | awk '{print $2}'
# linux-image-5.19.0-32-generic
# linux-image-unsigned-5.19.0-41-generic
dpkg --list | grep 5.19.0 | awk '{print $2}'
# linux-headers-5.19.0-32-generic
# linux-headers-5.19.0-41-generic

# linux-hwe-5.19-headers-5.19.0-32
# linux-hwe-5.19-headers-5.19.0-41

# linux-image-5.19.0-32-generic
# linux-image-unsigned-5.19.0-41-generic

# linux-modules-5.19.0-32-generic
# linux-modules-5.19.0-41-generic

# linux-modules-extra-5.19.0-32-generic
# linux-modules-extra-5.19.0-41-generic

# linux-objects-nvidia-530-5.19.0-41-generic

Despite some listed packages of version 5.19.0-41, there are no kernel files of this version in /boot dir.

So, as there is no sustainability in my problem, it is totaly look like chaos, that I tried to describe.

I suppose, the problem is in kernel modules building while upgrading. I tried to rebuild them:

ls /boot/initrd.img-* | cut -d- -f2- | \
sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start

It built some modules, but it didn't help. I stay with random booting result.

1

There are 1 answers

0
igogo On BEST ANSWER

I spend a day trying to solve this issue, and got no success. There was a restriction, that I should backup my data from 1tb SSD to reinstall the system and no separate storage for that. But I decided to dig in and found out, that BTRFS automatically created two subvolumes: /@ for system data and /@home for user data. I just cleaned out /@ and reinstall the system, keeping my data on place.