uglyDwarf / linuxtrack

Headtracking for Linux/Mac
MIT License
158 stars 29 forks source link

Adding X-plane plugin disables Tattiebogle Xbox 360 Controller driver on Mac os x #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Tattiebogle Xbox 360 controller driver on mac os x and verify works 
in the system preferences menu.
2. Run linux-track gui and install x-plane plugin.
3. Go back to system preferences menu and see that the xbox controller is no 
longer recognized.

What is the expected output? What do you see instead?
I would have expected both devices to be usable, but instead, only the trackir 
is "visible."

What version of the product are you using? On what operating system?
Trackir 5, mac os x mavericks.

Please provide any additional information below.
I realize this may be a tattiebogle issue and not a linux-track issue. But if 
you could offer up any solution or information, it is greatly appreciated!

Original issue reported on code.google.com by bud...@gmail.com on 17 Apr 2014 at 2:56

GoogleCodeExporter commented 9 years ago
Hi,
I'd need a bit more information on this problem.

The thing is this: installing the x-plane plugin is nothing more than creating 
a directory in the X-Plane directory hierarchy and copying a file in there - 
I'm not touching anything even remotely close to the system. That makes me 
believe, that there are some other things at play here...

First of all, can you tell me what exactly do you mean by "only the trackir is 
visible"? Do you mean that the tattiebogle driver lists TrackIR instead of the 
Xbox controller?

I'd also like to ask you to do this: 

Disconnect the TrackIR and reboot the mac and check if the Xbox controller is 
recognized and working. 

If it is working, close the preferences menu and attach the TrackIR. Now check 
again, if the controller works.

If it does, again close the preferences menu and try running the ltr_gui and 
check the tracking with TrackIR works. Then close the ltr_gui and check the 
controller again.

These informations should help me to see more clearly what is going on in 
there...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 17 Apr 2014 at 5:06

GoogleCodeExporter commented 9 years ago
First of all: wow. That quick of a response was unexpected and greatly
appreciated. Thank you :)

So, I after getting x-plane 10 running on my macbook pro (brand new, 15"),
I decided to use an old wired xbox 360 controller that I had for control. I
downloaded the tattiebogle driver (as far as I know, the ONLY driver for an
xbox 360 controller on the mac os x; I' ve tried to find another..)

The driver works great. I've been able to assign both joysticks and all
buttons to whatever I want.

But today I received in the mail a trackir 5. I downloaded linux-track, and
it appears to be working as intended. Yet, when I start up XP10, no longer
is there a controller (my xbox 360 controller) available. The trackir 5, I
will mention, at this point works perfectly.

If I go to the xbo360 controller pane in system preferences (from
tattiebogle), it doesn't find the controller anymore.

I tried reinstalling the tattiebogle driver again, and the xbox controller
worked again, however, then the trackir 5 doesn't work anymore. Meaning,
the leds don't come on when I boot xp10.

Sorry, I'm not a programmer; ask me more detailed questions and maybe I can
provide. It seems like there is some driver interference...

Original comment by bud...@gmail.com on 17 Apr 2014 at 5:18

GoogleCodeExporter commented 9 years ago
Hi,
the behavior you get there is quite interesting... The thing is, that 
Linuxtrack doesn't use any dedicated driver for the TrackIR, it uses libusb 
library that handles it by itself. Also in case the gamepad stops working, can 
you try just rebooting the machine without TrackIR attached?

Now one point, that might help is this: if I understand it correctly, now the 
Xbox controller works, but not the TrackIR, right? Can you try starting the 
ltr_gui and start tracking there? If it doesn't work, can you send me a log 
(last pane, view logfile, ...)? There should be an information on why it 
doesn't start.
Kind regards,

Michal

Original comment by f.jo...@email.cz on 17 Apr 2014 at 7:41

GoogleCodeExporter commented 9 years ago
Ok, I restart the mac with only the xbox controller plugged in. I open that
the xbox controller panel so I can see that it is working. I plug in the
track ir. Xbox controller still working.

I simply run ltr-gui, and immediately, xbox controller stops working.

Here is the log:

Linuxtrack version 0.99.5

[Thu 2014-04-17 18:23:09 MDT] Starting ltr_gui

[Thu 2014-04-17 18:23:09 MDT] Preferences read OK!

[Thu 2014-04-17 18:23:09 MDT] Dumping prefs:

[Global]

Model = NP TrackClip

Prefix = "/Applications/X-Plane 10/X-Plane
10/linux-track/ltr_gui.app/Contents/MacOS"

Input = TrackIR

Camera-orientation = 0

[Wiimote]

Capture-device = Wiimote

Capture-device-id = Wiimote

Running-indication = 0100

Paused-indication = 0010

[TrackIR]

Capture-device = Tir

Capture-device-id = Tir

Threshold = 140

Min-blob = 4

Max-blob = 2500

Status-led-brightness = 1

Ir-led-brightness = 7

Status-signals = On

[NP TrackClip]

Model-type = Cap

Cap-X = 67

Cap-Y = 54

Cap-Z = 96

Head-Y = 160

Head-Z = 50

Active = no

[NP TrackClip Pro]

Model-type = Clip

Clip-Y1 = 40

Clip-Y2 = 110

Clip-Z1 = 30

Clip-Z2 = 50

Head-X = -100

Head-Y = -100

Head-Z = 50

Active = yes

[Face]

Model-type = Face

[Single Point Reflective]

Model-type = SinglePoint

Active = no

[Single LED]

Model-type = SinglePoint

Active = yes

[Default]

Title = Default

Pitch-enabled = Yes

Pitch-deadzone = 0.0

Pitch-left-curvature = 0.5

Pitch-right-curvature = 0.5

Pitch-sensitivity = 4.08333

Pitch-left-limit = 80.000000

Pitch-right-limit = 80.000000

Pitch-filter = 1

Yaw-enabled = Yes

Yaw-deadzone = 0.0

Yaw-left-curvature = 0.5

Yaw-right-curvature = 0.5

Yaw-sensitivity = 5.000000

Yaw-left-limit = 130.000000

Yaw-right-limit = 130.000000

Yaw-filter = 1

Roll-enabled = Yes

Roll-deadzone = 0.0

Roll-left-curvature = 0.5

Roll-right-curvature = 0.5

Roll-sensitivity = 1.500000

Roll-left-limit = 45.000000

Roll-right-limit = 45.000000

Roll-filter = 1

Xtranslation-enabled = Yes

Xtranslation-deadzone = 0.0

Xtranslation-left-curvature = 0.5

Xtranslation-right-curvature = 0.5

Xtranslation-sensitivity = 5.000000

Xtranslation-left-limit = 300.000000

Xtranslation-right-limit = 300.000000

Xtranslation-filter = 1

Ytranslation-enabled = Yes

Ytranslation-deadzone = 0.0

Ytranslation-left-curvature = 0.5

Ytranslation-right-curvature = 0.5

Ytranslation-sensitivity = 5.000000

Ytranslation-left-limit = 300.000000

Ytranslation-right-limit = 300.000000

Ytranslation-filter = 1

Ztranslation-enabled = Yes

Ztranslation-deadzone = 0.0

Ztranslation-left-curvature = 0.5

Ztranslation-right-curvature = 0.5

Ztranslation-sensitivity = 2.000000

Ztranslation-left-limit = 300.000000

Ztranslation-right-limit = 1.000000

Ztranslation-filter = 1.3

[Thu 2014-04-17 18:23:09 MDT]
================================================

[Thu 2014-04-17 18:23:09 MDT] Opening logfile viewer.

[Thu 2014-04-17 18:23:09 MDT] Initializing axes for profile 'Default'!

[Thu 2014-04-17 18:23:09 MDT] Closing axes!

[Thu 2014-04-17 18:23:09 MDT] Initializing axes for profile 'Default'!

[Thu 2014-04-17 18:23:09 MDT] Closing axes!

[Thu 2014-04-17 18:23:09 MDT] Initializing axes for profile 'Default'!

[Thu 2014-04-17 18:23:09 MDT] Closing axes!

[Thu 2014-04-17 18:23:09 MDT] Initializing axes for profile 'Default'!

Launching wine command: '"wine" "--version"'

Process error: Failed To Start

Using internal wine; adjusting env variables:

PATH='/Applications/X-Plane 10/X-Plane
10/linux-track/ltr_gui.app/Contents/MacOS/../wine/bin/:/usr/bin:/bin:/usr/sbin:/
sbin'

WINESERVER='/Applications/X-Plane 10/X-Plane
10/linux-track/ltr_gui.app/Contents/MacOS/../wine/bin/wineserver'

WINELOADER='/Applications/X-Plane 10/X-Plane
10/linux-track/ltr_gui.app/Contents/MacOS/../wine/bin/wine'

WINEDLLPATH='/Applications/X-Plane 10/X-Plane
10/linux-track/ltr_gui.app/Contents/MacOS/../wine/lib/wine/fakedlls'

DYLD_LIBRARY_PATH='/Applications/X-Plane 10/X-Plane
10/linux-track/ltr_gui.app/Contents/MacOS/../wine/lib/'

DYLD_PRINT_ENV='1'

DYLD_PRINT_LIBRARIES='1'

WINEDEBUG='+file,+seh,+tid,+process,+rundll,+module'

[Thu 2014-04-17 18:23:10 MDT] Initializing libusb.

[Thu 2014-04-17 18:23:10 MDT] Libusb initialized successfuly.

[Thu 2014-04-17 18:23:10 MDT] Libusb debug level set.

[Thu 2014-04-17 18:23:10 MDT] Requesting device list.

[Thu 2014-04-17 18:23:10 MDT] Device list received (5 devices).

[Thu 2014-04-17 18:23:10 MDT] Device is a TrackIR (131D:0158).

[Thu 2014-04-17 18:23:10 MDT] Opening handle to the device found.

[Thu 2014-04-17 18:23:10 MDT] Handle opened successfully.

[Thu 2014-04-17 18:23:10 MDT] Freeing device list.

[Thu 2014-04-17 18:23:10 MDT] Device list freed.

[Thu 2014-04-17 18:23:10 MDT] Closing TrackIR.

[Thu 2014-04-17 18:23:10 MDT] Closing TrackIR handle.

[Thu 2014-04-17 18:23:10 MDT] Exiting libusb.

[Thu 2014-04-17 18:23:10 MDT] Libusb exited.

QPixmap::scaled: Pixmap is a null pixmap

QPixmap::scaled: Pixmap is a null pixmap

2014-04-17 18:23:10.860 ltr_gui[431:707] CoreText performance note: Client
called CTFontCreateWithName() using name "Times New Roman" and got font
with PostScript name "TimesNewRomanPSMT". For best performance, only use
PostScript names when calling this API.

2014-04-17 18:23:10.861 ltr_gui[431:707] CoreText performance note: Set a
breakpoint on CTFontLogSuboptimalRequest to debug.

2014-04-17 18:23:10.863 ltr_gui[431:707] CoreText performance note: Client
called CTFontCreateWithName() using name "Times New Roman" and got font
with PostScript name "TimesNewRomanPSMT". For best performance, only use
PostScript names when calling this API.

2014-04-17 18:23:10.866 ltr_gui[431:707] CoreText performance note: Client
called CTFontCreateWithName() using name "Times New Roman" and got font
with PostScript name "TimesNewRomanPSMT". For best performance, only use
PostScript names when calling this API.

2014-04-17 18:23:20.363 ltr_gui[431:707] CoreText performance note: Client
called CTFontCreateWithName() using name "Times New Roman" and got font
with PostScript name "TimesNewRomanPSMT". For best performance, only use
PostScript names when calling this API.

QPixmap::scaled: Pixmap is a null pixmap

QPixmap::scaled: Pixmap is a null pixmap

Original comment by bud...@gmail.com on 18 Apr 2014 at 12:25

GoogleCodeExporter commented 9 years ago
Hi,
this is really interesting... It seems that the tattiebogle doesn't survive 
linuxtracks query for devices; but all I'm doing is enumerating devices and 
checking their device descriptors... Then I'm communicating directly with 
TrackIR, which should not bother the gamepad driver...

One more thing, can you try to reboot once again and make sure that the Xbox 
controller works. Then start Console (in Applications/Utils), run ltr_gui, 
close it, make sure the Xbox controller doesn't work and check for any 
suspicious messages in the console? My guess is, that the descriptor query does 
something bad to the driver...

I'm going to do one more thing - I'll create a program that will try to isolate 
what is the problem; I hope I'll be able to do it over the weekend, but 
unfortunately I can't promise that (three year old twins can take-up any amount 
of free time, you know).
Kind regards,

Michal

Original comment by f.jo...@email.cz on 18 Apr 2014 at 6:50

GoogleCodeExporter commented 9 years ago
My email response didn't see to be working...

Ok, I cleared theconsole and took a screenshot just of what came from ltr_gui

It might be another data point in the analysis for you, but after doing this 
(running ltr_gui) with the xbox controller working at start, Unplugging the 
xbox controller or even just doing a system reboot crashes the OS (grey screen 
of death)

However, if I just boot up with the controller working and never ltr_gui, all 
is fine.

Thanks buddy -- no rush, family first! Let me know if there's anything else 
that makes sense for me to try on this end to help debugging.

Original comment by bud...@gmail.com on 19 Apr 2014 at 1:20

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,
first of all, thanks for your understanding...

Unfortunately the screenshot didn't reveal anything interesting; what might be 
interesting though is, if you can find anything suspicious from the time you 
had that crash (maybe even the gray screen of death - is there anything like 
backtrace, or so?).

Anyway, I'm thinking more and more there is something wrong with that 
tattiebogle driver; anyway, I'm attaching a zip file, containing a testing 
binaries. It works like this: save the archive somewhere and unpack it by 
doubleclicking. Make sure the TrackIR is connected to the machine. Now open a 
terminal (in Applications/Utilities), and drag&drop the strasak_1.18 to it.
Press enter and you'll be presented with the menu. Now check the controller is 
working; if it is, select the option 1 in the terminal and check if the 
controller still works. If it is, continue with option 2 (pressing up arrow in 
terminal recalls the last command) and so on - I'd need which option "kills" 
controller.

If for some reason the controller still works even after the option 5, try the 
same with the strasak_1.16. The difference is in the libusb library version - 
version 1.18 is the most fresh one, and chances are they might have fixed some 
bugs there.

To sum it up, I'd be interested in knowing which option renders the tattiebogle 
driver unusable - it would make for a good testcase for its creator. Also if 
you could attach a output from the terminal (cmd-S [or Shell/Export text as...] 
saves it for you).In the meantime I can try to see if I can borrow the 
controller somewhere to test it out myself...

Thanks for your help,

Michal

Original comment by f.jo...@email.cz on 21 Apr 2014 at 12:28

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Michal, thanks for the response! Ok, I didn't get far into the checklist 
before the controller stopped. Working. Looks like it is the libusb:

> Make sure the TrackIR is connected to the machine. Now open a terminal (in 
Applications/Utilities), and drag&drop the strasak_1.18 to it. Press enter and 
you'll be presented with the menu. Now check the controller is working; 

Yes, still working.

> if it is, select the option 1 in the terminal and check if the controller 
still works.

No, stopped working.

I might contact the tattiebogle creator and see if he has any interest in 
solving the issue. Thanks again for your help!

Original comment by bud...@gmail.com on 21 Apr 2014 at 11:09

GoogleCodeExporter commented 9 years ago
Interesting...

Did a bit of googling and what you see is not that incommon; however, I 
stumbled upon this:

http://www.tonymacx86.com/general-help/124898-finally-working-mavericks-compatib
le-xbox-360-controller-driver.html

I'll try to put together a minimal testcase, that I'd try to send to the author 
and see if he is interested; also the author of the above patched version might 
be interested.

Kind regards,

Michal

Original comment by f.jo...@email.cz on 22 Apr 2014 at 6:08

GoogleCodeExporter commented 9 years ago
Michael... I tried this unofficial version and it works perfectly. Thanks
so much for the heads up. No driver interference, no kernel panics. So not
I just flew in x-plane with trackir using linux track and my xbox 360
controller in Mac OS X Mavericks!! Woohoo!

Hopefully, the creator of tattiebogle will be interested in this, but my
guess is that he doesn't support it anymore. Either way, atleast now I have
a solution. Thank you SO much!

Original comment by bud...@gmail.com on 23 Apr 2014 at 4:13

GoogleCodeExporter commented 9 years ago
Thank you for the update - I'm glad it all works for you now...

I'll close this issue then; feel free to file another, should you encounter any 
problems...

Kind regards,

Michal

Original comment by f.jo...@email.cz on 23 Apr 2014 at 4:53

GoogleCodeExporter commented 9 years ago

Original comment by f.jo...@email.cz on 6 May 2014 at 7:00