wheaney / breezy-desktop

XR virtual workspace library for Linux
GNU General Public License v3.0
215 stars 21 forks source link

xreal air 2 ultra support #37

Closed HochspannungESH closed 1 month ago

HochspannungESH commented 1 month ago

Hi, thanks a lot for your extraordinary work. I have some trouble to get my setup running. My XR-Glasses are the xreal air ultras. My machine is running on Linux Mint 21.3 x86_64 with GNOME 42.9 The setup skript runs throug without any issues. The verify scripts too. When I'm startting breezy-desktop it says that there is no XR-Device. systemctl --user enable --now xr-driver.service gives: Failed to enable unit: Unit file xr-driver.service does not exist.

cat ~/.local/state/xr_driver/driver.log gives: Driver is disabled Using hardware id 0958e768d2364df43fc4cb122f1bd53b1fbf3167d1a89c9fbadb2db951a6a655 Feature productivity_basic granted. Starting up XR driver

the logfile in ~/.local/state/breezy_gnome/logs/ui/breezy_desktop.log is empty do you have any advice for me to get the things done?

wheaney commented 1 month ago

Ultras aren't supported yet. But I'll leave this issue open to track it.

gboyce1967 commented 1 month ago

I suspect youll be getting a few more requests very soon since we are all receiving our XReal Air 2 Ultras now. ;)

wheaney commented 1 month ago

I have a test build out that tries to add IMU-only support for the Ultras. Here's how to test (only x86_64 for now):

  1. Download the driver setup and set the execute flag on it: chmod +x ~/Downloads/xr_driver_setup
  2. Run it with the dev tag: ~/Downloads/xr_driver_setup --tag dev
  3. Enable it and set it to mouse mode (don't combine the commands):
    • xr_driver_cli -e
    • xr_driver_cli -m
  4. Plug in your glasses, wait 15-30 seconds, then move them around. If it's working, it'll move the mouse cursor. If not, attach your driver log: ~/.local/state/xr_driver/driver.log
gboyce1967 commented 1 month ago

At first I accidentally install without the "--tag dev". I uninstalled , reinstalled. The cursor doesn't move but it does look like it found the glasses.

cat ~/.local/state/xr_driver/driver.log Driver is disabled Using hardware id 32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 Feature smooth_follow granted. Feature sbs granted. Starting up XR driver Found device with vendor ID 0x3318 and product ID 0x0426 Found device with vendor ID 0x3318 and product ID 0x0426 Driver has been re-enabled Error calling shmat Driver has been re-enabled Using hardware id 32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 Feature smooth_follow granted. Feature sbs granted. Starting up XR driver Waiting for glasses Found device with vendor ID 0x3318 and product ID 0x0426 Found device with vendor ID 0x3318 and product ID 0x0426 Error calling shmat Driver has been re-enabled Using hardware id 32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 Feature smooth_follow granted. Feature sbs granted. Starting up XR driver Waiting for glasses Found device with vendor ID 0x3318 and product ID 0x0426 Found device with vendor ID 0x3318 and product ID 0x0426 Error calling shmat Driver has been re-enabled Using hardware id 32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 Feature smooth_follow granted. Feature sbs granted. Starting up XR driver Waiting for glasses Found device with vendor ID 0x3318 and product ID 0x0426 Found device with vendor ID 0x3318 and product ID 0x0426 Error calling shmat Driver has been re-enabled Using hardware id 32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 Feature smooth_follow granted. Feature sbs granted. Starting up XR driver Waiting for glasses Found device with vendor ID 0x3318 and product ID 0x0426 Found device with vendor ID 0x3318 and product ID 0x0426 Error calling shmat Driver has been re-enabled Using hardware id 32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 Feature smooth_follow granted. Feature sbs granted. Starting up XR driver Waiting for glasses Found device with vendor ID 0x3318 and product ID 0x0426 Found device with vendor ID 0x3318 and product ID 0x0426 Error calling shmat

gboyce1967 commented 1 month ago

I don't know if this will help at all but here is my syslog after plugging in the Ultras.

2024-07-31T09:42:09.714875-04:00 gary-laptop kernel: [ 1554.257887] usb 1-9.1.1: USB disconnect, device number 13 2024-07-31T09:42:09.780886-04:00 gary-laptop gsd-media-keys[7335]: Unable to get default source 2024-07-31T09:42:09.781370-04:00 gary-laptop gsd-media-keys[7335]: Unable to get default sink 2024-07-31T09:42:20.690831-04:00 gary-laptop kernel: [ 1565.230619] usb 1-9.1.1: new high-speed USB device number 14 using xhci_hcd 2024-07-31T09:42:20.790795-04:00 gary-laptop kernel: [ 1565.331262] usb 1-9.1.1: config 1 interface 8 altsetting 0 has 2 endpoint descriptors, different from the interface descriptor's value: 1 2024-07-31T09:42:20.790814-04:00 gary-laptop kernel: [ 1565.331614] usb 1-9.1.1: New USB device found, idVendor=3318, idProduct=0426, bcdDevice= 4.09 2024-07-31T09:42:20.790815-04:00 gary-laptop kernel: [ 1565.331618] usb 1-9.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 2024-07-31T09:42:20.790816-04:00 gary-laptop kernel: [ 1565.331620] usb 1-9.1.1: Product: XREAL Air 2 Ultra 2024-07-31T09:42:20.790817-04:00 gary-laptop kernel: [ 1565.331622] usb 1-9.1.1: Manufacturer: XREAL 2024-07-31T09:42:20.790818-04:00 gary-laptop kernel: [ 1565.331623] usb 1-9.1.1: SerialNumber: ZBBM5DZFMP 2024-07-31T09:42:20.798803-04:00 gary-laptop kernel: [ 1565.338603] hid-generic 0003:3318:0426.0014: hiddev0,hidraw1: USB HID v1.01 Device [XREAL XREAL Air 2 Ultra] on usb-0000:00:14.0-9.1.1/input0 2024-07-31T09:42:20.798824-04:00 gary-laptop kernel: [ 1565.339231] hid-generic 0003:3318:0426.0015: hiddev1,hidraw2: USB HID v1.01 Device [XREAL XREAL Air 2 Ultra] on usb-0000:00:14.0-9.1.1/input1 2024-07-31T09:42:20.798827-04:00 gary-laptop kernel: [ 1565.339821] hid-generic 0003:3318:0426.0016: hiddev2,hidraw3: USB HID v1.01 Device [XREAL XREAL Air 2 Ultra] on usb-0000:00:14.0-9.1.1/input2 2024-07-31T09:42:20.798828-04:00 gary-laptop kernel: [ 1565.340122] usb 1-9.1.1: Found UVC 1.00 device XREAL Air 2 Ultra (3318:0426) 2024-07-31T09:42:20.818787-04:00 gary-laptop kernel: [ 1565.359808] input: XREAL XREAL Air 2 Ultra as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.1/1-9.1.1/1-9.1.1:1.8/0003:3318:0426.0017/input/input32 2024-07-31T09:42:20.878799-04:00 gary-laptop kernel: [ 1565.418757] hid-generic 0003:3318:0426.0017: input,hidraw4: USB HID v1.01 Device [XREAL XREAL Air 2 Ultra] on usb-0000:00:14.0-9.1.1/input8 2024-07-31T09:42:20.879621-04:00 gary-laptop mtp-probe: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.1/1-9.1.1" 2024-07-31T09:42:20.879885-04:00 gary-laptop mtp-probe: bus: 1, device: 14 was not an MTP device 2024-07-31T09:42:20.952874-04:00 gary-laptop systemd[6996]: Reached target sound.target - Sound Card. 2024-07-31T09:42:20.960649-04:00 gary-laptop wireplumber[7023]: Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera 2024-07-31T09:42:21.034566-04:00 gary-laptop mtp-probe: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9.1/1-9.1.1" 2024-07-31T09:42:21.035025-04:00 gary-laptop mtp-probe: bus: 1, device: 14 was not an MTP device

wheaney commented 1 month ago

The shmat issue is a weird one to come across because that's been unchanged for a while and I've never seen anyone run into it, so I suspect you'd run into the same issue if you installed any version of the driver or breezy prior to this. You can set IPC debugging using xr_driver_cli --debug ipc, but I wonder if just restarting the machine or sudo systemctl restart xr-driver would fix this.

gboyce1967 commented 1 month ago

Cool. Thanks for the assist. It is working after restarting the driver.

wheaney commented 1 month ago

Mouse movement is working too?

gboyce1967 commented 1 month ago

Well, if the mouse staying in place as the screen moves around is what you mean, then yes. That seems right to me but this is my first pair.

wheaney commented 1 month ago

If your glasses were upright for the first 30ish seconds after plugging them in, then the mouse should be moving in the same direction as your head movements, what you're describing sounds like they're moving in the opposite direction. Try unplugging and letting them calibrate while upright and still (and facing the same direction you are).

gboyce1967 commented 1 month ago

My screen was extended with the Ultras being the primary display. After turning off the laptop display, it works properly.

wheaney commented 1 month ago

Pulled this into the driver with https://github.com/wheaney/XRLinuxDriver/pull/66. Work still needed to get this change all the way up to Decky and Breezy Desktop.

gboyce1967 commented 1 month ago

Thanks a bunch. We really appreciate your work! Is this on the front or the back burner?

wheaney commented 1 month ago

It can take a couple weeks for the decky team to review and merge my PRs, so I'd like to get it to them soon.

gboyce1967 commented 1 month ago

Awesome. Thanks for answering.

On Wed, Jul 31, 2024, 5:23 PM Wayne Heaney @.***> wrote:

It can take a couple weeks for the decky team to review and merge my PRs, so I'd like to get it to them soon.

— Reply to this email directly, view it on GitHub https://github.com/wheaney/breezy-desktop/issues/37#issuecomment-2261486077, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKGE3A2WXEN62NCZDCLVEVLZPFITPAVCNFSM6AAAAABLSHP5IGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRGQ4DMMBXG4 . You are receiving this because you commented.Message ID: @.***>

wheaney commented 1 month ago

One more thing to check if you have a moment, if you still have this version of the driver installed:

  1. Plug in your glasses
  2. Make sure the mouse is still able to move
  3. From a terminal: cat /dev/shm/xr_driver_state
  4. It should show the XREAL brand and Ultra model name. Post the full output here.
gboyce1967 commented 1 month ago

So, now the mouse doesn't seem to work even after restarting xr-driver.

cat /dev/shm/xr_driver_state heartbeat=1722466481 hardware_id=32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 device_license={"hardwareId":"32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8","tiers":{"subscriber":{"active":false,"fundsToRenew":false,"fundsNeededUSD":5,"lifetimeFundsNeededUSD":125,"fundsNeededByPeriod":{"monthly":5,"yearly":50,"lifetime":125}}},"features":{"smooth_follow":{"status":"trial","endDate":1725022425},"sbs":{"status":"trial","endDate":1725022425},"productivity_basic":{"status":"trial","endDate":1727639639}}}

cat ~/.local/state/xr_driver/driver.log Driver has been re-enabled IPC debugging has been enabled Using hardware id 32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 Feature smooth_follow granted. Feature sbs granted. Feature productivity_basic granted. Starting up XR driver Waiting for glasses

wheaney commented 1 month ago

You didn't install breezy, or the decky plugin, or any other version of the driver?

gboyce1967 commented 1 month ago

Very sorry. Yes, I did. I removed breezy and the driver and stepped back through. Mouse is working and here is the requested logging.

cat /dev/shm/xr_driver_state heartbeat=1722467745 hardware_id=32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8 device_license={"hardwareId":"32ab2870f153eb1463c9c2681a34c9feac33834b0cf08490d19b317f6f4ba4a8","tiers":{"subscriber":{"active":false,"fundsToRenew":false,"fundsNeededUSD":5,"lifetimeFundsNeededUSD":125,"fundsNeededByPeriod":{"monthly":5,"yearly":50,"lifetime":125}}},"features":{"smooth_follow":{"status":"trial","endDate":1725022425},"sbs":{"status":"trial","endDate":1725022425},"productivity_basic":{"status":"trial","endDate":1727639639}}} connected_device_brand=XREAL connected_device_model=Air 2 Ultra calibration_setup=AUTOMATIC calibration_state=CALIBRATED sbs_mode_supported=false sbs_mode_enabled=false firmware_update_recommended=false

wheaney commented 1 month ago

Beautiful, thanks! Was just making sure that sbs_mode_supported=false was set, that will prevent decky and breezy from allowing those toggles to be used.

wheaney commented 1 month ago

@gboyce1967 @HochspannungESH either of you have a Steam Deck?

Looking for deck owners to test the decky plugin version that will incorporate the Ultra support. To test:

  1. Download the v0.10.6 test binary to your deck
  2. From Konsole in Desktop Mode:
    • Enable debugging modes: xr_driver_cli --debug threads,license
    • Clear your log: truncate -s 0 ~/.local/state/xr_driver/driver.log
    • Extract the plugin: sudo -S unzip /home/deck/Downloads/decky-XRGaming-v0.10.6.zip -d /home/deck/homebrew/plugins (if it prompts you to overwrite, type A then hit Enter)
    • Restart Decky loader: sudo -S systemctl restart plugin_loader
wheaney commented 1 month ago

Decky PR for this change to go to the Decky store

gboyce1967 commented 1 month ago

Sorry man.

On Thu, Aug 1, 2024, 2:07 AM Wayne Heaney @.***> wrote:

Decky PR https://github.com/SteamDeckHomebrew/decky-plugin-database/pull/664 for this change to go to the Decky store

— Reply to this email directly, view it on GitHub https://github.com/wheaney/breezy-desktop/issues/37#issuecomment-2262116398, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKGE3A5RB6WDF6BSTB2V54TZPHGD3AVCNFSM6AAAAABLSHP5IGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRSGEYTMMZZHA . You are receiving this because you were mentioned.Message ID: @.***>

wheaney commented 1 month ago

Okay, I've also merged this into the Breezy Vulkan and Breezy GNOME builds. Can you test it there (just following the standard setup) when you have a chance?

gboyce1967 commented 1 month ago

Thanks, Do I need to change anything with the xr-driver? we had set it to debug mode earlier. I install gnome breezy and it does recognize the glasses now and give me the ability to change option, but changing the option doesn't make any difference even after logging out and back in.

wheaney commented 1 month ago

Are you on an x86_64 system, or AARCH64? GNOME 45+ or 44-? Please re-attach your driver log, plus ~/.local/state/breezy_gnome/logs/gjs/[today].log

gboyce1967 commented 1 month ago

x86_64 system: Debian Bookwork Gnome-Shell 43.9

cat ~/.local/state/breezy_gnome/logs/gjs/2024-08-01.log breezydesktop: Gnome-Shell 43.9 / gjs 1.74.2 (17402) / wayland breezydesktop: GetResourcesRemote failed: TypeError: this._backendManager is null breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Gnome-Shell 43.9 / gjs 1.74.2 (17402) / wayland breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected

wheaney commented 1 month ago

Sorry, I'll need you to add debug logging too: dconf write /com/xronlinux/BreezyDesktop/debug true

Then try to enable the effect a few more times and re-send the GJS log.

gboyce1967 commented 1 month ago

cat ~/.local/state/breezy_gnome/logs/gjs/2024-08-01.log breezydesktop: Gnome-Shell 43.9 / gjs 1.74.2 (17402) / wayland breezydesktop: GetResourcesRemote failed: TypeError: this._backendManager is null breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Gnome-Shell 43.9 / gjs 1.74.2 (17402) / wayland breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Gnome-Shell 43.9 / gjs 1.74.2 (17402) / wayland breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: Monitor change detected breezydesktop: DEBUG - BreezyDesktopExtension disable breezydesktop: DEBUG - BreezyDesktopExtension _effect_disable breezydesktop: Disabling SBS mode due to disabling effect breezydesktop: DEBUG - MonitorManager disable breezydesktop: DEBUG - BreezyDesktopExtension enable breezydesktop: DEBUG - MonitorManager enable breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found breezydesktop: DEBUG - MonitorManager _on_monitors_change breezydesktop: DEBUG - Found monitor DP-1, vendor MRG, product Air 2 Ultra, serial 0x88888800, connector DP-1, index 0 breezydesktop: DEBUG - Found monitor eDP-1, vendor AUO, product 0x106c, serial 0x00000000, connector eDP-1, index -1 breezydesktop: Monitor change detected breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension disable breezydesktop: DEBUG - BreezyDesktopExtension _effect_disable breezydesktop: Disabling SBS mode due to disabling effect breezydesktop: DEBUG - MonitorManager disable breezydesktop: DEBUG - BreezyDesktopExtension enable breezydesktop: DEBUG - MonitorManager enable breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found breezydesktop: DEBUG - MonitorManager _on_monitors_change breezydesktop: DEBUG - Found monitor DP-1, vendor MRG, product Air 2 Ultra, serial 0x88888800, connector DP-1, index 0 breezydesktop: DEBUG - Found monitor eDP-1, vendor AUO, product 0x106c, serial 0x00000000, connector eDP-1, index -1 breezydesktop: Monitor change detected breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found breezydesktop: DEBUG - MonitorManager _on_monitors_change breezydesktop: DEBUG - Found monitor eDP-1, vendor AUO, product 0x106c, serial 0x00000000, connector eDP-1, index 0 breezydesktop: Monitor change detected breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found breezydesktop: DEBUG - MonitorManager _on_monitors_change breezydesktop: DEBUG - Found monitor DP-1, vendor MRG, product Air 2 Ultra, serial 0x88888800, connector DP-1, index 0 breezydesktop: DEBUG - Found monitor eDP-1, vendor AUO, product 0x106c, serial 0x00000000, connector eDP-1, index -1 breezydesktop: Monitor change detected breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension disable breezydesktop: DEBUG - BreezyDesktopExtension _effect_disable breezydesktop: Disabling SBS mode due to disabling effect breezydesktop: DEBUG - MonitorManager disable breezydesktop: DEBUG - BreezyDesktopExtension enable breezydesktop: DEBUG - MonitorManager enable breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found breezydesktop: DEBUG - MonitorManager _on_monitors_change breezydesktop: DEBUG - Found monitor DP-1, vendor MRG, product Air 2 Ultra, serial 0x88888800, connector DP-1, index 0 breezydesktop: DEBUG - Found monitor eDP-1, vendor AUO, product 0x106c, serial 0x00000000, connector eDP-1, index -1 breezydesktop: Monitor change detected breezydesktop: DEBUG - BreezyDesktopExtension _setup breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor breezydesktop: DEBUG - BreezyDesktopExtension _find_supported_monitor - No supported monitor found breezydesktop: DEBUG - BreezyDesktopExtension _setup - Doing nothing, no supported monitor found

wheaney commented 1 month ago

Oooooh! How could I forget, I need to update the supported monitors list to include Air 2 Ultra. I'll get right back to you with an update.

gboyce1967 commented 1 month ago

HA! I've been there...

wheaney commented 1 month ago

Ok, if you re-run the breezy setup script and pray hard enough, it may work now. :smile:

gboyce1967 commented 1 month ago

Yeah Man! Very cool! Any idea when we will get support for widescreen mode? Thank you SO much for all this work.

wheaney commented 1 month ago

Absolutely no clue, unfortunately. I didn't do any of the work to reverse-engineer these devices, so I don't know how they go about figuring out the MCU side of things needed to change the glasses to SBS mode and detect if it has changed to SBS mode.

gboyce1967 commented 1 month ago

I understand. Oh well, I am still super excited to get this level of functionality! Thank you so much and nice work!!

wheaney commented 1 month ago

No problem. Let me know if anything else comes up.

HochspannungESH commented 1 month ago

Hi guys, thanks for the quick support. The system is running great. I can't understand why xreal can't manage this. Probably other priorities. Unfortunately I don't have a steam deck available either.