**** Cyborg Central ****

Old Androids Never Die, They Just Have A Few Screws Loose

Linus Trinus

November 27, 2020


I've been playing with VR and ran across LinusTrinus, a somewhat-raw but quite functional bit of code that allows an Android phone with the Trinus VR client app to connect to Linux to make it into a SteamVR-compatible 3DOF headset. While it does not allow movement tracking, and only rotation, it is sufficient for a subset of SteamVR games.

The code isn't very well documented, so for anyone who may want to try to use it, here's a little outline of how it works:

  • The Trinus app on the phone is a client. It sends rotation information to the server on Linux, and displays forwarded graphics on the phone screen.
  • The LinusTrinus server on the computer is essentially a bridge between a slightly-tweaked SteamVR sample driver, and the Trinus client. Most importantly, it uses ffmpeg to copy an area of the screen directly to the Trinus app.
  • The slightly-tweaked sample SteamVR driver receives the rotation data from LinusTrinus and outputs the VR view in a standard, but frameless, window displayed on the desktop.

There are three issues a new user will run into quite quickly:

  • If you don't build the sample SteamVR driver in the subfolder first, the app will appear to do nothing, and SteamVR won't even start.
  • If you don't fix the ffmpeg command in the server so it looks at the correct VT display for your distro, you'll just get a black screen in Trinus, even though the on-screen window will appear to work.
  • If the on-screen window gets obscured (say, by the VR app's window), the video will get screwed up. This can be easily fixed by clicking in the VR output, typing ALT+SPACE, then selecting "Always On Top" from the GNOME Shell pop-up.

I've fixed the first two in my fork of the LinusTrinus repo, and was able to get it to work, but performance is not so great.


Categorized as: Android | Games | Linux | Steam | VR


11 Comments

  1. ItsJustSomeDude says:

    Hey! This looks really promising. I had tried LinusTrinus in the past, but didn't really get anywhere with it. I am hoping that this will work better than last time I tried. One question I have, does this use Trinus CardBoard VR, or just Trinus VR (the daydream one)?

    • BroWren says:

      You'll want to use the Cardboard version. The free one should be good enough for testing it out. :)

      • ItsJustSomeDude says:

        Ok, I was able to get it to link with my phone and show the upper left corner of my screen. However, it does not connect with SteamVR at all. I ran `make` in the main directory, and it failed, saying that it could not find `openvr_driver.h`. I then downloaded it from the Valve OpenVR Git repository and placed it in the `samples` folder. Now, it gives the following error:

        ```
        CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
        Please set them or make sure they are set and tested correctly in the CMake files:
        OPENVR_LIBRARIES
        linked by target "driver_linus_trinus" in directory /home/matthias/Downloads/LinusTrinus2/LinusTrinus/samples/driver_linus_trinus

        -- Generating done
        CMake Generate step failed. Build files cannot be regenerated correctly.

        ```

        I know I am missing something. Do I need to link the OpenVR SDK somewhere? And if so, how?

        Thank you!

        • BroWren says:

          Yep, you probably need to install the OpenVR development package. On Ubuntu it's libopenvr-dev. You might also need to install libopenvr-api1 to install the libraries.

          Hope that helps!

  2. Genos says:

    Really Thank you man, this was awesome! I was lost beacuse of the missing documentation, but this site (With a pretty cool design btw) help me a lot. Thanks again :)

  3. Alexey says:

    The smartphone has only a black screen with a splitter and cursor. SteamVR of movement tracks correctly. Window with a stereopair in the foreground. How can I test the ffmpeg command?

    • BroWren says:

      The ffmpeg command is generated and run by frame_generator.py - you can check in the log to see what it generated and tried to run, and to change the settings you'll want to modify the params variable to suit your needs.

  4. ayaan hussain says:

    thanks a lot this helped me <:)

  5. Gran aporte... Gracias Saludos

  6. Eres un genio... Gracias Saludos

Leave a Reply

Your email address will not be published. Required fields are marked *