Score:3

Ubuntu-desktop repeatedly not working on boot

np flag

I've been running Ubuntu 20.04.3 LTS on my Lenovo Thinkpad T14 for around a year now with little to no issue. However, very recently I have been experiencing issues with ubuntu-desktop not loading on boot.

Occasionally when I boot my machine I will be met with a black screen with a cursor flashing in the top left corner (rather than booting to the log in screen). Thus far I have managed to fix this by going to tty5 or tty6, logging in and using the command apt-get install --reinstall ubuntu-desktop. After rebooting, the system then tends to boot to the desktop as normal. I say tends as it is not always the case, e.g., today I had to reinstall ubuntu-desktop twice before it worked.

One possible cause that I can see is I have a Nvidia MX330 graphics card, which has not played so nicely with my machine in the past. For instance I previously upgraded the driver for the card and could no longer boot my machine until I rolled back the upgrade. Moreover, I recently purged all of the Nvidia packages from my machine apt-get purge nvidia* and now my machine runs a lot smoother!

I am wondering if anyone has any ideas as to why ubuntu-desktop would be sporadically breaking or as to ways to debug this issue? I checked my update logs less /var/log/apt/history.log and it doesn't seem to correlate with recent updates.

Update 31/08

My issue has seemingly evolved slightly. No longer to I need to reinstall ubuntu-desktop but now when I am stuck at the black screen I can simply switch to tty5 and then back to tty1 and the desktop environment will load. It is a bit strange but it works. Just to clarify I want to understand why my boot is not working properly (although the extent to which it is not working has now changed quite a bit).

I actually don't care so much about the official Nvidia drivers for the graphics card, since switching to the nouveau driver my battery life is longer, the laptop is a lot cooler and everything runs smoother.

The kernel I am currently booting is Ubuntu 5.11.0-27.29~20.04.1-generic 5.11.22. Looking at the update logs I am fairly reasonably certain that the problems did start after a kernel upgrade.

David avatar
cn flag
Have you tried doing an update and upgrade?
Rammus avatar
np flag
@David Yes, during the first time this occurred I made sure to update and upgrade.
cn flag
Ray
So, does this mean your problem is currently fixed? You just want to see if you can solve this problem *and* have NVidia drivers working? Unfortunately, getting it working is not always easy. What you can try is the latest NVidia drivers from its web site. I can't give you an explanation other than maybe "compatibility". That is, if it doesn't work, remove it. And then try again if you see new drivers on the web site. Maybe there are other suggestions that others can give, but that is what I'd try as a start.
Nate T avatar
it flag
Or the mesa drivers. When was your last kernel upgrade? (Remember this can happen automatically as part of the update / upgrade process.) You can probably grep it pretty easily from the Apt logs. Let me know if you need help. Does this correspond to the first incident?
jpbrain avatar
ca flag
hi @Rammus. Which kernnel are you booting? ("uname -a on a terminal")
Rammus avatar
np flag
I have updated the question with some additional details.
jpbrain avatar
ca flag
Well I have a different machine but experiencing the same since I got 5.11. I went back to 5.8 and everything is stable. I will wait until next release to try again. It does not happens on all machines so I haven been able to figure out what is (I need to dig deeper). On another machine I removed Nvidia, then it started ok in 5.11, then installed Nvidia again and it kept starting ok.
Score:1
cn flag

Since you have purged all of your nvidia* packages, it's likely that you are now using the nouveau driver, which you can check by running lsmod | grep -Ei nvidia\|nouveau.

I had reliability issues with the 460 and 465 versions of the nvidia driver, which I fixed by downgrading to version 450. You can see a full list of available drivers with apt list nvidia-driver-*

Score:0
nl flag

After a successful login, open a terminal an type
sudo systemctl set-default graphical.target
Then type sudo shutdown -r now

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.