linux-surface / linux-surface

Linux Kernel for Surface Devices
5.16k stars 217 forks source link

Surface Laptop Studio - NVIDIA GPU 3050ti, not being use from the system. #946

Closed Special-Niewbie closed 2 years ago

Special-Niewbie commented 2 years ago

SYSTEM

Hi everyone,

on my Surface Laptop Studio I have everything installed correctly, but it seems that the Nvidia Video card is not being used by the system. The card is recognized by the system but is not used, naively I went to see the additional drivers section for the system, and by default the system was using the NVIDIA GPU drivers xserver-xorg-video-nouveau .

I did the NVIDIA driver switch (which the system gives me available) to use my Nvidia 3050ti, I tried 2/3 drivers from Nvidia list and the system looks like it doesn't use the 3050ti GPU but always uses the Intel GPU.

Even in the "NVIDIA X server settings" software, I don't see the settings listed of my card, below the pic:

Schermata del 2022-09-30 20-08-15

Schermata del 2022-09-30 20-08-37

Schermata del 2022-09-30 20-13-34

Where I mistake?

qzed commented 2 years ago

Can you try lspci -k | grep -A 2 -i "nvidia"? The dGPU usually isn't marked as "VGA compatible".

Special-Niewbie commented 2 years ago

Hi @qzed , yes the resaults it's as below:

Schermata del 2022-10-01 10-41-30

So, seems the system it's using it right? In this case why the NVIDIA X Server setting it doesn't show anything?

NP-chaonay commented 2 years ago

Hi @qzed , yes the resaults it's as below:

Schermata del 2022-10-01 10-41-30

So, seems the system it's using it right? In this case why the NVIDIA X Server setting it doesn't show anything?

what is current driver selection now? in software setting.

is it a nvidia, if yes then installing nvidia-prime and switching nvidia-prime to nvidia for testing on X11

Special-Niewbie commented 2 years ago

Hi @NP-chaonay ,

it's really strange the situation seems that the GPU it's there , but the drivers that are you going to install in the system the GPU will not get any benefit of it and will not be used from the own system. I try to explain with the pics, which test I did till now:

-After I check if nvidia-prime was installed , and it's installed, even if it doesn't give me any possibility to use it. Here it's the Pic: Schermata del 2022-10-01 16-03-26

But even with the Forced Switching from Prime, it doesn't change the result no where, the GPU seems not be used and into the NVIDIA X Server Setting app it doesn't show anything as the Above Pic.

After that, because I use Conky Widgets I have one Widget that should get me any info from the Discrete GPU (NVIDIA), and this widget it takes the info into the folder address example like that " /proc/driver/nvidia/gpus/0000:01:00.0/information " , but into this address folder there is nothing related to the NVIDIA driver that should be downloaded and installed into it (as per another my system with NVIDIA Card). This is the Pic: Schermata del 2022-10-01 15-57-20

Really, what can be here? Any ideas?

qzed commented 2 years ago

Can you make sure that you have the nvidia-dkms package installed? For "custom" kernels, you need the DKMS version of the driver.

qzed commented 2 years ago

You also might want to blacklist the nouveau driver, i.e. put

blacklist nouveau

in /etc/modprobe.d/dgpu.conf.

Special-Niewbie commented 2 years ago

Can you make sure that you have the nvidia-dkms package installed? For "custom" kernels, you need the DKMS version of the driver.

Well, i didn't install it, I installed only the normal DKMS.....I feel noob now :) . Should I install NVIDIA DKMS also? I need to install some other DKMS?

qzed commented 2 years ago

Yes, install that. Also make sure that it installs correctly and doesn't print any warnings/errors. There also has been a report on the driver not working on 5.19.10 (https://github.com/linux-surface/linux-surface/issues/936). In that case you could try an earlier kernel version.

Whether you need other DKMS drivers depends on what external kernel drivers you need, e.g., if you want ZFS, you'll need the DKMS driver for that.

Special-Niewbie commented 2 years ago

Yes, install that. Also make sure that it installs correctly and doesn't print any warnings/errors. There also has been a report on the driver not working on 5.19.10 (#936). In that case you could try an earlier kernel version.

Whether you need other DKMS drivers depends on what external kernel drivers you need, e.g., if you want ZFS, you'll need the DKMS driver for that.

YESSSSS, it works now. I have installed the latest nvidia-dkms-515 and seems with the latest card 3050ti and the Kernel 5.19.10 it doesn't give me any error except the classic missing firmware....module i915 ; so, as per another user on the topic (https://github.com/linux-surface/linux-surface/issues/936) from my side everything it installed correctly seems. Here it's the result of the Terminal:

DKMS nvidia.txt

Here below are the picture with the extra staff installed, and on NVIDIA X Server Setting app it appear only the Voice of PRIME (not sure if should be like that the menu or as normal should be the rest of the Menu Voices) Schermata del 2022-10-01 21-12-57

Schermata del 2022-10-01 21-13-16

Schermata del 2022-10-01 21-12-35

qzed commented 2 years ago

I'm unfortunately not that familiar on how to properly set up prime and make that work, but one of the easiest ways to check that the driver is working is by running nvidia-smi. If the driver works, that should give you some stats about the GPU.

Special-Niewbie commented 2 years ago

I will try around, and after if i have some news I will post here and then close the topic as solved. Thank you so much!

Special-Niewbie commented 2 years ago

SOLVED!!!!

I started to test other NVIDIA DKMS drivers and I started to have the error as @qzed told me, related to the bbswitch-dkms. So, in the end I solved in this way, with PRIME by Terminal I switched to use the INTEL GPU after that I have used the sudo apt-get purge to delete any NVIDIA drivers and system settings installed in the system. I help my self by using apt search function (even the Nouveau Drivers).

After that, I reboot the System, and then by Terminal I have installed again the Nouveau Drivers that was installed previously with the system (not necessary but just in case). From the NVIDIA list drivers of the system that gives me available, I switched from Nouveau to the normal 515 drivers and check if NVIDIA X Server Setting app take out the PRIME Option (as before start to purge all the NVIDIA drivers I cannot take out the PRIME VOICE from the menu); so and then continue with Terminal to install the NVIDIA DKMS 515 drivers.

Then, open NVIDIA X Server Setting and with the voice PRIME appeared again , I switched to use the NVIDIA CARD (instead of INTEL), ask me to reboot the system, and on next reboot BOOM everything it's working now as the Pic below: Schermata del 2022-10-01 22-30-13

The problems are, if you have installed previously some NVIDIA drivers and you upgrade the Kernel or to other new Drivers; the system files from the previous Drivers installations could create the conflicts if you don't delete completely them.

Thank you so much @qzed and @NP-chaonay for the support!!!

I continue to test around and let you know with new topics if I have something else to fix...