Chromium/Electron Applications Hang on Launch on GNOME Wayland for Nvidia Jetson Orin Nano

Issue Overview

Users of the Nvidia Jetson Orin Nano development board are experiencing issues with Chromium and Electron-based applications hanging on launch when using GNOME Wayland. This problem does not occur on the default GNOME Xorg environment or on other standard GNOME Wayland systems, such as those using AMD MESA on x86_64 desktops. The issue is specifically observed when running applications like GitHub Desktop or Electron Fiddle, which fail to start properly under GNOME Wayland.

Possible Causes

  1. GPU Driver Compatibility: The Nvidia GPU drivers may not be fully compatible with Wayland, causing issues with Chromium-based applications.

  2. Vulkan Backend Configuration: Chromium defaults to using the Vulkan backend, while Electron applications default to OpenGL with Vulkan disabled, leading to different behaviors.

  3. Sandboxing Issues: The sandboxing mechanism in Chromium/Electron applications may be preventing proper access to Nvidia OpenGL drivers when Vulkan is disabled.

  4. Snap Package Limitations: For snap-packaged applications, there are complex issues related to accessing host system userspace libraries, including Nvidia drivers.

  5. Symlink and File Access Problems: Broken symlinks and restricted file access within snap containers may prevent proper loading of Nvidia driver files.

  6. AppArmor Restrictions: AppArmor profiles may be limiting access to necessary Nvidia libraries and folders.

Troubleshooting Steps, Solutions & Fixes

  1. Enable Wayland and Configure GNOME Settings:

    • Edit /etc/gdm3/custom.conf and set WaylandEnable=true
    • Stop GDM: sudo systemctl stop gdm
    • Kill X: sudo pkill X
    • Configure GNOME settings:
      gsettings set org.gnome.mutter experimental-features "[\"kms-modifiers\"]"
      gsettings set org.gnome.desktop.lockdown disable-lock-screen true
      gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false
      gsettings set org.gnome.desktop.screensaver lock-enabled false
      gsettings set org.gnome.desktop.session idle-delay 0
      gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
      
    • Load Nvidia DRM module: sudo modprobe nvidia_drm modeset=1
    • Start GDM: sudo systemctl start gdm
  2. Force Vulkan Usage for Electron Applications:
    When launching Electron applications, enable the Vulkan feature:

    electron-fiddle --enable-features=Vulkan
    

    or

    ~/.config/Electron\ Fiddle/electron-bin/current/electron chrome://gpu --enable-features=Vulkan
    
  3. Investigate Vulkan Configuration:
    Check Vulkan configuration and GPU information:

    ~/.config/Electron\ Fiddle/electron-bin/current/electron chrome://gpu --enable-features=Vulkan
    
  4. Fix Symlink Issues (for Snap Packages):

    • Identify broken symlinks in Vulkan configuration:
      ls -l /var/lib/snapd/hostfs/etc/vulkan/icd.d/nvidia_icd.json
      
    • If broken, consider creating a direct copy of the file instead of a symlink
  5. Modify Snap Configurations:

    • Update the opengl interface in snapd to include GLX and necessary Nvidia folders
    • Ensure proper mounting of Nvidia library folders within snap containers
    • Adjust AppArmor profiles to allow access to required Nvidia libraries
  6. Use Flatpak as an Alternative:
    Consider using Flatpak for packaging applications, as it provides easier GPU driver support:

    • Use the provided JSON configuration for Nvidia drivers in Flatpak
    • Apply necessary overrides:
      sudo flatpak override --device=all
      flatpak override --user --device=all
      
  7. Set Vulkan ICD Environment Variable:
    Before running Vulkan applications, set:

    export VK_ICD_FILENAMES=/usr/lib/aarch64-linux-gnu/nvidia/nvidia_icd.json
    
  8. Monitor Bug Reports and Updates:
    Keep track of the ongoing investigation by the Chromium team:

  9. Consider Using GNOME Xorg:
    As a temporary workaround, consider using the default GNOME Xorg environment instead of Wayland until the issue is resolved.

These steps should help in troubleshooting and potentially resolving the issue with Chromium/Electron applications on GNOME Wayland for the Nvidia Jetson Orin Nano. However, some aspects of this problem may require further investigation and updates from Nvidia or the Chromium development team.

Similar Posts

Leave a Reply

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