Common Kernel Errors & Debugging Tips
Kernel Errors
The following are some typical errors. Some of these may be caught at compilation or link time, and some may only cause problems when you call insmod with the module.
- division by zero
- dereferencing a null pointer
- returning no value or a value other than zero from init_mod
- calling a C library routine (e.g., malloc() or printf()) from inside a kernel module
Beware that errors in the kernel sometimes have no immediate visible effect, but they may have a delayed effect that is disastrous. This is generally the case if you write garbage into random locations of kernel memory. The location you corrupt may not be referenced to a while. It will be referenced later, and then the effect will occur. Therefore, you cannot assume that the thing you did most recently is necessarily the cause of a crash.
As a consequence, during actual kernel development, one needs to test new kernel code extensively, letting the system run long enough (and with enough other activities going on) to give you confidence that the new code has no harmful side-effects. When you are debugging your own code, if you have tested some code that seems to have gone badly wrong, but not badly enough to crash the system (yet), you may want to reboot the system before testing your revised code. I have seen cases where a system crashed while executing the corrected code, but the crash was because of the delayed effect of damage that had been done by the previously executed (bad) version of the code.
Kernel Debugging Tips
Here are a few tips to ease kernel development and save some time on repeated reboots.
Make Grub Visible
sudo vim /etc/default/grub
Change this line:
GRUB_HIDDEN_TIMEOUT=0
to
#GRUB_HIDDEN_TIMEOUT=0
Then run grub update:
sudo update-grub2
Make Verbose Boot:
sudo vim /etc/default/grub
Change this line:
#GRUB_TERMINAL=console
to
GRUB_TERMINAL=console
Also change this line:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
to
GRUB_CMDLINE_LINUX_DEFAULT=”debug”
Then run grub update:
sudo update-grub2
Text Based Login:
sudo vim /etc/default/grub
Change this line:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
to
GRUB_CMDLINE_LINUX_DEFAULT=”text”
Then run grub update:
sudo update-grub2
Remove Unnecessary Services (while debugging):
sudo apt-get remove apparmor
This is a significant savings as far as boot time is concerned. On my machine, the removal of apparmor reduced the boot-up time by over 10 seconds.
Compile Linux Kernel on Ubuntu 12.04 LTS (Detailed)
This tutorial will outline the process to compile your own kernel for Ubuntu. It will demonstrate both the traditional process using ‘make’ and ‘make install’ as well as the Debian method, using ‘make-dpkg’. This is the detailed version of this tutorial, see Compile Linux Kernel on Ubuntu 12.04 LTS for the quick overview. In any case, we begin by installing some dependencies:
sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev linux-source qt3-dev-tools libqt3-mt-dev libncurses5 libncurses5-dev fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge kernel-package
Note: qt3-dev-tools and libqt3-mt-dev is necessary if you plan to use ‘make xconfig’ and libncurses5 and libncurses5-dev if you plan to use ‘make menuconfig’. Next, copy the kernel sources with wget:
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.17.tar.bz2
Extract the archive and change into the kernel directory:
tar -xjvf linux-3.2.17.tar.bz2 cd linux-3.2.17/
Now you are in the top directory of a kernel source tree. The kernel comes in a default configuration, determined by the people who put together the kernel source code distribution. It will include support for nearly everything, since it is intended for general use, and is huge. In this form it will take a very long time to compile and a long time to load. So, before building the kernel, you must configure it. If you wish to re-use the configuration of your currently-running kernel, start by copying the current config contained in /boot:
cp -vi /boot/config-`uname -r` .config
Parse the .config file using make with the oldconfig flag. If there are new options available in the downloaded kernel tree, you may be prompted to make a selection to include them or not. If unsure, press enter to accept the defaults.
make oldconfig
Since the 2.6.32 kernel, a new feature allows you to update the configuration to only compile modules that are actually used in your system. As above, make selections if prompted, otherwise hit enter for the defaults.
make localmodconfig
The next step is to configure the kernel to your needs. You can configure the build with ncurses using the ‘menuconfig’ flag:
make menuconfig
or, using a GUI with the ‘xconfig’ flag:
make xconfig
In either case, you will be presented with a series of menus, from which you will choose the options you want to include. For most options you have three choices: (blank) leave it out; (M) compile it as a module, which will only be loaded if the feature is needed; (*) compile it into monolithically into the kernel, so it will always be there from the time the kernel first loads.
There are several things you want to accomplish with your reconfiguration:
- Reduce the size of the kernel, by leaving out unnecessary components. This is helpful for kernel development. A small kernel will take a lot less time to compile and less time to load. It will also leave more memory for you to use, resulting in less page swapping and faster compilations.
- Retain the modules necessary to use the hardware installed on your system. To do this without including just about everything conceivable, you need figure out what hardware is installed on your system. You can find out about that in several ways.
Before you go too far, use the “General Setup” menu and the “Local version” and “Automatically append version info” options to add a suffix to the name of your kernel, so that you can distinguish it from the “vanilla” one. You may want to vary the local version string, for different configurations that you try, to distinguish them also.
Assuming you have a running Linux system with a working kernel, there are several places you can look for information about what devices you have, and what drivers are running.
- Look at the system log file, /var/log/messages or use the command dmesg to see the messages printed out by the device drivers as they came up.
- Use the command lspci -vv to list out the hardware devices that use the PCI bus.
- Use the command lsub -vv to list out the hardware devices that use the USB.
- Use the command lsmod to see which kernel modules are in use.
- Look at /proc/modules to see another view of the modules that are in use.
- Look at /proc/devices to see devices the system has recognized.
- Look at /proc/cpuinfo to see what kind of CPU you have.
- Open up the computer’s case and read the labels on the components.
- Check the hardware documentation for your system. If you know the motherboard, you should be able to look up the manual, which will tell you about the on-board devices.
Using the available information and common sense, select a reasonable set of kernel configuration options. Along the way, read through the on-line help descriptions (for at least all the top-level menu options) so that you become familiar with the range of drivers and software components in the Linux kernel.
Before exiting the final menu level and saving the configuration, it is a good idea to save it to a named file, using the “Save Configuration to an Alternate File” option. By saving different configurations under different names you can reload a configuration without going through all the menu options again. Alternatively, you can backup the file (which is named .config manually, by making a copy with an appropriate name.
One way to reduce frustration in the kernel trimming process (which involves quite a bit of guesswork, trial, and error) is to start with a kernel that works, trim just a little at a time, and test at each stage, saving copies of the .config file along the way so that you can back up when you run into trouble. However, the first few steps of this process will take a long time since you will be compiling a kernel with huge number of modules, nearly all of which you do not need. So, you may be tempted to try eliminating a large number of options from the start
Now we are ready to start the build. You can speed up the compilation process by enabling parallel make with the -j flag. The recommended use is ‘processor cores + 1′, e.g. 5 if you have a quad core processor:
make -j5
This will compile the kernel and create a compressed binary image of the kernel. After the first step, the kernel image can be found at arch/i386/boot/bzImage (for a x86 based processor). Once the initial compilation has completed, install the dynamically loadable kernel modules:
sudo make modules_install
The modules are installed in a subdirectory of “/lib/modules”, named after the kernel version. The resulting modules have the suffix “.ko”. For example, if you chose to compile the network device driver for the Realtek 8139 card as a module, there will be a kernel module name 8139too.ko. The third command is OS specific and will copy the new kernel into the directory “/boot” and update the Grub bootstrap loader configuration file ”/boot/grub/grub.cfg” to include a line for the new kernel.
Finally, install the kernel:
sudo make install
This command performs many operations behind the scenes. Examine the /etc/grub.d/ directory structure before and after you run the above commands to see the changes. Also look in the /boot/grub/grub.cfg file for your kernel entry.
The OS specific make install, Ubuntu in this case, also creates an initrd image in the /boot directory. If you compiled the needed drives into the kernel then you will not need this ramdisk file to aid in booting. For extra credit remove the created initrd from the /boot/ directory as well as the references in /etc/grub.d/*.
If there are error messages from any of the make stages, you may be able to solve them by going back and playing with the configuration options. some options require other options or cannot be used in conjunction with some other options. These dependencies and conflicts may not all be accounted-for in the configuration script. If you run into this sort of problem, you are reduced to guesswork based on the compilation or linkage error messages. For example, if the linker complains about a missing definition of some symbol in some module, you might either turn on an option that seems likely to provide a definition for the missing symbol, or turn off the option that made reference to the symbol.
Reboot the system, selecting your new kernel from the boot loader menu. Watch the messages. See if it works. If it does not, reboot with the old kernel, try to fix what went wrong, and repeat until you have a working new kernel
Debian Method:
Instead of the compilation process of above, you can alternatively compile the kernel as installable .deb packages. This improves the portability of the kernel, since installation on a different machine is as simple as installing the packages. Rather than using ‘make’ and ‘make install’, we use ‘make-kpkg’:
fakeroot make-kpkg –initrd –append-to-version=-some-string-here kernel-image kernel-headers
Unlike above, you cannot enable parallel compilation with make-kpkg using the -j flag. Instead, define the CONCURRENCY_LEVEL environment variable.
export CONCURRENCY_LEVEL=3
Once the compilation has completed, you can install the kernel and kernel headers using dpkg:
sudo dpkg -i linux-image-3.2.14-mm_3.2.14-mm-10.00.Custom_amd64.deb
sudo dpkg -i linux-headers-3.2.14-mm_3.2.14-mm-10.00.Custom_amd64.deb
Compile Linux Kernel on Ubuntu 12.04 LTS
This tutorial will outline the process to compile your own kernel for Ubuntu. It will demonstrate both the traditional process using ‘make’ and ‘make install’ as well as the Debian method, using ‘make-dpkg’. This is a quick overview of the compilation process, for a more thourough walkthrough, see Compile Linux Kernel on Ubuntu 12.04 LTS (Detailed). In both cases, we begin by installing some dependencies:
sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev linux-source qt3-dev-tools libqt3-mt-dev libncurses5 libncurses5-dev fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge kernel-package
Note: qt3-dev-tools and libqt3-mt-dev is necessary if you plan to use ‘make xconfig’ and libncurses5 and libncurses5-dev if you plan to use ‘make menuconfig’. Next, copy the kernel sources with wget:
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.17.tar.bz2
Extract the archive and change into the kernel directory:
tar -xjvf linux-3.2.17.tar.bz2 cd linux-3.2.17/
Now you are in the top directory of a kernel source tree. Before building the kernel, you must configure it. If you wish to re-use the configuration of your currently running kernel, start by copying the current config contained in /boot:
cp -vi /boot/config-`uname -r` .config
Parse the .config file using make with the oldconfig flag. If there are new options available in the downloaded kernel tree, you may be prompted to make a selection to include them or not. If unsure, press enter to accept the defaults.
make oldconfig
Since the 2.6.32 kernel, a new feature allows you to update the configuration to only compile modules that are actually used in your system. As above, make selections if prompted, otherwise hit enter for the defaults.
make localmodconfig
Now you can configure the build with ncurses using the ‘menuconfig’ flag:
make menuconfig
or, using a GUI with the ‘xconfig’ flag:
make xconfig
Now we are ready to start the build. You can speed up the compilation process by enabling parallel make with the -j flag. The recommended use is ‘processor cores + 1′, e.g. 5 if you have a quad core processor:
make -j5
Once the initial compilation has completed, install the dynamically loadable kernel modules:
sudo make modules_install
Finally, install the kernel:
sudo make install
Debian Method:
Instead of the compilation process of above, you can alternatively compile the kernel as installable .deb packages. This improves the portability of the kernel, since installation on a different machine is as simple as installing the packages. Rather than using ‘make’ and ‘make install’, we use ‘make-kpkg’:
fakeroot make-kpkg –initrd –append-to-version=-some-string-here kernel-image kernel-headers
Unlike above, you cannot enable parallel compilation with make-kpkg using the -j flag. Instead, define the CONCURRENCY_LEVEL environment variable.
export CONCURRENCY_LEVEL=3
Once the compilation has completed, you can install the kernel and kernel headers using dpkg:
sudo dpkg -i linux-image-3.2.14-mm_3.2.14-mm-10.00.Custom_amd64.deb
sudo dpkg -i linux-headers-3.2.14-mm_3.2.14-mm-10.00.Custom_amd64.deb
Compile Cyanogenmod 9 for Galaxy Nexus
This tutorial will outline the process to compile Cyanogenmod 9 for the Verizon (LTE) Galaxy Nexus (aka toro, a variant of the tuna) on Ubuntu 12.04 LTS. This process has changed a bit over time, notably with new hassles to configure the Oracle Java JDK. While the tutorial is specific to the Galaxy Nexus, it generalizes to most devices supported by Cyanogenmod 9. First, install and configure the Android SDK (more thorough info here):
wget http://dl.google.com/android/android-sdk_r18-linux.tgz
tar -xvzf android-sdk_r18-linux.tgz
rm android-sdk_r18-linux.tgz
cd android-sdk-linux
tools/android update sdk – -no-ui
It could take a while for the updates to the Android SDK to download and install. Once that has completed, install the package dependencies.
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool lib32readline-gplv2-dev
The next step is to download and configure the most recent Java JDK from Oracle. This part of the tutorial is based on a nice tutorial from John Bokma.
Download the JDK from Oracle here:
sudo mkdir -p /usr/local/java
sudo mv ~/Downloads/jdk-6u31-linux-x64.bin /usr/local/java
cd /usr/local/java
sudo chmod +x jdk-6u31-linux-x64.bin
sudo ./jdk-6u31-linux-x64.bin
The installer will attempt to open a browser, but will fail. Presumably this is because the browser is unable to start as root, but this doesn’t seem to affect the install at all. Now remove the installer, and create a symlink to /usr/local/java/latest. This way a new JDK can easily be configured by just moving the /usr/local/java/latest symlink to the most recent version:
sudo rm jdk-6u31-linux-x64.bin
sudo ln -s jdk1.6.0_31 /usr/local/java/latest
Next we will need to configure some environmental variables so the JDK will be recognized. Add the JAVA_HOME and JRE_HOME . For example,
sudo gedit /etc/environment
Then replace the contents with the following:
JAVA_HOME="/usr/local/java/latest"JRE_HOME="/usr/local/java/latest/jre"PATH="/usr/local/java/latest/bin:\/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
If you don’t want to log out and log back in to have the updated /etc/environment parsed by the system, you can use the ‘source’ command:
source /etc/environment
You can test if it is working correctly using
java -version # and javac -version
The output should look something like this:
java version “1.6.0_31″ Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
Then, get the repo tool (a wrapper for git) and make it executable.
mkdir -p ~/bin
mkdir -p ~/cmcurl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Initialize and sync the repo. Change the -b option to checkout another branch (like -b gingerbread). NOTE: reboot may be required for repo to work!
cd ~/cm
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j16
After the source has synched, we need to run a script to get the prebuilt binaries, including ROM Manager and Terminal.
cd ~/cm/vendor/cm
./get-prebuilts
Now setup the environment with envsetup
cd ~/cm
. build/envsetup.sh
Execute the ‘brunch’ command to see the list of build targets, and make your selection. For the Galaxy Nexus, select cm_toro-userdebug, for Nexus S, select cm_crespo-userdebug, for Xoom, choose cm_wingray-userdebug
brunch
Once a selection is made, the build should start. If it doesn’t, try running the ‘lunch’ instead. Make your selection, then run ‘mka bacon’
lunch
mka bacon
If that doesn’t work either, explicitly execute ‘make bacon’. You can use the -j compiler flag to enable parallel make. The recommended use is ‘processor cores + 1′, e.g. 5 if you have a quad core processor:
make -j[#ofcpus] bacon
Once the build completes, the output will be located in ~/cm/out/target/product/toro/. This folder contains the system and boot images, as well as a compressed and signed update.zip. Push the file to the sdcard of the device, and reboot into recovery:
adb push ~/cm/out/target/product/toro/update-cm-9.0.0-RC0-toro-UNOFFICIAL-signed.zip /sdcard/
adb reboot recovery
Once booted into recovery, MAKE A BACKUP, then flash the update.zip.
OpenCV + Python
Here are some of the more interesting OpenCV demos using the Python wrapper. The installation process on Ubuntu is covered in my previous post, OpenCV + Ubuntu. The demo scripts are located in samples/python within the OpenCV release.
The cam shift sample below demonstrates the color/object detection capability of OpenCV. To set the object/color to track, click and drag a box on the video using the mouse. The histogram window will display the target for OpenCV to locate and track within the field of view. The more distinct the color from the background of the scene, the better it works. The trailing 0 at the end means to use camera input device 0.
python ./camshift.py 0
To run the face detection demo, you will need to use the -c command line option to specify the classifier to use. Different classifiers detect using different algorithms and so are better suited to certain detection condition, angles, etc. compared to others. The classifier used in the demo works best with faces directly facing the camera, and doesn’t do as well with tilted, rotated, or otherwise not direct faces. This is why some of the titled faces in the Google image search part of the video fail to be recognized by OpenCV.
python ./facedetect.py -c /usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml 0
If you don’t have a camera connected, and still want to verify that the Python wrapper is working correctly, you can run the previous examples using an image or video file, otherwise try out the following examples (also in samples/python):
python ./minarea.py
python ./delaunay.py
python ./dmtx.py
python ./drawing.py
OpenCV + Ubuntu
Building OpenCV 2.3.1 from source on Ubuntu 12.04 x64. Here is an overview of the compilation of OpenCV with x264 and ffmpeg builtin. If you have completed my Kinect + OpenNI + PrimeSensetutorial, this will also support the OpenNI and PrimeSense drivers with OpenCV.
This is largely based on the wonderful OpenCV tutorials from Sebastian Montabone and Osman Eralp. Before you start, make sure to have removed ffmpeg and x264 (if applicable):
sudo apt-get remove ffmpeg x264 libx264-dev
Now begin by installing the required dependencies:
sudo apt-get install build-essential libgtk2.0-0 libgtk2.0-dev gtk2-engines-pixbuf libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake cmake-qt-gui python-dev python-numpy python-sphinx libtbb-dev libeigen2-dev yasm libmp3lame-dev libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libhighgui-dev libgtkglext1-dev libdc1394-22-dev libboost-all-dev qtcreator libwxbase2.8-dev libwxgtk2.8-dev wx-common checkinstall libjack-jackd2-dev libsdl1.2-dev libva-dev libvdpau-dev libx11-dev libxfixes-dev texi2html zlib1g-dev libgstreamer0.10-0 libgstreamer0.10-dev gstreamer0.10-tools gstreamer0.10-plugins-base libgstreamer-plugins-base0.10-dev gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg libv4l-dev
Create a directory for the sources:
mkdir ~/opencv
cd ~/opencv
Next, clone, build and install x264:
git clone git://git.videolan.org/x264.git
cd x264
./configure –enable-static –enable-pic –enable-shared
make
sudo make install
The next step is to build and install ffmpeg:
cd ~/opencv
wget http://ffmpeg.org/releases/ffmpeg-0.8.10.tar.bz2
tar -xvjpf ffmpeg-0.8.10.tar.bz2
cd ffmpeg-0.8.10/
./configure –enable-gpl –enable-version3 –enable-nonfree –enable-postproc –enable-libfaac –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libtheora –enable-libvorbis –enable-libmp3lame –enable-libx264 –enable-libxvid –enable-x11grab –enable-swscale –enable-pic –enable-shared
make
sudo make install
NOTE: Do NOT clone the mainline source tree with git. This version is NOT compatible (I tried and failed several times!). I’m sure version 0.7 and 0.8 work, anything newer resulted in compilation errors later in the OpenCV build.
Next, build and install OpenCV:
cd ~/opencv
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.3.1/OpenCV-2.3.1a.tar.bz2
tar -xvjpf OpenCV-2.3.1a.tar.bz2
cd OpenCV-2.3.1/
mkdir build
cd build
cmake-gui ..
Now click ‘configure’ and check the following boxes:
BUILD_EXAMPLES
INSTALL_C_EXAMPLES
INSTALL_PYTHON_EXAMPLES
WITH_OPENNI
WITH_TBB
NOTE: you can also enable the CUDA extensisons if you have capable nvidia graphics card(s).
Click ‘configure’ again, check the output and ensure that there are not any modules that cmake cannot find. If everything looks good, click ‘generate’ to create the makefiles, then close cmake-gui.
make
sudo make install
Finally, we need to make a few configurations for OpenCV. First, open the opencv.conf file with the following code:
sudo gedit /etc/ld.so.conf.d/opencv.conf
Add the following line at the end of the file(it may be an empty file, that is ok) and then save it:
/usr/local/lib
Then edit the system-wide bashrc file:
sudo gedit /etc/bash.bashrc
Add the following new lines to the end of the file:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
Now that everything is installed and configured, on to the demos!
cd ~/opencv/OpenCV-2.3.1/build/bin
Build/bin demos worth checking out that don’t require a webcam:
convexhull
kmeans
drawing
Build/bin demos using camera:
adaptiveskindetector
facedetect
fback
bgfg_segm c true
lkdemo
motempl
Google Earth + Mult-axis Controller
Six degree of freedom control for Google Earth using the 3Dconnexion SpaceNavigator on Ubuntu Linux. Based on directions from here: http://code.google.com/p/liquid-galaxy/wiki/LinuxSpaceNavigator
First, install the necessary package dependencies:
sudo apt-get install xinput xserver-xorg-input-joystick
Next we add a udev rule to automatically recognize the Space Navigator based on its vendor/product ids and create a symlink at /dev/input/spacenavigator. Create the following file as root:
sudo gedit /etc/udev/rules.d/90-spacenavigator.rules
and add the following line:
KERNEL==”event[0-9]*”, SYSFS{idVendor}==”046d”, SYSFS{idProduct}==”c62[68]“, MODE=”0664″, GROUP=”plugdev”, SYMLINK+=”input/spacenavigator”
Next, we must modify the drivers.ini file to add support for google earth. This file may in exist in several locations depending on how you installed Google Earth. If you installed as root, edit the driver file here. Note: may also be located at /opt/google-earth/drivers.ini depending on software version.
sudo gedit /opt/google/earth/free/drivers.ini
If you installed Google Earth as your local user, edit the driver file here:
gedit ~/.googleearth/drivers.ini
Add the following lines to the SETTINGS stanza of the drivers.ini. Note: these paramaters can be manipulated to suit your own needs. The ‘gutter’ paramater is particularly useful as it defines the ‘dead zone’ around the center axis.
; Settings for multi-axis controllers
SpaceNavigator/sensitivityX = 0.125
SpaceNavigator/sensitivityY = 0.125
SpaceNavigator/sensitivityZ = 0.030
SpaceNavigator/sensitivityPitch = 0.01
SpaceNavigator/sensitivityYaw = 0.004
SpaceNavigator/sensitivityRoll = 0.007
SpaceNavigator/device = /dev/input/spacenavigator
SpaceNavigator/zeroX = 0.0
SpaceNavigator/zeroY = 0.0
SpaceNavigator/zeroZ = 0.0
SpaceNavigator/zeroPitch = 0.0
SpaceNavigator/zeroYaw = 0.0
SpaceNavigator/zeroRoll = 0.0
SpaceNavigator/gutterValue = 0.1
At this point the drivers should be fully functional for use with Google Earth. However, your OS may indentify the SpaceNvigator as a mouse, making control somewhat awkward. You can disable this behavior using the xinput set-int-prop command:
xinput set-int-prop “3Dconnexion SpaceNavigator” “Device Enabled” 8 0
The same command can also be used to re-enable the mouse behavior:
xinput set-int-prop “3Dconnexion SpaceNavigator” “Device Enabled” 8 1
