SpaceNavigator on Linux

1,043 views
Skip to first unread message

Aerilius

unread,
Oct 1, 2010, 4:59:05 PM10/1/10
to liquid-galaxy
Hi!
I am very impressed to find that spacenavigator now works with Google
Earth (and even without an extra driver). I actually didn't have much
hope that the support would be added so soon, but it's really great!

However, I didn't manage to get it work. I followed the description
here:
http://code.google.com/p/liquid-galaxy/wiki/LinuxSpaceNavigator


I use Ubuntu 10.04 (Kernel 2.6.32-24), Google Earth 5.2.1.1547.
According to those two commands, I have exactly the same version (ID
046d:c626) like in the description:
$dmesg
[ 2015.012103] input: 3Dconnexion SpaceNavigator as /devices/
pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input12
[ 2015.012293] generic-usb 0003:046D:C626.0005: input,hidraw3: USB HID
v1.10 Multi-Axis Controller [3Dconnexion SpaceNavigator] on
usb-0000:00:1d.1-1/input0
$lsusb
Bus 003 Device 003: ID 046d:c626 Logitech, Inc. 3DConnexion Space
Navigator 3D Mouse

After creating the /etc/udev/rules.d/90-spacenavigator, adding the
settings to the googleearth drivers.ini, rebooting and plugging in the
spacenavigator, the /dev/input/spacenavigator is not created. I found
that there appears a /dev/input/event10. So I added a symlink
spacenavigator that links to the event10 file, but it still doesn't
work.


In the Ubuntu repositories, there is a package spacenavd (daemon) and
a libspnav0. Are they necessary? (they were not mentioned in the
description and still nothing happened after I installed them)

Jason Holt

unread,
Oct 1, 2010, 5:07:59 PM10/1/10
to liquid...@googlegroups.com
Nope, you shouldn't need any extra libs, and if you installed
3dconnexion's driver, it may be getting in the way.

What do the permissions look like on /dev/input/input10 (or whatever
it currently is?) You might want to try, for example, "sudo chmod 777
/dev/input/input10".

I think you should also be able to do things like "od -x <
/dev/input/input10", then move the spacenav around a bunch and see
some "garbage" appear representing the data that it sends when you
move it.

Aerilius

unread,
Oct 1, 2010, 6:41:02 PM10/1/10
to liquid...@googlegroups.com
Of course I didn't installed 3dconnexion's driver and I uninstalled the other libs immediately ;-)
The permissions were like this:
crw-r----- 1 root root 13, 74 2010-10-01 23:38 /dev/input/event10

Even after changing them to 777, the result is still this:
$ od -x < /dev/input/event10
bash: /dev/input/event10: Permission denied
$ sudo od -x < /dev/input/event10
bash: /dev/input/event10: Permission denied

So I don't see any data send by the device. I checked it on windows, the spacenavigator seems not to be broken (it was half a year ago that I lastly used it)

2010/10/1 Jason Holt <jh...@google.com>

Jason Holt

unread,
Oct 1, 2010, 6:42:07 PM10/1/10
to liquid...@googlegroups.com
"Permission denied" makes me wonder if the chmod worked right. Can
you post the current permissions?

aeri...@googlemail.com

unread,
Oct 1, 2010, 7:22:56 PM10/1/10
to liquid...@googlegroups.com
After a reboot, everything is reset. So I repeated those steps again, and after changing the permissions to 777, the permissions are
crwxrwxrwx 1 root root 13, 74 2010-10-02 00:24 /dev/input/event10
Now there is no error message anymore:
od -x < /dev/input/event10

But nothing happens (no data from the device), I moved the spacenavigator and pressed the buttons, but it stays silent.

Jason Holt

unread,
Oct 1, 2010, 7:48:26 PM10/1/10
to liquid...@googlegroups.com

So you probably have the wrong device.  Unplug spacenav, ls, plug in and see what's new.

sent from my android

aeri...@googlemail.com

unread,
Oct 1, 2010, 8:55:18 PM10/1/10
to liquid...@googlegroups.com
Ok, I plugged it in again and it seems not to be event10, there appears no new device. (double checked it with reboot)

So the spacenavigator is recognized (the name is in the lsusb output above), but it can't be accessed as device. And is it sure that the driver is by default in the kernel (2.6.32-24) in ubuntu?

Jason Holt

unread,
Oct 1, 2010, 11:47:20 PM10/1/10
to liquid...@googlegroups.com
Yes, it should work great with Lucid. In fact, normally with Lucid,
xorg automatically detects the spacenav and starts using it as a
mouse, so that the pointer jumps all over the screen when you touch
the spacenav.

Your dmesg output suggests that the device is getting recognized:

$dmesg
[ 2015.012103] input: 3Dconnexion SpaceNavigator as

/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input12


[ 2015.012293] generic-usb 0003:046D:C626.0005: input,hidraw3: USB HID
v1.10 Multi-Axis Controller [3Dconnexion SpaceNavigator] on
usb-0000:00:1d.1-1/input0

Poke around in dmesg again the next time you plug in the device and
you should see it near the bottom. With the above output, I might try
looking around the system for files named "input12" or "input0".

This is probably a different issue, but I'm running Google Earth
5.2.1.1588, so it sounds like you don't have the latest version.

Aerilius

unread,
Oct 2, 2010, 12:44:21 PM10/2/10
to liquid...@googlegroups.com
I checked that the other drivers are completely uninstalled, then I repeated the steps and after setting the permissions to 777, the terminal showed data from the device (this time event10):
od -x < /dev/input/event10
0000000 3758 4ca7 3bf4 0001 0002 0002 0004 0000
0000020 3758 4ca7 3bf7 0001 0000 0000 0000 0000
...


I discovered a symlink at /dev/input/by-id/usb-3Dconnexion_SpaceNavigator-event-if00 which keeps always the same name and I used this in the drivers.ini, so the udev rule seems not to be absolutely necessary. 
However, after some research I found that the udev rule works for me if I add a file extension:
90-spacenavigator.rules
KERNEL=="event[0-9]*",  SYSFS{name}=="3Dconnexion Space*", SYMLINK+="input/spacenavigator", MODE="0666"


In Google Earth, the fly-to animation stopped immediately when I touched the spacenavigator. So I edited the drivers.ini and tried different parameters and finally removed all except of the path to the device. 
In summary, there was only one essential step for me to install the spacenavigator, namely to edit the google-earth/drivers.ini:

SETTINGS {
...
SpaceNavigator/device = /dev/input/by-id/usb-3Dconnexion_SpaceNavigator-event-if00
}

Many thanks for your help!

Jason Holt

unread,
Oct 2, 2010, 6:24:55 PM10/2/10
to liquid...@googlegroups.com
Thanks for letting us know what worked! I've updated the filename in
the wikipage and linked to this thread.

jayarmstrong

unread,
Nov 2, 2010, 6:06:19 AM11/2/10
to liquid-galaxy
I'm able to use the spacenavigator simply by enabling "use controller"
under navigation; I did not have to do any of the above. However, the
joystick only pans and its directional bindings are very odd: pushing
the joystick up and left makes the earth move down and to the right.
The two buttons do work as zoom, but rotate and push/pull do nothing.

The spacenav does show up under /dev/input/js0 and /event5.

The device doesn't show up under xinput -list so Xorg doesn't seem to
be grabbing it as a mouse (indeed it doesn't interact with the
cursor).

It's possible that I installed the 3dconnexion drivers a while back
but I don't know how to test for that.

After installing GE 5.2, I can't find a drivers.ini file anymore.

Any suggestions would be appreciated. Thanks.

Jason Holt

unread,
Nov 3, 2010, 3:20:56 AM11/3/10
to liquid...@googlegroups.com
Interesting that that does anything at all. To get it to really work,
you'll have to find your drivers.ini. You could try something like
'find / -name drivers.ini 2>/dev/null' to find it.

matemaciek

unread,
Nov 25, 2010, 1:01:59 PM11/25/10
to liquid-galaxy
Simmilar problem here - although I've found and edited drivers.ini,
but still device is not properly working...

It's sending events:

od -x < /dev/input/by-id/usb-3Dconnexion_SpaceNavigator-event-joystick
0000000 a429 4cee 0000 0000 06b9 0009 0000 0000
0000020 0003 0002 0002 0000 a429 4cee 0000 0000
0000040 06bd 0009 0000 0000 0000 0000 0000 0000
0000060 a429 4cee 0000 0000 25f3 0009 0000 0000
0000100 0003 0005 ffff ffff a429 4cee 0000 0000
0000120 25f6 0009 0000 0000 0000 0000 0000 0000
0000140 a429 4cee 0000 0000 452f 0009 0000 0000
0000160 0003 0002 0000 0000 a429 4cee 0000 0000
0000200 4532 0009 0000 0000 0000 0000 0000 0000
0000220 a429 4cee 0000 0000 646c 0009 0000 0000
0000240 0003 0005 0000 0000 a429 4cee 0000 0000
0000260 646e 0009 0000 0000 0000 0000 0000 0000
0000300 a42a 4cee 0000 0000 c23a 0009 0000 0000
0000320 0003 0002 0004 0000 a42a 4cee 0000 0000
0000340 c23f 0009 0000 0000 0000 0000 0000 0000
0000360 a42a 4cee 0000 0000 e170 0009 0000 0000
0000400 0003 0003 fffa ffff a42a 4cee 0000 0000
0000420 e176 0009 0000 0000 0000 0000 0000 0000
0000440 a42a 4cee 0000 0000 00ac 000a 0000 0000
0000460 0003 0002 0000 0000 a42a 4cee 0000 0000
0000500 00b0 000a 0000 0000 0000 0000 0000 0000
0000520 a42a 4cee 0000 0000 1feb 000a 0000 0000
0000540 0003 0003 ffff ffff a42a 4cee 0000 0000
0000560 1ff0 000a 0000 0000 0000 0000 0000 0000
0000600 a42a 4cee 0000 0000 5e6e 000a 0000 0000
0000620 0003 0003 fffc ffff a42a 4cee 0000 0000
0000640 5e74 000a 0000 0000 0000 0000 0000 0000
0000660 a42a 4cee 0000 0000 9ceb 000a 0000 0000
0000700 0003 0003 0000 0000 a42a 4cee 0000 0000
0000720 9cf1 000a 0000 0000 0000 0000 0000 0000

What is strange is a lot of zeroes - can somebody with fully working
SN + GE can post output of simmilar commend? My gues it's somehow SN
was installed as a joystick instead of full navigator,

matemaciek

unread,
Nov 25, 2010, 1:56:31 PM11/25/10
to liquid-galaxy
Ok, I've cheked with evtest and gizmod - it seems that SN works well,
all 6 axes are recognized. I've also checked with kubuntu joystick
configuration GUI - there is indeed joystick device, wich I guess is
used by GE after enabling in settings (2 standard axes and 2 buttons).

Jason Holt

unread,
Nov 28, 2010, 1:19:25 AM11/28/10
to liquid...@googlegroups.com
Sorry to hear that. The important configuration is the drivers.ini
setting. Can you verify that the drivers.ini setting is using the
same device that evtest/gizmod was? I'm just guessing here; my
intuition is that it's something simple.

matemaciek

unread,
Nov 28, 2010, 4:59:45 AM11/28/10
to liquid-galaxy
I've checked it many times... Is there any way to enable debugging /
logging in GE?

Jason Holt

unread,
Nov 29, 2010, 3:15:11 PM11/29/10
to liquid...@googlegroups.com
Unfortunately, no, but you could try strace. Dump the strace output
to a file, then look for the syscall where it opens the spacenavigator
device and see if it succeeds.

matemaciek

unread,
Nov 29, 2010, 5:14:15 PM11/29/10
to liquid-galaxy
No trace in strace...:
~$ strace googleearth 2>ge_strace
~$ cat ge_strace | grep input | wc
0 0 0

But:
~$ lsof | grep /dev/input/
googleear 15749 matemaciek 11r CHR 13,71
0t0 254687 /dev/input/event7
~$ od -x < /dev/input/event7
0000000 23c4 4cf4 0000 0000 4506 0003 0000 0000
0000020 0003 0000 fff2 ffff 23c4 4cf4 0000 0000
0000040 450b 0003 0000 0000 0003 0001 000b 0000
0000060 23c4 4cf4 0000 0000 450d 0003 0000 0000

Some strange things are going on...

Jason Holt

unread,
Nov 29, 2010, 6:33:20 PM11/29/10
to liquid...@googlegroups.com
Indeed. More than one copy of earth running? xterm on a different machine?

matemaciek

unread,
Nov 30, 2010, 2:18:08 AM11/30/10
to liquid-galaxy
Nope. One googleearth, one machine.

After reading strace output it appeared that googleearth starts itself
as a child again, so "strace -f googleearth" outputs more information
(-:
Finally we got something:

[pid 16748] open("/dev/input/by-id/usb-3Dconnexion_SpaceNavigator-
event-joystick", O_RDONLY|O_NONBLOCK <unfinished ...>
# /dev/input/by-id/usb-3Dconnexion_SpaceNavigator-event-joystick is a
symlink to /dev/input/event7
[...]
[pid 16748] <... open resumed> ) = 16
[....]
[pid 16748] read(16, 0xffca3ef4, 16) = -1 EAGAIN (Resource
temporarily unavailable)
[...]
[pid 16748] read(16, "C\232\364Lz0\1\0\3\0\2\0\376\377\377\377", 16) =
16
[pid 16748] read(16, "C\232\364L|0\1\0\0\0\0\0\0\0\0\0", 16) = 16
[pid 16748] read(16, "C\232\364L\365n\1\0\3\0\2\0\0\0\0\0", 16) = 16
[pid 16748] read(16, "C\232\364L\367n\1\0\0\0\0\0\0\0\0\0", 16) = 16
[...]
[pid 16748] read(16, 0xffca3f14, 16) = -1 EAGAIN (Resource
temporarily unavailable)
[...]
[pid 16748] read(16, 0xffca3f14, 16) = -1 EAGAIN (Resource
temporarily unavailable)
[...]
# Line above appears from time to time again, then there are lots of
succesfull reads, like this:
[pid 16748] read(16, "H\232\364L\257\272\4\0\3\0\3\0004\0\0\0", 16) =
16
[pid 16748] read(16, "H\232\364L\262\272\4\0\3\0\4\0\3\0\0\0", 16) =
16
[pid 16748] read(16, "H\232\364L\263\272\4\0\3\0\5\0\346\377\377\377",
16) = 16
[pid 16748] read(16, "H\232\364L\265\272\4\0\0\0\0\0\0\0\0\0", 16) =
16
[pid 16748] read(16, "H\232\364L\360\331\4\0\3\0\0\0\0\0\0\0", 16) =
16
[pid 16748] read(16, "H\232\364L\363\331\4\0\3\0\1\0\337\377\377\377",
16) = 16
[pid 16748] read(16, "H\232\364L\365\331\4\0\3\0\2\0\35\0\0\0", 16) =
16
[pid 16748] read(16, "H\232\364L\366\331\4\0\0\0\0\0\0\0\0\0", 16) =
16
[pid 16748] read(16, "H\232\364L1\371\4\0\3\0\3\0\215\377\377\377",
16) = 16
[pid 16748] read(16, "H\232\364L3\371\4\0\3\0\4\0\377\377\377\377",
16) = 16
[pid 16748] read(16, "H\232\364L5\371\4\0\3\0\5\0\0\0\0\0", 16) = 16
[pid 16748] read(16, "H\232\364L6\371\4\0\0\0\0\0\0\0\0\0", 16) = 16
[pid 16748] read(16, "H\232\364Lo\30\5\0\3\0\0\0\2\0\0\0", 16) = 16
[pid 16748] read(16, "H\232\364Lq\30\5\0\3\0\1\0\31\0\0\0", 16) = 16
[pid 16748] read(16, "H\232\364Lr\30\5\0\3\0\2\0\0\0\0\0", 16) = 16
[pid 16748] read(16, "H\232\364Ls\30\5\0\0\0\0\0\0\0\0\0", 16) = 16
# And from time to time some "EAGAIN (Resource temporarily
unavailable)" - so it appears that the device is readed correctly -
some data, then EAGAIN then some data and so on. But somehow this data
is ignored later (wrong format?).

No further ideas how to debug it...

Jason Holt

unread,
Nov 30, 2010, 2:52:25 AM11/30/10
to liquid...@googlegroups.com
Of course! Sorry, I should have remembered this earlier:

https://groups.google.com/group/liquid-galaxy/browse_thread/thread/ed5c11657feb712b/b149477ad931f266?show_docid=b149477ad931f266&fwc=1&pli=1#

You're probably on a newer kernel that's emitting EV_ABS events
instead of EV_REL. Earth 6.0 (just released) should fix that by
accepting either type. Let me know what you find, and thanks for
sticking with it so long.

matemaciek

unread,
Nov 30, 2010, 9:37:24 AM11/30/10
to liquid-galaxy
(-:

I'm pretty sure they are EV_ABS events, I have rather new kernel and I
think I've seen them in gizmod (I'm not on my machine now so I can't
check exectly).

I've already heard about GE6 release and installed it, but saddly
googleearth-bin can't starrt but I guess it's a different story...

Thanks for help!

On 30 Lis, 08:52, Jason Holt <jh...@google.com> wrote:
> Of course!  Sorry, I should have remembered this earlier:
>
> https://groups.google.com/group/liquid-galaxy/browse_thread/thread/ed...

matemaciek

unread,
Nov 30, 2010, 2:12:54 PM11/30/10
to liquid-galaxy
Ok, installed and running GE6 ( http://www.google.com/support/forum/p/earth/thread?tid=144696eab7d5a9c7&hl=en
was my issue) and SN is working (-: Thanks a lot (((-:

(Future readers: don't forget to re-edit your drivers.ini file. In
Debian-ish OS'es it may be in /usr/lib/googleearth/)

Gecko

unread,
Jan 6, 2011, 3:57:59 PM1/6/11
to liquid-galaxy
I just tried to get the Spacenavigator running with GE 6. I'm using
Ubuntu 10.04 and followed the instructions in the Wiki.
I noticed that there is a problem with the locale (LANG environment
variable) when using GE and the spacenavigator.
To solve the problem I start Googleearth with
LANG=C googleearth

Of course googleearth now starts in english, but at least the
Spacenavigator is working now. Perhaps this could be added to the wiki
page.

Thanks for the very helpful instructions. Now Browsing through GE is
even more fun :-)

P.S. since the udev rule is not necessarily needed (see some posts
above), the information about the /dev/input/by-id/
usb-3Dconnexion_SpaceNavigator-event-if00 could also be added to the
wiki page.

Regards, Stefan


On 30 Nov. 2010, 20:12, matemaciek <matemac...@gmail.com> wrote:
> Ok, installed and running GE6 (http://www.google.com/support/forum/p/earth/thread?tid=144696eab7d5a9...

Jason Holt

unread,
Jan 6, 2011, 5:32:10 PM1/6/11
to liquid...@googlegroups.com
Wow, really?  If your LANG is set to something else, the spacenav just does nothing at all?

Stefan Dröge

unread,
Jan 7, 2011, 12:46:29 PM1/7/11
to liquid...@googlegroups.com
Yes.
Two notes if somebody wants to try it out:
1. You can start GE with
LANG=de_DE.UTF-8
or
LANG=fr_FR.UTF-8

2. If the chosen locale (de_DE.UTF-8) ist NOT installed on your
system, GE will start, and the language of the GUI will be the chosen
language, but the Spacenavigator WILL work. I assume that GE
internally falls back to locale "C" in that case. Only if the
according locale ist installed on the system this bug occurs.

I assume that GE will show this bug with all locales which use a ","
as a decimal separator. I've checked the following locales:
- de_DE.UTF-8 (German, Germany) -> doesn't work ("," as a
decimal separator)
- de_AT.UTF-8 (German, Austria) -> doesn't work ("," as a
decimal separator)
- de_CH.UTF-8 (German, Switzerland) -> works (according to
Wikipedia the "." is used as a decimal separator for currencies and
coordinates, else a "," is used)
- fr_FR.UTF-8 (French, France) -> doesn't work ("," as a
decimal separator)
- zh_CN.UTF-8 (Chinese (simplified), China) -> works (uses "."
as Decimal separator)

I have added this to the GE Bug Tracker (Issue No. 1114:
http://code.google.com/p/earth-issues/issues/detail?id=1114)

Regards, Stefan

2011/1/6 Jason Holt <jh...@google.com>:

Jason Holt

unread,
Jan 7, 2011, 9:26:11 PM1/7/11
to liquid...@googlegroups.com
Thanks for the excellent bug reporting, Stefan.  I've updated the wikipage per both your suggestions.  

Andrew Leahy

unread,
Jan 12, 2011, 6:24:55 PM1/12/11
to liquid-galaxy
Hi, I just setup the SpaceNavigator with RedHat Fedora (fc13) on a
MacBook Pro and Google Earth 6 (6.0.1.2032 beta). It's working fine.

- Fedora creates this symlink "/dev/input/by-id/
usb-3Dconnexion_SpaceNavigator-event-joystick" rather than the "...-
event-if00" that Debian seems to do. The udev rule in the wiki worked
okay creating /dev/input/spacenavigator so that's what I use in
drivers.ini

- the GE6 RPM installs into a new path /opt/google/earth/free rather
than the old /opt/google-earth/ so that's where drivers.ini is.

- I'm pretty sure the 'Tools -> Options... -> Navigation -> Enable Non-
mouse Controller' has no effect.

One thing that caught me... DON'T use "#" to comment out lines in the
drivers.ini make sure you use ";".
If you accidentally use "#" the drivers.ini is silently ignored,
slightly annoying!

Cheers, Andrew
eResearch / University of Western Sydney

Jason Holt

unread,
Jan 12, 2011, 7:27:15 PM1/12/11
to liquid...@googlegroups.com
Thanks Andrew!  I updated the spacenav page with your note on paths.

Andrew Leahy

unread,
Jan 12, 2011, 9:53:55 PM1/12/11
to liquid...@googlegroups.com
Small update about SpaceNavigator with Fedora Linux (2.6.34 kernel).

With Fedora I get a whinge about SYSFS in udev/rules being deprecated.
Simply replacing "SYSFS" with "ATTRS" fixes that.

The group "plugdev" doesn't exist under Fedora, so you get a whinge, nothing serious.
The perms are being set to 644 so I suspect the group ownership doesn't particularly matter.

You can show all the udev info with the command below, change the /dev/ path for the thing you want to look at.

# udevadm info -a -p $(udevadm info -q path -n /dev/input/event5)

I noticed along with the explicit vendor/product id there's also...

 ATTRS{name}=="3Dconnexion SpaceNavigator"

Might be simpler to just use that in the udev rule? Although I'm not sure how consistent it is?

So my /etc/udev/rules.d/90-spacenavigator.rules now looks like -

KERNEL=="event[0-9]*", ATTRS{name}=="3Dconnexion SpaceNavigator", MODE="644", SYMLINK+="input/spacenavigator"

Seems to be working okay.

Cheers, Andrew.
--
"Those who know, do not speak. Those who speak, do not know." (Lao Tzu)

My household GHG emissions from energy & transport ~4kg CO2e/day or ~1.4tonnes/year
Household daily use of Water 110L, Electricity 3.9kWh, Petrol 1.2L, Gas 0MJ

Paul

unread,
Nov 1, 2011, 6:59:07 AM11/1/11
to liquid...@googlegroups.com
Just a quick update here - under Ubuntu 11.04, using Google Earth 6.1, I couldn't get it to work - until I killed spacenavd.  Killing spacenavd and adding the relevant guff to drivers.ini did the trick for me - and if anything, it's quicker and smoother than it was on Windows - though perhaps that's just down to sensitivity settings...
Reply all
Reply to author
Forward
0 new messages