Nvidea Geforce RTX 3060 not detected by ubuntu 21.10

I have been using Ubuntu 21.10 with an Intel integrated GPU.

Today I bought and installed the 3060 and it worked fine in Windows 10. When I tried ubuntu and selected ubuntu from grub it flagged these errors:

[FAILED] Failed to start Detect the available GPUs and deal with any system changes.
[FAILED] Failed to start Light Display Manager.

I did see a mention of Nouveau during the boot.

Cursor blinking, no mouse, no keyboard. Only way out is hard reboot. I am unable to get any information to assist in this post.

I downloaded the Linux driver but cannot install an Nvidea driver because I don’t have any access to the system at all.

Driver: NVIDIA-Linux-x86_64-495.46.run

I have never seen a .run file for Linux previously too.

Can anyone assist

Please boot to recovery mode (hold shift on boot for the grub menu to appear), then run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

You could also try this:
http://migueleonardortiz.com.ar/linux/lightdm-linux/failed-to-start-light-display-manager/1741

Thank you for you prompt attention.
I was able to make the requested file but could not find a way to get it to put here.

I managed to get into ubuntu once and searched for the file. While it was searching I ran the .run driver file which complained that I was running a X server and referred my to the driver download page.

I will try your second link. I never completed the file search as it was taking a long long time)

Don’t use the runfile. In ubuntu desktop, start Software&Drivers application and select the driver version you want.
The upload buttons is in the row of formatting options when you create a post. Horizontal bar with upward arrow.

Yes, I previously tried Software&Drivers application when I ‘accidently’ got back into the system and again it still returned the same errors.

I meant I could not get the file from ubuntu after making it in recovery mode.

From the url you posted I gather that:

Then I moved the old configuration files of lightdm:

mv /var/lib/lightdm/.Xauthority /var/lib/lightdm/.Xauthority_bk
mv /var/lib/lightdm/.dbus/session-bus/ /var/lib/lightdm/.dbus/session-bus_bk/
Then reconfigure and restart the service:

dpkg-reconfigure lightdm
service lightdm restart

Are the relevant parts, am I correct and should I try that?

No rather those:
rm -rf /var/lib/lightdm/.cache/*
rm -rf /var/cache/lightdm/*
dpkg-reconfigure lightdm

The other files are runtime-created so don’t matter.

Can I do that in recovery mode?

Can you tell me how to recover the .sh file while I am in recovery too?

Just open a terminal, run sudo nvidia-bug-report.sh
the nvidia-bug-report.log.gz should then be in your home directory.

Most times I cannot get into the system to use a terminal. I press one or two keys whilst in recovery mode and sometime get to the logon screen.

I did search my home directory after I made the file but it was not found

I removed the two files in /var but reconfigure lightdm and reboot made no difference.

I have uploaded the .sh file.
nvidia-bug-report.log.gz (82.1 KB)

I am sorry but I must sleep now - early start with kids tomorrow but I will be back. Thank you for your help.

Looks like your on-board intel gpu is still active but the driver for the nvidia gpu is missing so I suspect on normal boot, the desktop is running on the intel. You could either connect your monitor to the mainboard or set kernel parameter “nomodeset” to get a desktop without recovery boot. To check the nvidia driver, please post the output of
dkms status

Yes, the on-board intel gpu is still active. Determined by switching the monitor to the main board.

Output of dkms status: nvidia, 470.86 added

Where and when should I added nomodeset? I assume after you confirm the nvidia card driver is correctly installed.

Please try reinstalling the kernel headers by running

sudo apt install linux-headers-$(uname -r)

afterwards, please check dkms status again if the state changed from “added” to “installed”.
Also, please run
sudo prime-select nvidia
to cope with the intel gpu.

makem@makems-TUF:~$ sudo apt install linux-headers-$(uname -r)
Package linux-headers-5.13.0-051300-generic is not available, but is referred to by another package.
E: Package ‘linux-headers-5.13.0-051300-generic’ has no installation candidate

makem@makems-TUF:~$ sudo prime-select nvidia
Info: selecting the nvidia profile
Deleting /lib/modprobe.d/nvidia-runtimepm.conf
Updating the initramfs. Please wait for the operation to complete:
Edit: I swapped the monitor to the nvidia card but it still gave same errors as initially.

In windows 10 device manager I see nvidia geforce RTX 3060 and ‘this device is working properly.’
Intel UHD 750 is also working correctly and can be disabled there.

makem@makems-TUF:~$ sudo apt install linux-headers-$(uname -r)
Package linux-headers-5.13.0-051300-generic is not available, but is referred to by another package.
E: Package ‘linux-headers-5.13.0-051300-generic’ has no installation candidate
makem@makems-TUF:~$
makem@makems-TUF:~$ sudo prime-select nvidia
Info: selecting the nvidia profile
Deleting /lib/modprobe.d/nvidia-runtimepm.conf
Updating the initramfs. Please wait for the operation to complete:

Windows device manager says the nvidia card is working correctly.
The intel gpu can be disabled.

Looks you run an older mainline ppa kernel.
You’d need to manually download and install the kernel headers in order to compile the nvidia driver:
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.13/amd64/linux-headers-5.13.0-051300-generic_5.13.0-051300.202106272333_amd64.deb

Thank you mart. I am running a relatively new kernel (cant look as am in windows atm) from ubuntu mainline.
Also I am following help from generix and at this stage don’t want to change tack.

5.15 is new, so older is correct.

Ok lets try two things here:

  1. read
  2. think logically

generix told you to install the kernel headers.

That failed because apt could not find the package needed.

I told you where to find that package.

Not a change in tactics. Same thing.
You need the kernel headers for the nvidia driver to build!

Sorry but as soon as I saw ‘compile’ I baulked, not knowing how to compile software and not realising it was following generix.
Can you confirm what to do when I have the package?

Edit: I see that the package installer deals with it. and have installed the package.

makem@makems-TUF:~$ dkms status
nvidia, 470.86, 5.13.0-051300-generic, x86_64: installed
makem@makems-TUF:~$

I am not allowed to post any more today