Link to home
Start Free TrialLog in
Avatar of Mario Zio
Mario ZioFlag for Italy

asked on

how to remove really the nvidia driver from debian 10

Hello to everyone,

I'm trying to remove the nvidia driver from my system (running with debian 10). I tried several methods,but unsuccesfully. Something like these :

-) apt remove nvidia-driver
-) apt-get purge nvidia-driver

after that,when I reboot the PC,debian 10 restarts and I see this :

mario@DESKTOP-N9UN2H3:/home/mariozio# lspci -nnk -d 10de:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] [10de:1e04] (rev a1)
      Subsystem: ZOTAC International (MCO) Ltd. TU102 [GeForce RTX 2080 Ti] [19da:2503]
      Kernel driver in use: nvidia
      Kernel modules: nvidia

what to do ?
Avatar of Dr. Klahn
Dr. Klahn

If the driver is built into the kernel, and it appears that this is the case, it can not be removed as such.  There are two paths available:

a) The proper solution.  Build a new, custom kernel without the nvidia driver.

b) Blacklist the nvidia module to prevent loading during boot.
lspci looks at hardware, not drivers.

Well only cursory driver explanation, mainly hardware reports.

You'll have to remove the physical graphics card to remove the lspci listing.

If you try removing a driver when the only graphics card is nvidia, your Kernel/Distro may implement a fallback scheme to ensure some default, generic Nvidia driver is always loaded, to ensure some access to the card.

Pull the card first, then likely the driver won't load anymore.
Avatar of Mario Zio

ASKER

I can't remove the nvidia card phisically,because I'm trying to make a passthrough. I want to isolate the nvidia card and I want to assign it to a windows VM and the secondary graphic card that I have (embedded with the MOBO) will be assigned to linux.
You gave to check whether the PCI-e port in which the nvidia card is plugged in did not cancel out the built-in.

From your lspci output, the move presents the addon card as the sole graphics output.....

You have to see whether moving the card to another port that does not conflict with the builtin mobo graphics.

Not addressing whether what you are contemplating might be possible.

Are you trying to have a Windows VM with multiple monitors?
monitor A = windows ,= nvidia ; minotir b = linux = intel graphic
IN the current configuration, do you have both monitors on?
You can place the VM and have it use a single monitor in full screen mode positioned to use the monitor connected to nvidia
Your main issue is more to do with the iinput devices, mouse/keyboard rather than the monitor.

Much depends on your intentions, I think your concentration on the monitor/graphics separation might be unnecessary.
I think I covered the likely issue.

Commonky, the presence of a graphics card in the first pcie slot disables the on board graphics controller.
Unless and until the running of the lspci reflects both Intel and nvidia  the Intel is shutoff by mb.

Move the graphics card to another available port.

Before you try anything with Debian, you have to make sure both graphics resources are presented by the motherboard, bios to the OS.

In your current configuration, the add-on card cancels out the Intel/built-in.

What gets displayed on your monitor B during bootup?
nothing. it is always off. Instead,it works under Windows,because I have enabled the intel graphic chipset from the BIOS. I think that Debian should be configured in a certain way to enable it. I suspect that if I move the nvidia card in another slot,the situation will be the same.
The comment about another slot us not correct, commonly the motherboards with built-in graphics tie in one PCI-e port that cancels out the builtin graphics module.

if you want to mimic on the Debian as us on the Windows, you are looking at the wrong card. Look at getting Intel chipset drivers added to Debian.
Note that the nvidia card is being presented to Debian as the primary card.

I am not sure whether a passthrough is even needed for the graphics.
A passthrough will likely be needed only on the two USB ports to which the mouse/keyboard for the Windows VM such that keystrokes there fo not interfere with the Debian system.
I suspect that the kernel that I'm using (4.19 on debian 10 buster) does not support the intel GPU. Let's give a look :

"lspci -k"


00:02.0 Display controller: Intel Corporation Device 3e98 (rev 02)
Subsystem: Gigabyte Technology Co., Ltd Device d000

it seems that there are no module associated. what to do now ?
That is not possible, there are two ways kernel level builtin modules and addon drivers loaded after ..

lspci | egrep -i '(intel|nvidia)'

Do you have both as presented to Debian.
If both are reflected, then you would need to use the graphical side and modprobe to load both graphics modules/drivers to activate both resources. Not sure whether Intel in addition to drivers for Linux has a toolset for Linux to handle multi monitor activation.


As noted earlier, I am unclear what you are trying to accomplish.
Linux DESKTOP-N9UN2H3 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux

mario@DESKTOP-N9UN2H3:/home/mariozio#  lspci | egrep -i '(intel|nvidia)'

00:00.0 Host bridge: Intel Corporation 8th Gen Core 8-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S] (rev 0d)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 0d)
00:02.0 Display controller: Intel Corporation Device 3e98 (rev 02)
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1f.0 ISA bridge: Intel Corporation Z390 Chipset LPC/eSPI Controller (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU102 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU102 USB 3.1 Controller (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU102 UCSI Controller (rev a1)
yeah,both are presented. I want to use the intel driver in debian as host os and I want to use the nvidia card inside a VM with windows with vfio.
Ok, both are presented. Which desktop graphic environment are you using?
One thing you could try during boot get into the bios and switch the graphical association from PCI to the other option which will prefer the built-in graphics.

That should change the behavior during boot to have output pushed out of monitor B.
Then you can look at retagging monitor A through nvidia ....... To the VM.
You do not have the driver. Vga comoatible means the graphic card is seen as a regular vga comoatible card. All cards are.

If your issue is with xorg, it will be solved in thd config file quite easily
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.