Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 03-12-07, 12:31 PM   #1
Thoreau
Registered User
 
Join Date: Dec 2002
Posts: 95
Default Request for the Linux Dev Driver folks: module auto-comp

The Nvidia driver just works, as we all know. And for the proprietary, that's pretty damn good. ATI can't come close in LinuxLand. But there is one final step for Nvidia to take. One thing that I have only seen HP do in the proprietary driver market.

HP's new Proliant Service Pack, 7.70 for linux, has a userland shim that checks at boot to see if it's kernel modules are loaded- aka if the kernel version has changed. It then recompiles/reinserts the modules into the currently running kernels /usr/lib/modules, etc. I had never seen this done before with proprietary drivers, but I thought it was very cool. Until you properly uninstall the PSP, it will keep checking at boot and recompiling itself for the running kernel.

The script they use to do this seems fairly simple, and it's freely available, so I was wondering if Nvidia might have a look at what can be done with their driver. I think their Linux driver is pretty much neck and neck with their windows one, if not beyond it in some cases, but this one last mile would make a huge difference.

Recompiling proprietary drivers between kernel versions is what makes proprietary drivers suck for the user. This would be a big boon for Nvidia and make it irritation and/or dumbass proof. Just a thought.

I know you will have to investigate this, and I'll post whatever information you need. You folks more than likely use HP servers, but who knows. Thank you.
Thoreau is offline   Reply With Quote
Old 03-12-07, 01:00 PM   #2
Dr. Tyrell
Registered User
 
Dr. Tyrell's Avatar
 
Join Date: Aug 2004
Posts: 100
Default Re: Request for the Linux Dev Driver folks: module auto-comp

dkms
__________________
P7811-FX | Nvidia 9800M GTS 512MB DDR3 | 17" 1920x1200 | Centrino2 P8400 | 4GB DDR3 | 2x320Gb 7200RPM RAID 0 | DVD+-/DL
Dr. Tyrell is offline   Reply With Quote
Old 03-12-07, 01:44 PM   #3
energyman76b
Registered User
 
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,104
Default Re: Request for the Linux Dev Driver folks: module auto-comp

IMHO, that 'recompile the driver module' stuff is something the distris should do.

Oh wait, some already do that! Like gentoo...

But, how many 'dumbass' users compile their own kernels? And why does anybody want another second of boot time, if he only updates the kernel every couple of month?
energyman76b is offline   Reply With Quote
Old 03-12-07, 07:42 PM   #4
macemoneta
Registered User
 
macemoneta's Avatar
 
Join Date: Oct 2002
Location: NJ
Posts: 159
Default Re: Request for the Linux Dev Driver folks: module auto-comp

It's easy to do this yourself. Just something like this to your /etc/rc.d/rc.local:

Code:
# Get the current kernel release
CURRENT=`/bin/uname -r`

# Get the previous kernel release
if [ -f /var/log/newkernel.last ]
then
   PREVIOUS=`/bin/cat /var/log/newkernel.last`
else
   PREVIOUS=""
fi

# Has the kernel release changed?
if [ "$CURRENT" != "$PREVIOUS" ]
then

   #--------------------------------
   # Are we running an older kernel?
   #--------------------------------
   if [[ "$CURRENT" < "$PREVIOUS" ]]
   then
      echo
      echo "--------------------------------"
      echo "Kernel version has changed:"
      echo "   Current:  $CURRENT"
      echo "   Previous: $PREVIOUS"
      echo
      echo "Ignoring return to older kernel"
      echo "--------------------------------"
      exit
   fi

   #-----------------------------------------------------
   # At this point, we know we are running a newer kernel
   #-----------------------------------------------------
   echo
   echo "--------------------------------"
   echo "Kernel version has changed:"
   echo "   Current:  $CURRENT"
   echo "   Previous: $PREVIOUS"
   echo
   echo "Rebuilding kernel drivers"
   echo "--------------------------------"

   #------------------------
   # Build the nVidia driver
   #------------------------
   echo
   echo "-----------------------------------"
   echo "Rebuilding the nVidia kernel driver"
   echo "-----------------------------------"
   echo
   /bin/sh /usr/local/src/NVIDIA-Linux-x86_64-1.0-9631-pkg2.run -s

   #--------------------------------
   # Remember the new kernel version
   #--------------------------------
   echo "$CURRENT" > /var/log/newkernel.last

else

   echo
   echo "---------------------------"
   echo "No change in kernel version"
   echo "---------------------------"
   echo

fi
Obviously, you'll need to change where you keep the driver.
macemoneta is offline   Reply With Quote
Old 03-12-07, 09:51 PM   #5
JaXXoN
Registered User
 
Join Date: Jul 2005
Location: Munich
Posts: 910
Default Re: Request for the Linux Dev Driver folks: module auto-comp

Such a feature would be in deed helpfull, but as already pointed out,
this should better be taken into account by the distributors - i for one
actually wouldn't like the nvidia-installer trying (and potentialy
failing) to mess around with my startup scripts :-)


A much better solution would actually be to further abstract the
driver in the following way: a generic GPLed kernel module

1. redirect interrupts into user space
2. maps PCI registers and PCI memory to user space
3. maps DMA capable memory to user space
4. provides in ioctl() that allows to ask for the physical addresses for
allocated DMA pages mapped in virtual memory.

This scheme would allow a hardware vendor to implement the
driver completly in user space - no need to bother around with
the kernel any more ...


BTW.: 1&2 has already been implemented:

http://lwn.net/Articles/198202/

3&4 shouldn't be all that hard *g*

regards

Bernhard
JaXXoN is offline   Reply With Quote
Old 03-12-07, 10:24 PM   #6
Thoreau
Registered User
 
Join Date: Dec 2002
Posts: 95
Default Re: Request for the Linux Dev Driver folks: module auto-comp

Thank you guys. Very good insight. It's good to know that we are half way into user space, but bad to know that it's not there yet. Thanks for the simple script Masemo, I appreciate it.

While distro's should be setting the boot scripts for their own userland, this is proprietary software. If you are going to taint the kernel, what is reinstalling when the kernel gets upgraded going to do worse than the present system?

I suppose it's precautionary because who knows how a new kernel will interact with this proprietary, and possibly hard freezing module.

But I'm just saying, it would be nice to be given an option by the driver itself. Just like it was nice when 3dfx had a 3d capable module. You didn't need it- but it made gaming suck less.

People can be idiots and patch their kernel. It's not exclusive to the intelligent since package management was invented. I 'm saying it would be one less "Oh Man Grandma Can't See The Screen" after an automagical kernel update.

I don't see the harm in going all the way- since you stuck it half way inside in the first place. Somebody here is kidding themselves, and it ain't me. Either you have a proprietary- it's gonna blow my **** to hell- drivers, or you don't. And you do.

So like MS says, you'll either update to Vista or buy it outright. But the end result is the same. You ain't got no choice, so you might as well make it suck less. That's my point. If this were a GPL discussion where we had a clue and could test it, that would be another matter. In any case, thank you for the tips. I'm glad you all have disparate opinions. Not boring at all.
Thoreau is offline   Reply With Quote
Old 03-13-07, 05:26 AM   #7
energyman76b
Registered User
 
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,104
Default Re: Request for the Linux Dev Driver folks: module auto-comp

there is a bazillion linux distributions out there.

And ca bazillion/2 ways to boot.

You CAN NOT make a single 'modules autobuild' script that works everywhere. You can not even make one working on all the major distris.

So if someone is able to make such a script, it is the distribution. They know, how they boot, which init they use, the structure of their init-scripts and where such a function would fit. And they are the only one who know that. Nobody else.

That said. How many times does someone installs a new kernel and needs to reinstall the driver? And how hard is it to log in as root and let the installer run? Restarting X afterwards?
energyman76b is offline   Reply With Quote
Old 03-13-07, 11:07 AM   #8
macemoneta
Registered User
 
macemoneta's Avatar
 
Join Date: Oct 2002
Location: NJ
Posts: 159
Default Re: Request for the Linux Dev Driver folks: module auto-comp

Quote:
Originally Posted by energyman76b
That said. How many times does someone installs a new kernel and needs to reinstall the driver? And how hard is it to log in as root and let the installer run? Restarting X afterwards?
You must reinstall the driver every time you install a new kernel. For some leading edge distributions, that could be monthly.

It can be very hard to login as root and stop X and run the installer. You are thinking like the person that owns a desktop, not like the person that remotely admins 4000 machines.

The only solution at this point for a corporate environment is Intel graphics, since no such shenanigans are required. In some environments, such as modeling and heavy graphics, Nvidia would be a better choice for performance reasons. We'd just like the option of choosing a second vendor.
macemoneta is offline   Reply With Quote

Old 03-13-07, 02:37 PM   #9
energyman76b
Registered User
 
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,104
Default Re: Request for the Linux Dev Driver folks: module auto-comp

a) if the module is not found, X will fail. So you don't have to stop it. Just restart after module installation.

b) if you are a corporate user, you won't update your kernel monthly - or at all. So that point of yours is moot.

c) 4000 desktops, see b.

d) if you really are a corporate user with many thousand desktops, doing monthly kernel updates and not able to stop X (lol), you should be able to hack a simple script, like the one posted.

e) at least one of the leading edge distros (gentoo), can rebuild every external module on boot without user interaction.

This 'functionality' is a 'problem' that has to be solved by the distris - or the professional users who need it.
energyman76b is offline   Reply With Quote
Old 03-13-07, 03:52 PM   #10
macemoneta
Registered User
 
macemoneta's Avatar
 
Join Date: Oct 2002
Location: NJ
Posts: 159
Default Re: Request for the Linux Dev Driver folks: module auto-comp

Quote:
Originally Posted by energyman76b
a) if the module is not found, X will fail. So you don't have to stop it. Just restart after module installation.
Less than optimum

Quote:
b) if you are a corporate user, you won't update your kernel monthly - or at all. So that point of yours is moot.

c) 4000 desktops, see b.
Depends on the business and the rate of security exposures. Security patches for the kernel are available regularly. If your distribution doesn't provide them, or you don't feel you need to apply them, then perhaps your business isn't as security conscious as one that does.


Quote:
d) if you really are a corporate user with many thousand desktops, doing monthly kernel updates and not able to stop X (lol), you should be able to hack a simple script, like the one posted.
Yes, I posted it. The problem is not just the kernel module, but userland changes as well. I have a script for that issue too. Both issues are certainly addressible by Nvidia. Those are all for my personal machines, not for corporate use. Stopping X remotely means terminating applications and possibly losing work in progress. That's not acceptable.

Quote:
e) at least one of the leading edge distros (gentoo), can rebuild every external module on boot without user interaction.

This 'functionality' is a 'problem' that has to be solved by the distris - or the professional users who need it.
No distribution will create infrastructure to work-around the undocumented changes that Nvidia implements. What they will (and are) doing is supporting the Nouveau project, which seeks to make Nvidia's implementation moot.
macemoneta is offline   Reply With Quote
Old 03-13-07, 04:32 PM   #11
energyman76b
Registered User
 
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,104
Default Re: Request for the Linux Dev Driver folks: module auto-comp

a) if you need to reinstall the driver, X is not running anyway, so stopping it is a non-issue

b) if you need to do a kernel update, what prevents you to install the driver on reboot?

c) how many times in the past years parts of the userland of the nvidia driver changed? I count none.

d) since every f*ing distri has its own way to boot and own way where to put its stuff only the distris can do an automatically reinstallation of external drivers.

e) some distris can do it already, so it is not hard. Pestering the ones who don't is the smart mans choice. Especially so called 'enterprise distributions' should listen to the wishes of their corporate users.

f) nouveau is not usable now and will not be usuable for a long time.

g) even with intel graphics you are not safe from problems on booting a new kernel.
energyman76b is offline   Reply With Quote
Old 03-13-07, 05:17 PM   #12
macemoneta
Registered User
 
macemoneta's Avatar
 
Join Date: Oct 2002
Location: NJ
Posts: 159
Default Re: Request for the Linux Dev Driver folks: module auto-comp

Quote:
Originally Posted by energyman76b
a) if you need to reinstall the driver, X is not running anyway, so stopping it is a non-issue
You need to re-install the driver when the kernel or userland changes. Both of these are non-disruptive operations when Nvidia is not involved.

Quote:
b) if you need to do a kernel update, what prevents you to install the driver on reboot?
It takes several minutes during which the boot is frozen, which can lead to user dissatisfaction - if it works. If it doesn't work, the user is left with a machine which is unusable to them. That in turn leads to a customer service call to IT.

Quote:
c) how many times in the past years parts of the userland of the nvidia driver changed? I count none.
The problem is not NVidia's userland (which changes with each driver release), but the X userland. For example, when modular Xorg install a server update, it replaces the Nvidia libglx.so symlink with a file. A logoff at that point will load the wrong library, leading to an X failure when starting a GLX application. Modular X is updated frequently - the reason they went modular.

Quote:
d) since every f*ing distri has its own way to boot and own way where to put its stuff only the distris can do an automatically reinstallation of external drivers.

e) some distris can do it already, so it is not hard. Pestering the ones who don't is the smart mans choice. Especially so called 'enterprise distributions' should listen to the wishes of their corporate users.
Why are you opposed to the use of Nvidia beyond it's current niche market?

Quote:
f) nouveau is not usable now and will not be usuable for a long time.
Nouveau will be incorporated by some distributions starting in the May time frame. It is progressing at a good clip (contrary to what it says on their web site).

Quote:
g) even with intel graphics you are not safe from problems on booting a new kernel.
Not entirely, but that can be vetted prior to deployment of the kernel/X update. Each Nvidia update must be treated as unique.

On a personal note, why would anyone oppose having the vendor of a product make that product integrate into the target environment better? Ask yourself, what motivation do you have to not want the use of Nvidia's driver to be easier or even transparent? Yes, it will make corporate life easier, but end-users will certainly benefit as well. Just look through the myriad of problems users have going from release to release in these forums. There is a problem.
macemoneta is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
nvidia + 2.4.19 gentoo = messed up ulukay NVIDIA Linux 18 11-01-02 11:58 PM
X Failed to load NVdriver c00lr4c3r NVIDIA Linux 13 10-22-02 01:44 PM
Error messages... HELP!!!! Imperito NVIDIA Linux 3 09-24-02 10:46 PM
GForce drivers installed...but dont work tomfullery NVIDIA Linux 6 09-22-02 08:23 AM
Need help to get the X to work on my Acer TravelMate 630 knchee NVIDIA Linux 16 09-19-02 10:16 PM

All times are GMT -5. The time now is 06:06 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.