Solved Ubuntu 24.04 halts on loading screen after installing GeForce RTX 3050

Solved issue

lymphor

Member
Joined
Jul 16, 2023
Messages
91
Reaction score
47
Credits
897
Hello everybody! :)
I'm using Ubuntu 24.04, and until recently I had no dedicated GPU. I was using the GPU integrated in the CPU, an AMD Ryzen 7 5700G. My motherboard is an ASUS PRIME B350-PLUS, and I modified its BIOS settings to give 1.5GB additional RAM memory to the GPU, taking it from the regular RAM, to obtain a total of 2GB RAM for the GPU.
Yesterday, I installed a brand new dedicated GPU: Gainward GeForce RTX 3050 Pegasus (more details here: https://www.gainward.com/main/vgapro.php?id=1148&lang=en). I booted Windows 11 and everything went smooth: the drivers updated automatically and everything worked fine. But when I switched to Ubuntu, the PC froze on loading screen and became unresponsive. The only thing left for me to do was to force restart the PC, by using the reset button. So I pulled the HDMI cable out from the RTX 3050 and put it back in the motherboard, and tried to load Ubuntu once again. But the result was the same.
I'm not very skilled in hardware aspects, so I would need some help to get back in Ubuntu :D
One of the times that I tried to boot Ubuntu, I pressed ESC key to show the commands currently working, and I made a picture that I'm attaching to this message. Maybe the info in the picture can help understand the issue.
Thanks in advance for your help! ;)
 

Attachments

  • Ubuntu_halts.jpg
    Ubuntu_halts.jpg
    6.3 MB · Views: 160


I don't see any errors, so most likely the freeze is happening as your DM is starting (graphics login) or when the module is being loaded...
Plug your display it back into the 3050. Reboot.
When you see the GRUB menu, select the top option and press e
This lets you edit the boot settings. look for a row called "linux" it will have "/vmlinuz..." next to it. On that line, remove anything to do with "dri", "modeset", an related. Do not remove anything else. Now add nomodeset and systemd.unit=multi-user.target and press Ctrl + x.

You should boot into a command line now. If not, you can try "recovery mode", too. Failing all else we can chroot from a live, but I'd like to avoid that so let's just assume you now at a TTY. login as root, or sudo su.

Prepare to install the nvidia driver:
apt-get update && apt-get upgrade && apt-get install build-essential linux-headers-amd64
Hopefully there's an nvidia-driver package in your repos as this will take care of all the configs, too.
apt-get install nvidia-driver
If it exists, that's don and dusted. Should work fine after a reboot. No need to read further.

Problems?
If the package wasn't there, jumpt to the next step.
If the package didn't work uninstall it: apt-get purge nvidia-driver && apt-get autoremove

So if you're this far, luck was not on your side. You need to go to Nvidia's site and grab the proprietary driver. I had major issues with the current 550, but I'm on pure Debian, whereas Ubuntu has more proprietary crap in the kernel. I recommend the 535 Driver but it depends on your kernel (my driver is 535.183 and my kernel is 6.10.6). You may try the 550 all the same. The 560 if all fails. I suggest you download all three to save on headaches if one doesn't work. Here are the direct links:

After downloading them, make each executable.
chmod a+x NVIDIA-*
Right, now I hope you installed build-essential and your kernel headers. Anyways run you preferred version. I'm going to use my 535.
./NVIDIA-Linux-x86_64-535.183.01.run
If it moands you're still missing some packages, install them with apt (though all the needed ones should be install with the build-essential meta-package).
  • Say No to 32 bit support (unless you need it, in which case just post that you do and I'll post the extra step -- or whoever's up when I go to bed will).
  • Say Yes to blacklisting other drivers
  • Say Yes to backing up X configs
  • Say You to rebuilding your initramfs
  • ...and Yes to everything else.
When it's done, reboot and start as per normal. If it doesn't work, repeat the steps to log in as root and run
./NVIDIA-Linux-x86_64-535.183.01.run --uninstall
And now try the 550 and 560.

If anything goes wrong, we'll need more info. Post the output of inxi -Fxz and the ouputput of lsmod.
Ganbatte!
 
This most likely is because of the nouveau driver being used, since Ubuntu doesn't have Nvidia's by default. I also have an Nvidia GPU and run KDE Neon, based on 24.04. I installed Nvidia's drivers using this PPA https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa Just add it to your system
Bash:
sudo add-apt-repository ppa:graphics-drivers/ppa
hit enter and type in your password when asked, then update sources, if it doesn't automatically
Bash:
sudo apt update
then run
Bash:
sudo apt install nvidia-driver-560 libnvidia-egl-wayland1
wait for the install process to finish, reboot, and everything should work fine now. You could also do as @Fanboi suggests, but in my experience it just is easier using the PPA.
 
Heyo, thank you very much for your help! I tried @Tolkem's solution because it's quicker, and it worked!
@Fanboi I'm sorry I didn't use your method, you invested quite some time and effort in helping me, I hope you'll forgive me.
@Tolkem, I like your signature, I didn't know about deepl :)
 
Glad you solved it. I tried with Nvidia's package, but always got install errors. Also, by using this PPA, the driver will get future updates, otherwise, if using the one provided by Nvidia, you'd have to remove the current one as well as any leftovers, and install the newer one.
 
@Fanboi I'm sorry I didn't use your method, you invested quite some time and effort in helping me, I hope you'll forgive me.
Nothing to be sorry for: @Tolkem provided a more Ubuntu-idiomatic way, which is best practice for new users. I hoped there'd be an nvidia-driver package in Ubuntu as in Debian, but if not, suggested what I'm familiar with; the manual route, which is a major PITA for most users, as you have to rebuild each kernel upgrade. Glad it worked out.
 
Last edited:

Staff online

Members online


Top