Search Unity

Bug Unity Hub 3.0 is broken on Linux Wayland (NVIDIA GBM)

Discussion in 'Unity Hub' started by NoTuxNoBux, Jan 24, 2022.

  1. NoTuxNoBux

    NoTuxNoBux

    Joined:
    Oct 2, 2020
    Posts:
    34
    When starting UnityHub 3.0 on Wayland, it seems to correctly show the login screen. After logging in, however, I just get a blank window (see attachment) when using GNOME Wayland with the official NVIDIA driver (using GBM as back end).

    The hub works fine on the, older, X11 GNOME, though. It's strange that the hub displays this behaviour on Wayland, since applications that don't (use a framework that) support(s) Wayland should default to XWayland, which is (simplified a bit) also a mini-version of the same X11 server running.

    No notable errors seem to be logged.

    Specific system details:
    • Kernel: 5.16.2
    • Distribution: Arch Linux x86-64
    • Graphics Driver: NVIDIA 495.46 (proprietary driver)
    • Desktop environment: GNOME 41.3 (lower versions don't default to GBM on NVIDIA Wayland, but use EGLStreams instead)
    • Kernel Options: nvidia-drm.modeset=1 (required to be able to use Wayland on NVIDIA proprietary driver)
     

    Attached Files:

    Last edited: Jan 27, 2022
    benjmitchell likes this.
  2. rowantran

    rowantran

    Joined:
    Jan 1, 2022
    Posts:
    2
    Just wanted to confirm that I'm experiencing the same issue, both with GNOME Wayland and Sway on the proprietary NVIDIA driver. It runs fine in Sway on my Intel-graphics laptop, so it seems like it's just the combination of NVIDIA/Wayland/UnityHub that's broken.

    Hope to see a fix soon! (and hopefully full Wayland support eventually)
     
    NoTuxNoBux likes this.
  3. NoTuxNoBux

    NoTuxNoBux

    Joined:
    Oct 2, 2020
    Posts:
    34
    I tried again yesterday with the new 510.47.03 driver, and noticed that I do see some errors in the journal (could have missed them last time):

    Code (CSharp):
    1. libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
    2.  
    3. Error: Error: ENOENT: no such file or directory, open '/opt/unityhub/resources/app-update.yml'
    The libva error might be related, since if it's trying to force hardware acceleration by some means through VA-API, it could be failing since VA-API on the NVIDIA proprietary driver has historically not been great; usually it is backed by VDPAU, which is deprecated (NVDEC replaced it, but there is only an unofficial and very recent NVDEC back end for VA-API), and it is possible that it doesn't work on Wayland at all.

    I'll try to test if uninstalling the VDPAU back end has any effect.
     
  4. NoTuxNoBux

    NoTuxNoBux

    Joined:
    Oct 2, 2020
    Posts:
    34
    Reporting back on this, uninstalling the VDPAU driver didn't work, but I did figure out that
    vainfo
    reports the same error.
    LIBVA_DRIVER_NAME=vdpau vainfo
    with the VDPAU back end installed also doesn't work in this setup, so I'm assuming that VDPAU is broken on Wayland GBM.

    However, what did work was using the experimental unofficial NVDEC driver and starting with
    LIBVA_DRIVER_NAME=nvidia unityhub
    .

    This is still partially a Unity Hub issue, I think, though - I don't think it's safe to assume that hardware acceleration through VA-API is available everywhere.
     
  5. rowantran

    rowantran

    Joined:
    Jan 1, 2022
    Posts:
    2
    Good detective work, thanks for sharing. I also found that Discord failed to launch with the same libva error, so it might be an Electron issue.
     
  6. Lucifer711

    Lucifer711

    Joined:
    Jul 28, 2017
    Posts:
    7
    Btw that also is fixed when you launch it with
    ```LIBVA_DRIVER_NAME=nvidia discord```
     
  7. TheRealMajorGonzo

    TheRealMajorGonzo

    Joined:
    May 12, 2018
    Posts:
    12
    Was having this issue as well, but I have an AMD video card, so I tried:
    LIBVA_DRIVER_NAME=amdgpu unityhub
    and this eliminated the driver error for me. Thanks
     
  8. RandomRanger

    RandomRanger

    Joined:
    Mar 2, 2018
    Posts:
    1
    I'm also having this issue, can't get UnityHub to show anything other than a black screen. Fresh install, never even logged in.

    OS: Pop!_OS 22.04 LTS
    Device: Razer Blade 15 Base Model _Early 2021_ - RZ09-0369
    GPU: RTX 3070 (Laptop)
    Gnome Version: 42.2
    Gpu driver: nvidia 5.15

    I haven't been able to work around it yet.
    I've tried running the command
    LIBVA_DRIVER_NAME=iHD unityhub (while running in iGPU only mode)
    LIBVA_DRIVER_NAME=nvidia unityhub (I don't seem to have an nvidia dri)

    And even tried running it on both Cinnamon and LXQt
     
    Last edited: Jul 23, 2022
  9. NoTuxNoBux

    NoTuxNoBux

    Joined:
    Oct 2, 2020
    Posts:
    34
    For completeness' sake, the
    nvidia
    driver originates from the unofficial nvidia-vaapi-driver package.