Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Disabling Nouveau Kernel Driver without Completely Removing

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
GPWR
Posts: 92
Joined: 2021-11-26 14:57
Has thanked: 12 times
Been thanked: 3 times

Disabling Nouveau Kernel Driver without Completely Removing

#1 Post by GPWR »

I've been looking all around. I've read multiple, multiple solutions to this problem, all addressing relatively specific cases. In most of these cases, people want to deactivate Nouveau because it's incompatible with NVIDIA and they're upgrading their GPU, which is exactly where I'm at. After that, the solution is variable depending on the operating system and multiple other things, and I haven't managed to find something that applies to my case or, at least, works in my case.
This is the driver I want to install. I downloaded it and tried to run it, but I got a message telling me I needed to disable Nouveau first. It suggested to create a few modprobe configuration files here and there for me, telling me that it would potentially fix the problem. So I let it do that and I rebooted. Trying again resulted in this message:
Image
So I proceeded and got the same error as before, telling me that the Nouveau driver is in use by the system and that it should be disabled before proceeding with the installation of my NVIDIA driver.
I've read some advice saying that a line should be added to /boot/grub/grub.cfg. However, I've noticed the following lines in the file:

Code: Select all

#DO NOT EDIT THIS FILE
#
#It is automatically generated by grub-mkconfig using templates
#from /etc/grub.d and settings from /etc/default/grub
I don't want to mess with that until someone who knows more than me gives me advice. As some of you probably already know, I am pretty new to Linux, but eager to learn.
I'm on Debian 11 stable.

P.S. Perhaps a noob question: Will disabling Nouveau cause my system to display weird coloured squares and stripes everywhere, or will I be able to see well enough to install my driver properly and reboot without losing my mind? I would think that doing basic graphics operations would be feasible without a driver, but I just wanted to make sure. I use KDE Plasma, but I can also log in with something lighter like i3 if that should cause problems in the absence of Nouveau.

Merry Christmas to all!

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#2 Post by sunrat »

Sorry, I can't help with nvidia driver from external sources.
In Debian 11 (Bullseye) it is recommended to use the nvidia-driver package from the non-free repo, and also install the firmware-misc-nonfree package. nvidia-driver installation will automatically create a nouveau blacklist file.
See here - https://wiki.debian.org/NvidiaGraphicsD ... ullseye.22
Currently the supported driver is 460.xx but possibly a newer driver may appear in Backports at some stage. I'm using 460.xx here and it works well.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#3 Post by p.H »

GPWR wrote: 2021-12-25 21:39 Trying again resulted in this message:
So I proceeded
What do you mean by "proceed" ? Did you take into account what the message says about the initial ramdisk (actually the initial RAM filesystem) ? If plymouth (splash screen) is installed, nouveau is included in the initramfs and loaded before any config file in the root filesystem can be taken into account. So you need to update the initramfs to include the config file.

Code: Select all

update-initramfs -u
GPWR wrote: 2021-12-25 21:39 I've read some advice saying that a line should be added to /boot/grub/grub.cfg
This is another possible method : edit /etc/default/grub, add "modprobe.blacklist=nouveau" to GRUB_CMDLINE_LINUX value and update grub.cfg with

Code: Select all

update-grub

zwab
Posts: 27
Joined: 2021-08-27 15:41
Been thanked: 3 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#4 Post by zwab »

I agree with sunrat, I see driver ver 460.91.03 in my repos on debian 11 stable, it looks like the driver you linked is for a GT 730 which is compatible with that driver version according to https://www.nvidia.com/download/driverR ... 7149/en-us. I'd recommend following the steps in the wiki he linked above, unless there's a reason you want that particular driver version.

GPWR
Posts: 92
Joined: 2021-11-26 14:57
Has thanked: 12 times
Been thanked: 3 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#5 Post by GPWR »

Thank you for all your useful answers.
I went on with p.H's solution, which seems to be explained in more detail here: How to remove Nouveau kernel driver (fix Nvidia install error)
zwab wrote: 2021-12-27 21:06 I'd recommend following the steps in the wiki he linked above, unless there's a reason you want that particular driver version.
There are two main reasons I'm not using the drivers from the non-free Debian repo. Firstly, I'm using this issue as an opportunity to learn a little more about Linux, so I'd like to disable the Nouveau driver manually (which I did) and, secondly, I feel like using the manufacturer's official driver which was designed specifically for my GPU model is more reliable (perhaps I am wrong?) But I guess sunrat's suggestion would probably be ideal for someone who just wants to get things done.

Anyhow, I followed p.H's advice, and everything works fine but one little thing...

The GRUB interface is in huge type. It's not a major issue, but it's just annoying. Additionally, having more lines to view on the screen makes it easier to diagnose potential issues. Having huge type makes it more difficult to see what's happening. But once I'm in SDDM, everything is back to normal. Is there a way to fix this? It seems as if this is caused by the fact that the NVIDIA display driver starts after GRUB, which I guess is quite natural.

P.S. For those whom this could help in the future, you can't start SDDM without a display driver (as far as I know, at least.) In other words, once Nouveau is disabled, you can't use SDDM to log in. You should rather boot Debian in recovery mode (via the advanced Linux options in GRUB.) From there you can install your NVIDIA driver from your downloaded file and then reboot in normal mode. SDDM should work fine then, in absence of other issues.

Happy holidays to all, and thank you again for your kind help.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#6 Post by p.H »

GPWR wrote: 2021-12-30 15:43 The GRUB interface is in huge type
What do you mean exactly ?

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#7 Post by sunrat »

GPWR wrote: 2021-12-30 15:43There are two main reasons I'm not using the drivers from the non-free Debian repo. Firstly, I'm using this issue as an opportunity to learn a little more about Linux, so I'd like to disable the Nouveau driver manually (which I did) and, secondly, I feel like using the manufacturer's official driver which was designed specifically for my GPU model is more reliable (perhaps I am wrong?)
The nvidia-driver package provides the manufacturer's official driver. That's why it's in non-free.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

GPWR
Posts: 92
Joined: 2021-11-26 14:57
Has thanked: 12 times
Been thanked: 3 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#8 Post by GPWR »

p.H wrote: 2021-12-30 16:54
GPWR wrote: 2021-12-30 15:43 The GRUB interface is in huge type
What do you mean exactly ?
Thank you for taking interest in my issue. Normally the font size of the GRUB interface is much smaller than it is now. When I boot my system, there's normally boot information displayed, such as what operations were successful or not. Excuse me for perhaps not using the correct terminology/nomenclature. Don't hesitate in asking for farther specifications.
sunrat wrote: 2021-12-30 19:41 The nvidia-driver package provides the manufacturer's official driver. That's why it's in non-free.
Thank you so much for this information. I was aware that non-free packages were provided by the manufacturers, but what I was wondering is what the difference between that driver and the one I linked in my above post is. I thought the driver I linked was designed to work solely with my specific GPU, but now I see that it actually works with a range of products, just like the driver from the non-free repo.
Now my question is why the driver on the official Zotac page is not the same as the driver available via the non-free repo.

Cheers.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#9 Post by p.H »

GPWR wrote: 2022-01-04 16:43 Normally the font size of the GRUB interface is much smaller than it is now.
If you mean the GRUB menu, then it has nothing to do with nouveau or nvidia drivers. GRUB does not use Linux drivers.
GPWR wrote: 2022-01-04 16:43 When I boot my system, there's normally boot information displayed
If you mean anything displayed after GRUB has booted the selected kernel (kernel, initramfs or init messages), then it has nothing to do with GRUB unless you messed with GRUB_GFXPAYLOAD_LINUX in /etc/default/grub.

GPWR
Posts: 92
Joined: 2021-11-26 14:57
Has thanked: 12 times
Been thanked: 3 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#10 Post by GPWR »

p.H wrote: 2022-01-04 21:44 If you mean anything displayed after GRUB has booted the selected kernel (kernel, initramfs or init messages), then it has nothing to do with GRUB unless you messed with GRUB_GFXPAYLOAD_LINUX in /etc/default/grub.
Excuse me for answering so late...

I don't know what GRUB_GFXPAYLOAD_LINUX is, so it's very unlikely that I should have altered it. Considering your description of what is GRUB and what is not, I can now tell you that it's both GRUB and everything that comes after it until I actually see SDDM's graphical interface. It's quite annoying given the fact that I'm experiencing problems with my system (off-topic here) and I can only see half the text I would normally see on my screen without having to scroll up and down as much, given that it's twice as big now.

Also, if this is of interest, my computer's first boot screen, which is basically just the HP logo with options to hit this or that key to enter the BIOS or boot settings, has a black frame all around it since I installed my GPU as well. It's something I really don't care about, but maybe it might shed a bit of light on what is happening(?)

Thank you again for helping me out with this. It's very much appreciated.

Cheers.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#11 Post by p.H »

At the GRUB menu, can you press "c" to launch grub shell, type "videoinfo" and report the offered resolutions ?

GPWR
Posts: 92
Joined: 2021-11-26 14:57
Has thanked: 12 times
Been thanked: 3 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#12 Post by GPWR »

Yes, here you go. I think my monitor is a Lenovo Thinkvision LT2452P (24").

Code: Select all

	0x105	1024	x	768	x	8	(1024)	Paletted
	0x106	1280	x	1024	x	4	( 160)	Paletted Planar
	0x107	1280	x	1024	x	8	(1280)	Paletted
	0x10e	320	x	200	x	16	( 640)	Direct Color, mask: 5/6/5/0 pos:11/5/0/0
	0x10f	320	x	200	x	32	(1280)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x111	640	x	480	x	16	(1280)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
*	0x112	640	x	480	x	32	(2560)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x114	800	x	600	x	16	(1600)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
	0x115	800	x	600	x	32	(3200)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x117	1024	x	768	x	16	(2048)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
	0x118	1024	x	768	x	32	(4096)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x11a	1280	x	1024	x	16	(2560)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
	0x11b	1280	x	1024	x	32	(5120)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x130	320	x	200	x	8	( 320)	Paletted
	0x131	320	x	400	x	8	( 320)	Paletted
	0x132	320	x	400	x	16	( 640)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
	0x133	320	x	400	x	32	(1280)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x134	320	x	240	x	8	( 320)	Paletted
	0x135	320	x	240	x	16	( 640)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
	0x136	320	x	240	x	32	(1280)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x13d	640	x	400	x	16	(1280)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
	0x13e	640	x	400	x	32	(2560)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
	0x145	1600	x	1200	x	8	(1600)	Paletted
	0x146	1600	x	1200	x	16	(3200)	Direct Color, mask: 5/6/5/0 pos: 11/5/0/0
	0x14a	1600	x	1200	x	32	(6400)	Direct Color, mask: 8/8/8/8 pos: 16/8/0/24
Adapter `VGA Video Driver' :
	No info available
grub>
Here's an image, in case that would be easier to read:
Image

Peace.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#13 Post by p.H »

You can try to set any of these resolutions in GRUB_GFXPAYLOAD_LINUX in /etc/default/grub, e.g.

Code: Select all

GRUB_GFXPAYLOAD_LINUX=1024x768
and run update-grub.

GPWR
Posts: 92
Joined: 2021-11-26 14:57
Has thanked: 12 times
Been thanked: 3 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#14 Post by GPWR »

p.H wrote: 2022-01-21 22:05 You can try to set any of these resolutions in GRUB_GFXPAYLOAD_LINUX in /etc/default/grub, e.g.

Code: Select all

GRUB_GFXPAYLOAD_LINUX=1024x768
and run update-grub.
We're getting somewhere!

My GRUB is still Big Mac format, but after that, when I enter the Linux terminal, everything comes back to normal, which was not initially the case. The setting you suggested seems to have applied to Linux rather than GRUB, which is odd, since it's a GRUB setting. Do you know why this is happening?

Thank you so much again for your help. It's very much appreciated. Cheers.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#15 Post by p.H »

It is a setting passed to the Linux kernel by GRUB, just like parameters in the kernel command line.
You can also set the resolution for GRUB with GRUB_GFXMODE. Beware that a wrong resolution may disable GRUB display or even hang GRUB.

From the output of vbeinfo it seems that GRUB selects 640x480 by default. I don't know why. And either the Linux kernel keeps it or switches to VGA text mode 80x25 (which is the default until a framebuffer driver is loaded and takes over - but maybe nvidia drivers do not include a framebuffer driver).

GPWR
Posts: 92
Joined: 2021-11-26 14:57
Has thanked: 12 times
Been thanked: 3 times

Re: Disabling Nouveau Kernel Driver without Completely Removing

#16 Post by GPWR »

p.H wrote: 2022-01-23 08:02 It is a setting passed to the Linux kernel by GRUB, just like parameters in the kernel command line.
You can also set the resolution for GRUB with GRUB_GFXMODE. Beware that a wrong resolution may disable GRUB display or even hang GRUB.

From the output of vbeinfo it seems that GRUB selects 640x480 by default. I don't know why. And either the Linux kernel keeps it or switches to VGA text mode 80x25 (which is the default until a framebuffer driver is loaded and takes over - but maybe nvidia drivers do not include a framebuffer driver).
Silly me; GRUB_GFXPAYLOAD_LINUX is obviously a Linux setting!

Thank you so much! My GRUB interface is now also normal size! Your help is extremely appreciated.

Cheers, and God bless you.

Post Reply