Fujitsu lifebook application panel
Technical information and drivers for *n*x platforms


Linux compile problem

Q. Why do I get the following compile error when I try to compile the linux-driver?

  gcc fjkeyinf.c -D__KERNEL__ -O2 -Wall -I/usr/include -c -o fjkeyinf.o
  In file included from /usr/include/sys/ioctl.h:30,
                   from apanel.h:41,
                   from fjkeyinf.c:38:
  /usr/include/bits/ioctl-types.h:29: redefinition of `struct winsize'
  /usr/include/bits/ioctl-types.h:38: redefinition of `struct termio'
  make: *** [fjkeyinf.o] Error 1

A. This seems to be a bug in newer versions of glibc... just comment the line "#include <sys/ioctl.h>", and it'll compile. Furthermore, you'll need the lm_sensors package compiled into your kernel...

Why does fjkeyd suck all cpu-time on FreeBSD?

A. The system management bus code in FreeBSD doesn't handle all smbus interrupts by default. You should add the following line to your kernel configuration:

    options ENABLE_ALART

This will enable the smbus-code to handle alert-interrupts on the system management bus. And just ignore the ERROR messages on your console which appear when pressing a CD-key.

Unable to open apanel device (FreeBSD)

Q. I try to run fjkeyd, but it bails out with "could not find apanel device...", apanelc gives the error: "apanelc: /dev/apanel: Device not configured".

A. First, check if the kernel module apanel.ko is loaded. You can do that by running kldstat. If it's output contains a line like this:

 3    1 0xc0f67000 3000     apanel.ko

(i.e. the Name field has 'apanel.ko'), the module is loaded. If it is not loaded, you can load it manually using kldload apanel. If you get an error on your console about unresolved symbols, see README for installing smbus in your kernel.

When the module gets loaded, the message "apanel0: <Fujitsu Lifebook Application Panel> on smbus0" should be displayed on your console. If this is not the case, you could try the following. Edit the Makefile and add "-DSMBUS_WORKAROUND" to the line starting with MYCLFAGS=. Or remove it when it's already there.

Why doesn't XXX work?

A. The driver appeared to work good enough for most people. As interest in this driver has declined due to the hardware becoming older and older, this will probably remain so.