After installing any 5xx version of Nvidia drivers Ubuntu 22.04 freezes with a gray screen during booting.
I tested multiple versions - at least 520,530 and 535 on a fresh install.
I also tried Ubuntu 23.04 where the installation can be made only with the safe graphics option or the screen will freeze. It had the same behavior as 22.04 once Nvidia drivers were installed.
I also tried Pop OS where the installer froze and CentOS Stream 9 which installed and froze with gray screen at boot after installing the drivers.
I attached the diagnose information after booting in recovery mode.
The last time I used Ubuntu was a few months ago when the drivers were around 460 and didn’t have this problem. The computer is working without any issues in Windows.
I had this problem with nvidia drivers for years. Try blacklisting nuoveau in the kernel params. Smash esc during boot(after POST) and if you are in grub press e. Add this line: GRUB_CMDLINE_LINUX_DEFAULT="nouveau.modeset=0"
Try to see if it works.
I’m very sorry I gave bad advice. I basically mixed up editing the grub file with editing in the bootloader.
After pressing e add to the parameter to the end of the line what starts with linux, usually looks like this(your screen is cutoff): linux /boot/vmlinuz-5-19... root=UUID=XXXX rw and add nouveau.modeset=0
Or if you can boot into safe mode, you can edit the /etc/default/grub where you will find the line starting with GRUB_CMDLINE_LINUX_DEFAULT
I went again through the bug report which gave me an idea.
The video card is using 2 of the HDMI ports and is connect to display + TV. The logs mentioned it chose a 'default" display. I removed the cable connecting to TV, leaving only the one for the display, and it booted.
Now the question is how do I force the driver to start with a particular display?
Thats great you have a lead. I figured it would boot on the connected display by default. Never thought that such a trivial problem can cause this, on a “supported” distro like ubuntu.
Have you tried using all the ports once? Maybe there is something that confuses the driver when multiple displays are connected instead of one during boot.
I don’t have 4 displays to use all the ports at once :D
Two are common for a development machine and it still doesn’t work with more than one.
If I boot with 2 and get to the screen where it stops it’s enough to remove one of the cables and the boot process completes.
I tried by connecting the second one after booting and set the display mode to “single display” with default being the one I want to use. There was no change and it failed to boot after restart
Maybe it works with 2 displays but not when you have one display one TV.
My Xorg configuration is in /etc/X11/xorg.conf and very similar with yours.
I found a solution that seems to work.
I launched nvidia-settings from terminal, disabled the TV and tried to save to the X configuration file. That was completely broken by failing to merge the new configuration with the existing one. There is a show preview option from where I exported the configuration and manually appended to the existing one.
The reboot is now working and the setting to disable the TV was lost. It’s all looking good.