IMPORTANT: MANY PEOPLE REPORT PROBLEMS TO HAVE THIS WORKING. FOR NOW IT'S VERY LIKELY IT'S NOT GOING TO WORK FOR YOU AS IS!!!!!!!
This HowTo propose a trick to use linux restricted modules and use the restricted driver manager in Feisty with a custom kernel (like a Vanilla kernel or a patched Ubuntu kernel etc).
Why do this?
----------------
Sometime you need to use a custom compiled kernel for various reasons if you need specific hardware to work, if you want the very latest Linux kernel or if you want to use some patches like the popular undervolting patch (linux PHC). When you compile a kernel it has its own specific name and is thus no more "associated" to the linux restricted modules that came with the Ubuntu distrbution. So usually people compiling a new kernel couldn't use the restricted modules and had to use workarounds to have their specific hardware working (like Nvidia or ATI cards). This HowTo is made to propose a way to use those restricted modules with custom kernels.
How does this work?
-------------------------
Nothing fancy here. It's all about symlinking! Basically when you compile a kernel it gets a specific name/version that doesn't match those of the restricted modules that came with Ubuntu. So if you create symlinks or all references to restricted modules under the new name of the kernel, Ubuntu may think that there exist restricted modules for our specific kernel and will use them. So for all files/folders containing restricted modules for the original kernel, you have to create a symlink with the new kernel name/version.
Which Ubuntu version does it apply to?
-----------------------------------------------
This trick has been tested on Feisty Fawn and the user who kindly tested that was able to install/uninstall Nvidia restricted drivers from the Restricted driver manager while using a custom compiled Vanilla kernel patched with Con Kolivas performance patch. It must be mentionned that the Vanilla kernel was the same version (2.6.20) as the linux-restricted-module that come with Ubuntu. However it's quite possible that this would work if you use a newer/older kernel as well. It just hasn't been tested yet.
Is it dangerous?
-------------------
Honestly I don't think so but obviously do a backup before messing with this, just in case something get screwed. You can easily revert the modification applied by this trick simply by removing the symlinks created. If you have any problem you should still be able to reboot the computer under the old kernel version to remove the changes.
OK so what should I do to have this work (on Feisty)?
-----------------------------------------------------------------
***** PLEASE BACKUP FIRST *****
Here we will assume that you new custom kernel is 2.6.20-ck1. Just adapt the blue text to your own kernel if it different.
1) We first need to trick Ubuntu into thinking that there exist a linux-restricted-modules package specific to your custom kernel. This is required to allow the restricted drivers manager in Feisty to work.
sudo gedit /var/lib/dpkg/status and copy the following at the end of the file then save it:
Code:
Package: linux-restricted-modules-2.6.20-ck1
Status: install ok installed
Priority: optional
Section: restricted/misc
Installed-Size: 41328
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Architecture: i386
Source: linux-restricted-modules-2.6.20
Version: 2.6.20-ck1
Provides: nvidia-kernel-1.0.9631, nvidia-kernel-1.0.7184, nvidia-kernel-1.0.9755
Depends: linux-image-2.6.20-15-generic, linux-restricted-modules-common (>= 2.6.20), module-init-tools, nvidia-kernel-common
Suggests: nvidia-glx | nvidia-glx-legacy | nvidia-glx-new, avm-fritz-firmware-2.6.20-15
Description: Non-free Linux 2.6.20 modules on x86/x86_64
This package provides restricted modules for Linux version 2.6.20 on
x86/x86_64.
.
Currently the following modules are included:
- madwifi (Atheros)
- fglrx (ATI)
- nvidia
- fcdsl2, fcdslsl, fcdslslusb, fcdslusb, fcdslusb2, fcpci (AVM ISDN)
.
These modules are "restricted" because they are not available under a
completely Free licence.
2) sudo gedit /var/lib/dpkg/available and copy the following at the end of the file then save it:
Code:
Package: linux-restricted-modules-2.6.20-ck1
Priority: optional
Section: restricted/misc
Installed-Size: 41328
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Architecture: i386
Source: linux-restricted-modules-2.6.20
Version: 2.6.20-ck1
Provides: nvidia-kernel-1.0.9631, nvidia-kernel-1.0.7184, nvidia-kernel-1.0.9755
Depends: linux-image-2.6.20-15-generic, linux-restricted-modules-common (>= 2.6.20), module-init-tools, nvidia-kernel-common
Suggests: nvidia-glx | nvidia-glx-legacy | nvidia-glx-new, avm-fritz-firmware-2.6.20-15
Size: 16096180
Description: Non-free Linux 2.6.20 modules on x86/x86_64
This package provides restricted modules for Linux version 2.6.20 on
x86/x86_64.
.
Currently the following modules are included:
- madwifi (Atheros)
- fglrx (ATI)
- nvidia
- fcdsl2, fcdslsl, fcdslslusb, fcdslusb, fcdslusb2, fcpci (AVM ISDN)
.
These modules are "restricted" because they are not available under a
completely Free licence.
3) Now we will create all the symlinks so that the new kernel can use the restricted modules that originally came with Ubuntu. 2.6.20-15 is the kernel version that comes with Feisty. If you don't use Feisty you need to adjust this version number to whatever your distribution is.
In the terminal copy/paste these lines one at a time and run them:
cd /lib/firmware
sudo ln -s 2.6.20-15-generic 2.6.20-ck1
cd /lib/linux-restricted-modules
sudo ln -s 2.6.20-15-generic 2.6.20-ck1
cd /usr/share/linux-restricted-modules
sudo ln -s 2.6.20-15-generic 2.6.20-ck1
cd /var/lib/dpkg/info
sudo ln -s linux-restricted-modules-2.6.20-15-generic.md5sums linux-restricted-modules-2.6.20-ck1.md5sums
sudo ln -s linux-restricted-modules-2.6.20-15-generic.postinst linux-restricted-modules-2.6.20-ck1.postinst
sudo ln -s linux-restricted-modules-2.6.20-15-generic.postrm linux-restricted-modules-2.6.20-ck1.postrm
sudo ln -s linux-restricted-modules-2.6.20-15-generic.list linux-restricted-modules-2.6.20-ck1.list
4) Try to open the restricted drivers manager and see if it works. You should now be able to install/uninstall restricted drivers!
Bookmarks