You are here: DesktopBSD Wiki Portal » doc » USB4BSD

Translations of this page?:

USB4BSD

The purpose of this driver is to exchange the original USB driver in kernel with a new giant lock free one. Some devices will run only in a proper way if the are without giant lock. Giant lock is some sort of mechanism to disable the possiblity that two or more threads are using the same data at the same time, e.g. on multiprocessor systems, if it's not guaranteed, that they are in sync afterwards. Nvidia display driver is a further example for this mechanism. For example, I couldn't run a Razer mouse (laser, usb) without kernel panics (attach/deattach usb devices), after the patch it runs very smooth.

You can download it here, of course it's maybe better to use the subversion sourcecode.

Attention! You should know, what you are doing!

It can be unstable with certain devices!

Make yourself comfortable with building a custom kernel.

Download the sourcecode either as tar.gz package or with svn,

svn --username anonsvn --password anonsvn \
checkout svn://svn.turbocat.net/i4b

After this change to the directory and install the patch,

cd i4b/trunk/i4b/FreeBSD.usb
make S=../src package
make install
Don't forget, you will need the system sourcecode!

If you ever want to deinstall it, make deinstall will do it, but you have to rebuild the kernel afterwards. Furthermore everytime you will fetch new sourcecode, it will be overwritten.

In your custom kernel config (/usr/src/sys/i386/conf) you should add device usb

That's all nescessary to compile a new kernel,

cd /usr/src && make buildkernel installkernel KERNCONF=GENERIC

If you have a dualcore cpu or smp, add -j3 for example after make to gain a higher performance compiling the kernel.

When ready … reboot, good luck :)

Addon

The new driver is far from perfect. It isn't possible anymore to use this driver together with this Audigy driver. But on the other side, maybe the Audigy driver isn't perfect ;) So it's up to you, to test it on your system.

[edit] … again ;)

I did some testing, IT IS funtional - USB4BSD and the Audigy driver. It was an mistake of mine, some IRQ conflict. So in the end, it should be pretty safe to use this driver.