matzman666 / OpenVR-AdvancedSettings

OpenVR Advanced Settings Dashboard Overlay
GNU General Public License v3.0
879 stars 88 forks source link

Linux support #45

Open ChristophHaag opened 7 years ago

ChristophHaag commented 7 years ago

Now that SteamVR is officially on Linux, it would be nice to have this on Linux.

There are currently some things wrong for this:

I've made a quick and dirty build with just ripping out the audio manager, commenting out the keyboard input, deleting qt.conf and adding a symlink for the res directory: https://github.com/ChristophHaag/OpenVR-AdvancedSettings/commits/master

Now I can successfully run it with LD_LIBRARY_PATH=~/.local/share/Steam/SteamApps/common/SteamVR/tools/bin/linux64/ bin/win64/AdvancedSettings and it actually shows up in the vr dashboard.

The only problem that remains is that the Y axis seems to be inverted, i.e. when I try to select a button on the bottom, a button on the top will be focused and when I move the controller upwards, the button focus goes downwards.

matzman666 commented 7 years ago

Linux support is planned, and I already tried to get SteamVR working on Kubuntu 16.10, but I wasn't successful in reasonable time (I have to admit that I didn't try too hard, I got my 3d printer last week and are currently busy with it). I will try it again this weekend.

The audio manager is using the windows API

I already encapsulated the audio manager in it's own class with a OS-independent interface. I just need to implement the Linux specific classes, shouldn't be too hard. The hardest is to decide whether to directly speak to pulseaudio, or to use libSDL which I think Steam is using.

The keyboard input is using the windows API

For the keyboard input I need to enclose the windows specific code with an OS-aware preprocessor switch, and implement the linux specific code using libxdo (or maybe also libSDL?), should again not be too hard.

There's a qt.conf that breaks qt on Linux

What exactly is breaking? The qt.conf contains a windows specific line to fix a bug with high-dpi monitors. Maybe removing this line fixes the qt.conf on Linux.

the res directory seems to be in the wrong place

The path to the res directory is stated in the qt.conf. When you remove it, then Qt cannot find it anymore.

The only problem that remains is that the Y axis seems to be inverted

You mean the y axis of the controller touchpads? That's not good, hopefully only a bug in OpenVR that gets fixed soon.

ChristophHaag commented 7 years ago

I haven't investigated the qt error a lot. Something about the xcb backend not being found, which apparently means that the qt prefix / path was changed by the config file somehow.

No, I mean the Y axis of the movement in space. When you point to the bottom, of the settings window, you can see a button at the top getting the focus and when you point to the top of the settings window, a button on the bottom gets the focus. Maybe it's another of those D3D vs OpenGL/Vulkan coordinate system mismatches.

matzman666 commented 7 years ago

I haven't investigated the qt error a lot. Something about the xcb backend not being found, which apparently means that the qt prefix / path was changed by the config file somehow.

Ah, makes sense. The Windows version is self-contained, and the qt.conf reflects that. On Linux Qt is usually globally installed, so searching for Qt files in the application directory will not work.

No, I mean the Y axis of the movement in space. When you point to the bottom, of the settings window, you can see a button at the top getting the focus ...

Yeah, sounds like a different coordinate system convention. That sucks, but is not a show-stopper. I just need to modify this line here and everything should be ok.

ChristophHaag commented 7 years ago

Thanks for the hint, I had scrolled a bit through the source code, but hadn't seen the right place.

I ended up just printing the data and looking at the values to see how it works. (0,0) is at the bottom left of the window, so the fix/workaround is easy:

https://github.com/ChristophHaag/OpenVR-AdvancedSettings/commit/aefaaeb6fe94c2d06394ff048819fe851b23cbe4

With that the UI fully works and a couple of the settings I tried work too. Cool!

PersonaFoundation commented 7 years ago

Hi, I'd like to control the users XYZ translation position and Y rotation with a 3D Connexion Space Navigator 3D mouse in real-time. This would be a great way to control flying around a VR game or app space with this controller and to explore the environment. Can the Advanced setting parameters for these inputs be modified externally? Can someone make a (win 10-64) exe version for me to test?

ChristophHaag commented 7 years ago

Any plans? I compile tested my crude patches https://github.com/ChristophHaag/OpenVR-AdvancedSettings/commits/2.4 and they still make it compile. If you don't have the time, maybe you could make the basics that already work cross platform work with some ifdefs?

ChristophHaag commented 7 years ago

Only compile tested: https://github.com/ChristophHaag/OpenVR-AdvancedSettings/commits/2.5 Same crude commits applied clean, but I've needed to include math.h for NAN and isnan().

ChristophHaag commented 7 years ago

Okay, tested it. The qt.conf is still a mystery to me and it seems I need to delete it. Another mystery to me is how qml does imports. I tried to google and played around with it for the better part of an hour. In the end the one thing that makes it work is inserting an import with the absolute path of the qml dir into mainwidget.qml, like

import "file:/home/chris/oldhome/build/OpenVR-AdvancedSettings/bin/win64/res/qml"

With that, OpenVR-AdvancedSettings works.

JaneSmith commented 6 years ago

Has there been any more progress on this? With the new Steam Play (Proton), it's now possible to play many Windows games on Linux - including many VR games - so there's more attention on Linux gaming now than ever.

silelmot commented 6 years ago

Would be very interested in this also.

fr4nk3n5731n commented 5 years ago

Linux support would be highly appreciated.

alentoghostflame commented 5 years ago

Built binaries for Linux would be cool.

jcc10 commented 4 years ago

While there are still some issues (audio being the key one) (See This Issue for details.)

There are app images (similar to a .deb if you haven't seen it before) HERE.