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

 

 

 

Nvidia driver - Debian way, custom (or not) kernel.

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
User avatar
Job
Posts: 813
Joined: 2006-12-30 20:20
Location: no clue
Contact:

Re: Nvidia driver - Debian way, custom (or not) kernel.

#181 Post by Job »

bugsbunny wrote:
Job wrote:In my situation I want to only install nvidia-kernel-dkms and leave behind everything else the package is pulling. I was reading about the "hold" command but I am not certain about its usage.
Is there a straight way to tell aptitude not to install something else coming with a package?
Job
Can you explain exactly what you're hoping to accomplish? nvidia-kernel-dkms by itself, with none of it's dependencies, is worthless and won't really do anything. Generally speaking hard dependencies (as opposed to recommends or suggests) have to get pulled in, otherwise you end up with broken packages.
Right and I ended up breaking my system. Should have waited for your answer. Now I can't get back into my system, I don't have network connection in recovery mode. yahi. I am kicking myself. :oops: I wanted to see if dkms will recognize the nvidia driver already installed. Boy I was wrong....
#aptitude install life
--------------------------------------------------------------------------------------------------------------
Debian 12 - FreeBSD

User avatar
Job
Posts: 813
Joined: 2006-12-30 20:20
Location: no clue
Contact:

Re: Nvidia driver - Debian way, custom (or not) kernel.

#182 Post by Job »

Fixed. I will never mess with that again.
#aptitude install life
--------------------------------------------------------------------------------------------------------------
Debian 12 - FreeBSD

User avatar
tabernakel
Posts: 14
Joined: 2011-03-13 01:32

Re: Nvidia driver - Debian way, custom (or not) kernel.

#183 Post by tabernakel »

I tried both the NVIDIA way, and the source compile way described above, and found both of them troubling. For example, the NVIDIA way didn't recognize my card, immediately making things complicated. On the other hand, the Debian source compile way described above caused one processor core of my dual-core setup to "vanish" when the underlying kernel was recompiled, probably because of some mysterious flag that I should have set and that had (of course) not been mentioned in the HOW-TO. Therefore I cannot advise either of them unless you want to fiddle with (and learn to know) some funny build settings and waste loads of time on stuff you probably never wanted to know.

However, I found a very easy and foolproof way buried in the long NVIDIA HOW-TO of the debian wiki! It should be perfect for anyone who
a) doesn't need a specific NVIDIA driver version - most can probably live very well with the ones provided in the Debian repositories
b) has an aversion of compiling kernel packages whose compile flags and side effects probably noone fully (!) understands
c) doesn't like to play around with runlevels either

If the above is true for you, try this (without quotes):
- "su"
- "aptitude install nvidia-kernel-2.6.32-5-686" (version in package name must match the kernel you're running, check using "uname -a" if unsure)
- "aptitude install nvidia-glx" (neccessary only first time)
- "aptitude install nvidia-xconfig" (neccessary only first time)
- "nvidia-xconfig" (neccessary only first time)
- reboot
- "glxinfo |grep rendering" -> if everything worked, the output should be "direct rendering: Yes"

If you have more than one kernel installed (I grub start the 686 kernel to run the machine, but like to have an additional 486 kernel as an gnome-capable backup if I somehow manage to break the 686 kernel) you need to repeat the steps not marked with "neccessary only first time" after booting the respective kernels. :wink:

morean51
Posts: 12
Joined: 2011-03-07 10:38

Re: Nvidia driver - Debian way, custom (or not) kernel.

#184 Post by morean51 »

i tried only nvidia i was getting problem

User avatar
BenB
Posts: 51
Joined: 2009-12-21 22:36
Location: WV

Re: Nvidia driver - Debian way, custom (or not) kernel.

#185 Post by BenB »

The hardware listing software for gnome as root user gives this output for vga compatible driver.

product: C61 [GeForce 6150SE nForce 430] [10DE:3D0]
vendor: nVidia Corporation [10DE]
bus info: pci@0000:00:0d.0

Which driver version do I then need?

I am looking at http://www.nvidia.com/object/IO_32667.html and can not find a match.
In the confrontation between the stream and the rock, the stream always
wins - not through strength, but through persistence. - Anonymous

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: Nvidia driver - Debian way, custom (or not) kernel.

#186 Post by bugsbunny »

That's a 6 series card, confirmed by GeForce 6 Series - Wikipedia, the free encyclopedia

So you don't need any of the legacy drivers, just use the most recent driver easily available. eg:

Code: Select all

aptitude -r install  nvidia-kernel-dkms nvidia-settings
will get you a valid set of drivers.

User avatar
BenB
Posts: 51
Joined: 2009-12-21 22:36
Location: WV

Re: Nvidia driver - Debian way, custom (or not) kernel.

#187 Post by BenB »

"So you don't need any of the legacy drivers, just use the most recent driver easily available. eg:"

Thanks bugs, yeah got it sorted out about half. Drivers are installed, now. Have edited /etc/X11/xorg.conf to reflect this as well. Yet the machine doesn't want to do 3D rendering, nor allow for Compiz to make all those neat effects. Glgears works though, and it is running well above 20fps. Also lots of the gnome themes have started going pink-ish. Had to edit in gconf a bit too as the title bar of applications seemed to vanish.

It really bothers me that a person can read instructions, follow them to the letter expecting to get good results, then everything goes haywire. Maybe that's part of the reluctance in reading man pages. You can do what they say yet if the computer wants to make toast, no way are you getting it to make oat meal. I'm sure we'll get it figured out. Google is a friend. I saw something about pink-ish themes and gtkrc files on an old ubuntu forum post. Not sure that's my case but it is something.
In the confrontation between the stream and the rock, the stream always
wins - not through strength, but through persistence. - Anonymous

User avatar
Job
Posts: 813
Joined: 2006-12-30 20:20
Location: no clue
Contact:

Re: Nvidia driver - Debian way, custom (or not) kernel.

#188 Post by Job »

This is a very exciting time to be using Debian. Those lines bugsy posted above actually gives you the latest Nvidia driver. If I am not mistaking, as soon as Nvidia kicks out a new version, dkms will give it to you.
How easy is that?

bugsbunny,
I always called bugsbunny bugsy. Love the character along with "Mr. Wabbit". You know who that is. :D
#aptitude install life
--------------------------------------------------------------------------------------------------------------
Debian 12 - FreeBSD

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Re: Nvidia driver - Debian way, custom (or not) kernel.

#189 Post by mzilikazi »

It seems that this howto is woefully out of date but at this time I don't even have any Nvidia hardware. Is there any input on how it should be re-written?
For now I'll just put a link to the Debian wiki
http://wiki.debian.org/NvidiaGraphicsDrivers
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G

User avatar
Job
Posts: 813
Joined: 2006-12-30 20:20
Location: no clue
Contact:

Re: Nvidia driver - Debian way, custom (or not) kernel.

#190 Post by Job »

mzilikazi wrote:It seems that this howto is woefully out of date but at this time I don't even have any Nvidia hardware. Is there any input on how it should be re-written?
For now I'll just put a link to the Debian wiki
http://wiki.debian.org/NvidiaGraphicsDrivers
The best way probably is to remove everything else and leave the line as bugsbunny has it above. That is all it took me to have the latest driver installed. Of course to get all the 3D going you need to have a good xorg.conf going with the options you want because those lines did not create one for me. Luckily, I kept my old xorg.conf file with the options I like. Copying that file to X11 gave me everything I need.
#aptitude install life
--------------------------------------------------------------------------------------------------------------
Debian 12 - FreeBSD

eric1959
Posts: 1298
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: Nvidia driver - Debian way, custom (or not) kernel.

#191 Post by eric1959 »

For 64 bit I would suggest :

Code: Select all

aptitude -r install nvidia-kernel-dkms nvidia-settings libgl1-nvidia-glx-ia32
The following new packages will be installed :

Code: Select all

libgl1-nvidia-alternatives{a} libgl1-nvidia-alternatives-ia32{a} 
libgl1-nvidia-glx{a} libgl1-nvidia-glx-ia32 libglx-nvidia-alternatives{a} 
nvidia-glx{a} nvidia-kernel-common{a} nvidia-kernel-dkms nvidia-settings 
nvidia-vdpau-driver{a}
, 10 newly installed

For the latest drivers ( 64 bit ) :
Add this line to /etc/apt/sources.list :

Code: Select all

deb http://ftp.us.debian.org/debian/ sid main contrib non-free 
or something similar depending on your country...

Code: Select all

aptitude update

Code: Select all

aptitude -r -t unstable install nvidia-kernel-dkms nvidia-settings libgl1-nvidia-glx-ia32
The following new packages will be installed :

Code: Select all

libgl1-nvidia-alternatives{a} libgl1-nvidia-alternatives-ia32{a} 
libgl1-nvidia-glx{a} libgl1-nvidia-glx-ia32 libglx-nvidia-alternatives{a} 
nvidia-common{a} nvidia-glx{a} nvidia-kernel-common{a} nvidia-kernel-dkms 
nvidia-settings nvidia-vdpau-driver{a}
, 11 newly installed

After all this remove the line

Code: Select all

deb http://ftp.us.debian.org/debian/ sid main contrib non-free
from your sources.list...

Replace

Code: Select all

aptitude -r install
with

Code: Select all

apt-get --install-recommends install
if you prefer apt-get...

Correct me if I'm wrong....
Debian Bits And Snips
Squeeze, Gnome, amd64, Intel Core i3-530, Geforce GT330

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: Nvidia driver - Debian way, custom (or not) kernel.

#192 Post by bugsbunny »

You're correct. but instead of adding/removing the unstable repo I'd go with the following:

If you're currently running stable (squeeze):
Create /etc/apt/preferences with the following content:

Code: Select all

Package: *
Pin: release a=unstable,o=Debian
Pin-Priority: 1

Package: nvidia-kernel-dkms nvidia-glx nvidia-settings nvidia-kernel-common nvidia-vdpau-driver libglx-nvidia-alternatives libgl1-nvidia-glx libgl1-nvidia-alternatives nvidia-common libgl1-nvidia-alternatives-ia32 libgl1-nvidia-glx-ia32
Pin: release a=unstable,o=Debian
Pin-Priority: 995
That sets unstable to a default of 1 (same as experimental would be, which means nothing gets installed unless you explicitly ask for it). It also pins all the nvidia packages to unstable so those will update as needed.

If you're currently running testing and you already have unstable in sources then I wouldn't even bother with changing preferences. Assuming you have things st up correctly updates will automatically get pulled from unstable (until that version (or a higher version) drops into testing, at which point the testing repo will take over.
You can, of course, pin to unstable in any case, although due to recent changes the pin is somewhat simpler:

Code: Select all

Package: nvidia* libglx-nvidia* libgl1-nvidia*
Pin: release a=unstable,o=Debian
Pin-Priority: 995
If you don't already have unstable in your repos then you can add it and either set a default release of testing in apt.conf, or simply set unstable to a priority of 100 (testing defaults to 500 so will take precedence) in apt.preferences.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Nvidia driver - Debian way, custom (or not) kernel.

#193 Post by golinux »

bugsbunny wrote:. . . just use the most recent driver easily available. eg:

Code: Select all

aptitude -r install  nvidia-kernel-dkms nvidia-settings
will get you a valid set of drivers.
Thank you for this very easy way to install nVidia GeForce 8400 GS drivers! I did a few days of research and decided this was the way to go. It went off without a hitch. You are my hero!!

Now on to Compiz . . .
May the FORK be with you!

Sergio
Posts: 91
Joined: 2010-11-11 12:27

Re: Nvidia driver - Debian way, custom (or not) kernel.

#194 Post by Sergio »

bugsbunny wrote:If you're currently running stable (squeeze):
Create /etc/apt/preferences with the following content:

Code: Select all

Package: *
Pin: release a=unstable,o=Debian
Pin-Priority: 1

Package: nvidia-kernel-dkms nvidia-glx nvidia-settings nvidia-kernel-common nvidia-vdpau-driver libglx-nvidia-alternatives libgl1-nvidia-glx libgl1-nvidia-alternatives nvidia-common libgl1-nvidia-alternatives-ia32 libgl1-nvidia-glx-ia32
Pin: release a=unstable,o=Debian
Pin-Priority: 995
That sets unstable to a default of 1 (same as experimental would be, which means nothing gets installed unless you explicitly ask for it). It also pins all the nvidia packages to unstable so those will update as needed.
This creates only the config file for aptitude, right?
How do I use aptitude to install nvidia drivers and other stuff? Do I have to use some parameter in aptitude or does this config says automatically that nvidia related packages should be taken from unstable repository?

eric1959
Posts: 1298
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: Nvidia driver - Debian way, custom (or not) kernel.

#195 Post by eric1959 »

Package: nvidia-kernel-dkms nvidia-glx nvidia-settings nvidia-kernel-common nvidia-vdpau-driver libglx-nvidia-alternatives libgl1-nvidia-glx libgl1-nvidia-alternatives nvidia-common libgl1-nvidia-alternatives-ia32 libgl1-nvidia-glx-ia32
Pin: release a=unstable,o=Debian
Pin-Priority: 995
990 < P <=1000
causes a version to be installed even if it does not come from the
target release, unless the installed version is more recent
http://manpages.debian.net/cgi-bin/man. ... &locale=en
Debian Bits And Snips
Squeeze, Gnome, amd64, Intel Core i3-530, Geforce GT330

geazzy
Posts: 27
Joined: 2011-07-02 05:39

Re: Nvidia driver - Debian way, custom (or not) kernel.

#196 Post by geazzy »

Job wrote:Fixed. I will never mess with that again.
:mrgreen:

User avatar
Zix
Posts: 5
Joined: 2011-07-12 08:14
Location: Yellville, Arkansas, USA

Re: Nvidia driver - Debian way, custom (or not) kernel.

#197 Post by Zix »

I found a good 'or not' way that helped me. Its the 'system rescue disk'. I tried a Debian way; I tried my way and I couldn't get on. I tried the system rescue CD I burnt from Distrowatch.com and it got me logged in where I could take out the Nvidia drivers and go back to Nouveau. :D

User avatar
komandan
Posts: 6
Joined: 2012-02-11 13:35

Re: Nvidia driver - Debian way, custom (or not) kernel.

#198 Post by komandan »

helloo :D
nice tutor broo...
this is my 1st posting
nice brooo

User avatar
Linadian
Posts: 490
Joined: 2013-12-20 15:25
Location: In a systemd free distro

Re: Nvidia driver - Debian way, custom (or not) kernel.

#199 Post by Linadian »

It has been pointed out to me that I didn't read the "OP" thoroughly enough, my bad, I am forever shamed and sentenced to 1000 lashes from the Debian elitist gods, roflmfao!
Last edited by Linadian on 2014-01-16 03:22, edited 3 times in total.
Linux Registered User 533946

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: Nvidia driver - Debian way, custom (or not) kernel.

#200 Post by milomak »

it does state in the op that it is outdated
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

Post Reply