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

Share your own howto's etc. Not for support questions!

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

Postby Job » 2011-03-12 19:57

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
--------------------------------------------------------------------------------------------------------------
Stretch - Devuan - Jessie (Media Center, yes, believe it)
User avatar
Job
 
Posts: 751
Joined: 2006-12-30 20:20
Location: no clue

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

Postby Job » 2011-03-12 21:02

Fixed. I will never mess with that again.
#aptitude install life
--------------------------------------------------------------------------------------------------------------
Stretch - Devuan - Jessie (Media Center, yes, believe it)
User avatar
Job
 
Posts: 751
Joined: 2006-12-30 20:20
Location: no clue

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

Postby tabernakel » 2011-03-20 18:41

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:
User avatar
tabernakel
 
Posts: 14
Joined: 2011-03-13 01:32

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

Postby morean51 » 2011-03-21 10:59

i tried only nvidia i was getting problem
morean51
 
Posts: 12
Joined: 2011-03-07 10:38

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

Postby BenB » 2011-03-26 19:01

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
BenB
 
Posts: 51
Joined: 2009-12-21 22:36
Location: WV

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

Postby bugsbunny » 2011-03-27 03:44

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
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

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

Postby BenB » 2011-03-27 09:42

"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
BenB
 
Posts: 51
Joined: 2009-12-21 22:36
Location: WV

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

Postby Job » 2011-03-29 15:13

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
--------------------------------------------------------------------------------------------------------------
Stretch - Devuan - Jessie (Media Center, yes, believe it)
User avatar
Job
 
Posts: 751
Joined: 2006-12-30 20:20
Location: no clue

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

Postby mzilikazi » 2011-03-29 19:31

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
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

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

Postby Job » 2011-03-30 17:17

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
--------------------------------------------------------------------------------------------------------------
Stretch - Devuan - Jessie (Media Center, yes, believe it)
User avatar
Job
 
Posts: 751
Joined: 2006-12-30 20:20
Location: no clue

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

Postby eric1959 » 2011-05-05 08:34

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
eric1959
 
Posts: 1299
Joined: 2008-12-15 13:17
Location: Amsterdam

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

Postby bugsbunny » 2011-05-05 17:30

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
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

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

Postby golinux » 2011-05-27 02:50

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!
User avatar
golinux
 
Posts: 1196
Joined: 2010-12-09 00:56
Location: not a 'buntard!

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

Postby Sergio » 2011-05-27 10:21

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?
Sergio
 
Posts: 92
Joined: 2010-11-11 12:27

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

Postby eric1959 » 2011-05-27 12:47

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
eric1959
 
Posts: 1299
Joined: 2008-12-15 13:17
Location: Amsterdam

PreviousNext

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable