wheaney / decky-XRGaming

Decky plugin to support installing and configuring Breezy Desktop on-the-fly
https://github.com/wheaney/breezy-desktop
GNU General Public License v3.0
91 stars 1 forks source link

Xreal Air 2 #2

Closed t-hug closed 10 months ago

t-hug commented 1 year ago

Current version does nothing for the Xreal Air 2, can support for this be added?

wheaney commented 1 year ago

It probably can, but I don't have this hardware and it's probably going to take some reverse-engineering from the community before support can be added.

t-hug commented 1 year ago

Is there a way i could help in maybe providing data you might need and guide me how.

On Thu, 12 Oct 2023, 2:19 am Wayne Heaney, @.***> wrote:

It probably can, but I don't have this hardware and it's probably going to take some reverse-engineering from the community before support can be added.

— Reply to this email directly, view it on GitHub https://github.com/wheaney/decky-xrealAir/issues/2#issuecomment-1757936594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS6RMBO7MUT67OCUWCTNMW3X622IVANCNFSM6AAAAAA53OTU4I . You are receiving this because you authored the thread.Message ID: @.***>

wheaney commented 1 year ago

It might be as easy as just updating the vendor/product IDs since it's probably registered as a new USB device. If they haven't changed the underlying communication protocol with the device since the Air 2s are mostly aesthetic changes, then that might be the only thing needed.

Can you help me out by plugging in your glasses, and then pasting the output of lsusb (from a terminal) here?

NitrOP7674 commented 11 months ago

Not OP, but interested in this project as a SD+Air2 owner. From my macbook:

        XREAL Air 2:

          Product ID: 0x0428
          Vendor ID: 0x3318
          Version: 0.01
          Serial Number: A00020:49:25
          Speed: Up to 12 Mb/s
          Manufacturer: XREAL
          Location ID: 0x14300000 / 19
          Current Available (mA): 500
          Current Required (mA): 100
          Extra Operating Current (mA): 0

Hope that helps; let me know if you need any more info.

wheaney commented 11 months ago

Perfect, thanks!

wheaney commented 11 months ago

Edit: These instructions are no longer relevant, read the rest of the thread.

@NitrOP7674 This is a total shot in the dark, but if you want to try out this version of the driver that's only been tweaked to look for the new USB vendor/product IDs you provided, it may just work if XREAL hasn't also updated the structure of the packets that the glasses send.

Here's what to do:

  1. Download this driver binary with just the vendor/product IDs changed.
    • If you've downloaded any of these binaries before (you probably haven't unless you manually installed the driver at some point), make sure you remove them from your Downloads directory first, otherwise this may download with a (2) appended to the file name.
  2. Download the driver setup script (this is the script that's already public, no changes)
  3. From a terminal (e.g. Konsole) in Desktop Mode, set the execute flag on the script and run it (this assumes that your downloads are going to your Downloads directory, change the paths if not):
    • chmod +x /home/deck/Downloads/xreal_driver_setup
    • sudo /home/deck/Downloads/xreal_driver_setup /home/deck/Downloads/xrealAirLinuxDriver.tar.gz
  4. Restart your deck.

If you can get anything to work (simplest test would be Mouse mode) then that means it works and it'll be super easy to add XREAL Air 2 support.

NitrOP7674 commented 11 months ago

It works!

I don't have a baseline to compare it to (I don't own air 1s and have never used your plugin before), but the screen is pretty shaky by default in virtual display mode. If I set the movement lookahead two notches below the max, it seems like the best tradeoff to me. The screen still moves around a decent amount, but it's not as jumpy, and it mostly keeps up with fast movements while not freaking out during slow movements. At 1 lower, it doesn't keep up with quick movements, and at 1 higher, it gets too jumpy (this setting feels the same as "default" to me).

wheaney commented 11 months ago

Wow, that's great news. I'd recommend reading through the "screen shaking" help section to see if that helps remedy any of the shaking you're seeing.

NitrOP7674 commented 11 months ago

Thanks, I hadn't seen that section before. However, it looks like my audio is set to the airs and sound is coming through them, so I don't think that's it. My only comparison point is the beam, which keeps the screen very well pegged to the same virtual place in body anchor mode without any noticeable jitter. It seems like there's a lot of other constraints in place when doing it natively (and doesn't overheat like the beam will), so it's probably too much to hope that it works just as well without the beam.

wheaney commented 11 months ago

I think it's possible to get close to what the BEAM provides. I expect that a solution that captures the whole screen (not just vulkan games) will allow me to fix the framerate at 60fps or higher. Try a game that allows you to hit a high FPS and it should be a lot more stable and less jittery.

wheaney commented 11 months ago

Edit: These instructions are no longer relevant, read the rest of the thread.

I've pushed an updated release of the driver that includes XREAL Air 2 support. It's not merged all the way up to breezy or the decky plugin yet. For now you can install breezy or the plugin, and then do the following:

  1. Download the driver setup script
  2. From a terminal (e.g. Konsole) in Desktop Mode, set the execute flag on the script and run it (this assumes that your downloads are going to your Downloads directory, change the paths if not): chmod +x /home/deck/Downloads/xreal_driver_setup sudo /home/deck/Downloads/xreal_driver_setup
wheaney commented 11 months ago

@NitrOP7674 Do you mind re-checking with the latest setup instructions? The first version I had you test was just a quick hotfix to the code, but this is a release candidate that will allow both the Air 1 and 2 devices to be detected. I've confirmed it works with my Air 1s so now I just need a successful Air 2 test before I feel comfortable pushing it out.

jreggett commented 11 months ago

Just bought Xreal Air 2, just found this thread, followed your instructions (bad at all things computer) AND....it works bro. Playing Elden Ring right now, driving Torrent around with my head. Beautiful. Gonna send you money, you genius, you.

wheaney commented 11 months ago

@jreggett Sweet! Thanks for testing it out for me.

jreggett commented 11 months ago

Sent you a couple bucks, man. It's not much but I appreciate what you are doing. Hope you keep making cool stuff.

wheaney commented 11 months ago

I've pushed this out to Breezy now. Anyone still wanting to test this can just follow the Breezy manual installation steps now.

Ragunator commented 11 months ago

Awesome, just tested through Breezy and it is working on my Air 2. Was getting a virtual display on my games that use Vulkan.

sustinjimmons commented 11 months ago

Hello! Any updates on when it may be added to decky? Or would decky controls work if install from decky, then run the breezy installer. Having the option to turn it on and off in game mode is super nice. Thanks for all of your work!

wheaney commented 11 months ago

It'll go out to decky within the next week probably, just waiting to see how many changes I can bundle in so I don't have multiple updates going out. In the meantime, you can do it just as you described: install the plugin, then run the manual installation as you already did. Then you'll be able to use the plugin controls.

wheaney commented 11 months ago

This pull request for the latest version of the plugin includes XREAL Air 2 support.

Anyone on this thread: let me know if you're willing to help test/approve this PR after it gets through review and into the testing store.

wheaney commented 10 months ago

XREAL Air 2 and Pro support have released. Closing this.