kmod, akmod, dkms ??
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 11 of 11
  1. #1
    Join Date
    Oct 2007
    Posts
    467
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    kmod, akmod, dkms ??

    I'm running CentOS and every time I get a kernel update, I have to go back and rebuild/install my nVidia driver. Not such a big deal, but a few members of my group find it less than appealing. On my Fedora box, I have a kmod-nvidia module that rebuilds the driver as necessary. I've also seek akmod-nvidia for a similar purpose, and I've heard of dkms.

    Since I'm not overly familiar with these technologies - OK, so I don't really know what the differences are or how to use them. Ideally, I'd like to have my system automatically rebuild and install the driver with the kernel changes.

    Any tips on accomplishing this are greatly appreciated.

    -Kirk

  2. #2
    Join Date
    Jan 2008
    Location
    /dev/darkness
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    kmods are prebuilt kernel modules. akmods are effectively the source code for the module and on each boot if it finds that the kmod for that kernel is not installed it will build one locally and install it. akmods have the advantage that they can build modules even if the repositories don't have prebuilt ones for one reason or another (such as test updates etc) but the downside is that they need the appropriate compilers and headers installed in order to build the new modules. dkms is just another similar system. CentOS should be supported by rpmfusion to the best of my knowledge just like with fedora so i would check there first.
    F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
    F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
    OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU

  3. #3
    Join Date
    Oct 2007
    Posts
    467
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    Thanks for the input.

    Yes, I have RPMFusion in my repolist, but when I search for any package with *kmod* in the name, I get nothing.

    yum info | grep kmod ends up with nothing

    At this point I have the appropriate .sh file for the nVidia driver which I have to run each time I get a kernel update. What I would like to do, is automate the process so that when the kernel updates, I (or my colleagues) don't have to go through the process.

    -Kirk

  4. #4
    Join Date
    Jan 2008
    Location
    /dev/darkness
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    Sorry, my apologies. I should have checked the content of the rpmfusion repos before suggesting that was the solution. Apparently the nvidia drivers are not in there. Automating running the proprietry installer can probably be done quite simply using a hack in /etc/rc.local. If you want a more robust solution the best solution i can think of is looking at the source rpms for the fedora system and trying to modify it to work on CentOS. Unfortunately i can't help any more than that personally because i only use fedora and not CentOS.
    F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
    F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
    OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU

  5. #5
    Join Date
    Oct 2007
    Posts
    467
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    No worries. Thanks for the clarification.

    I'll see what I can come up with using rc.local.

  6. #6
    Join Date
    Oct 2007
    Posts
    467
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    Progress!

    Using the rc.local suggestion (thank you John5342), I've added short bit of scripting which does the trick, but to me it is a bit sloppy. Right now, the code looks for the file /opt/.kernel_version. If it does not find it, it will be created by:

    uname -r > /opt/.kernel_version

    The assumption is that the first time out, the nvidia module is loaded and all is good, so we capture the current kernel version.

    A comparison is made between the contents of the file and the results of (uname -r). If they do not match, the nVidia driver installer is run in silent mode.

    This all seems to work fine, but again, it seems a bit sloppy. Is there a better way to check whether the kernel has changed since the last boot, or whether the nVidia driver was loaded successfully? I tried to use the fact that modprobe nvidia will fail with an error message if the driver isn't compatible with the current kernel, but I can't seem to capture that error message into a variable for processing.

    -Kirk

  7. #7
    Join Date
    Jan 2008
    Location
    /dev/darkness
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    Rather than messing around with whether the version has changed etc why not just check if the kernel module (the only thing that really changes between kernels) is installed. The kernel module that is installed is installed in a location specific to the version of the kernel so you could just check for the presence of /lib/modules/$(uname -r)/extra/nvidia/nvidia.ko and if it's not present then run the installer. I should note that's the location used by the akmods. Thje nvidia installer may or may not be different but it should still be somewhere under /lib/modules/$(uname -r)/ so you should be able to do something with that.

    Frankly anything going into rc.local is a bit "hackish" but in the absence of a better way it's probably better than nothing.
    F15 x86_64 - AMD FX60 - 4GB DDR - 4x 1TB RAID0 - 2x 9800GX2
    F15 x86_64 - AMD64 X2 3800+ - 1GB DDR - 2x 750GB - 7800GT
    OOKernel OS - AG2 GCU - 32TB ARAM - 1TB PRAM - AG1 TCU

  8. #8
    Join Date
    Oct 2007
    Posts
    467
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    John5342,

    Thanks for the idea - I'll give it a go. Regarding the hack - I agree. I would like a better method, but short of building my own akmod module - CentOS doesn't have them it seems - I'm out of ideas. I'm open to suggestions, though.

  9. #9
    Join Date
    Feb 2010
    Location
    Greece
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    i prefer dkms

  10. #10
    Join Date
    Oct 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    I know this threads old but I found it and others might too. The elrepo repository has akmod packages for nvidia and many other drivers

  11. #11
    Join Date
    Jan 2010
    Posts
    7,500
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: kmod, akmod, dkms ??

    Elrepo is comparatively new, but yes, most of its drivers are kmods, so that they will rebuild when you update the kernel. For RHEL6 and offshoots, such as CentOS and Scientific, it's probably the best place to look for drivers. Additionally, its maintainers are all active on the CentOS fora--I think they're all mods there, and are always willing to work with someone having problems. I've used them primarily for NVidia and wireless on RHEL based systems.

Similar Threads

  1. kmod vs akmod
    By mathan in forum Hardware & Laptops
    Replies: 13
    Last Post: 27th January 2014, 04:01 PM
  2. What is the difference between an 'akmod' and a 'kmod'?
    By Dead1nside in forum Using Fedora
    Replies: 21
    Last Post: 20th October 2013, 05:11 PM
  3. akmod vs. dkms
    By brunson in forum Programming & Packaging
    Replies: 1
    Last Post: 7th August 2009, 06:15 PM
  4. kmod to akmod -question
    By GoinEasy9 in forum Using Fedora
    Replies: 6
    Last Post: 26th June 2009, 11:23 PM
  5. Neither my akmod-nvidia works, nor dkms for VirtualBox
    By DennyCrane in forum Using Fedora
    Replies: 39
    Last Post: 30th January 2009, 06:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •