The Linux Wacom Project
|Main | News | FAQ | Downloads | Help | Development | TOC | All||Jan 23, 2018|
Linux Wacom Project HOWTO
3.5 - Installing wacom.(k)o
To install or not to install, that is the question. Since the driver is in memory, you can pretty much use it this way throughout the rest of this document. Anywhere you see "modprobe wacom", you'll instead need to "insmod ./wacom.ko". You'll also need to be careful that you are in the package's src directory. If you instead use the less-specific command "insmod wacom.ko" from a directory other than the package's src directory, insmod will load the driver from the kernel modules directory instead. The result is that you'll be using the wrong driver.
Why would you not install the driver? Well, for one, you may be building a driver against a wrong kernel source, and if the system crashes (you get an Oops or things come unglued in other ways), it would be nice to reboot and have the original drivers load instead.
When should I install the driver? When you're comfortable that the driver will not crash your system. If you really know what you're doing, just load the drivers manually like in the previous section Testing If wacom.(k)o Will Load.
On some distributions, Mandriva (a.k.a Mandrake) included, the wacom.ko driver that appears in the kernel modules directory appears to be compressed. If you cannot find wacom.ko using the method below, try locating wacom.ko.gz instead. People who encountered this problem were able to run gzip on the module and copy that instead.
Installing the driver requires knowing where it belongs. A little research will help here. By using the locate command, you can find all copies of the original driver on the computer.
On this computer, there are two kernels installed. uname identifies the currently active kernel as 2.6.17-1.2157_FC5. The correct driver to replace is therefore at /lib/modules/2.6.17-1.2157_FC5/kernel/drivers/usb/input/wacom.ko. You will need to be root to replace this file, and it is a very good idea to make a backup copy.jej@ayukawa wacom]$ locate wacom.ko /lib/modules/2.6.17-1.2157_FC5/kernel/drivers/usb/input/wacom.ko /lib/modules/2.6.17-1.2174_FC5/kernel/drivers/usb/input/wacom.ko [jej@ayukawa wacom]$ uname -r 2.6.17-1.2157_FC5
Here, I've saved the original to wacom_old.ko and copied my new driver over it. You should substitute directory names as appropriate.[jej@ayukawa wacom]$ su [jej@ayukawa root]# cd /lib/modules/2.6.17-1.2157_FC5/kernel/drivers/usb/input [jej@ayukawa usb]# cp wacom.ko /home/jej/linuxwacom/src/2.6.16/wacom_old.ko [jej@ayukawa usb]# cp /home/jej/linuxwacom/src/2.6.16/wacom.ko wacom.ko
NOTE: Don't leave the backup copy in the same directory as the original. depmod will treat both as valid drivers, regardless of their names. Copy the original somewhere outside of the kernel module directory to ensure that this does not happen. In at least one case, the backup driver was loaded instead of the new one due to a curious dependency issue.
Finally, it is always a good thing to update the module dependencies. This is where you find out if the module was compiled without kernel module versioning. The following command, even if it generates errors is relatively benign. If it fails, then there is no harm done. It just means that you will have to load modules in the correct order since the system will not be able to guess for you.
[jej@ayukawa usb]# depmod -e
If you get no errors and no output, everything is fine, and the module was
compiled, linked, and installed properly. If you received unresolved symbols
like usb_set_idle or printk, then you need to reconfigure with module
versioning enabled and recompile.