modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
1k stars 188 forks source link

Blank screen upon launching, GNOME 46.1 (NVIDIA+X11) #1186

Open carterprince opened 6 months ago

carterprince commented 6 months ago

Describe the bug

Blank screen upon starting the app.

GPU is NVIDIA, DE is GNOME 46.1 on X11, installed via the Flatpak (from GNOME Software).

image

Error log:

~ $ flatpak run com.modrinth.ModrinthApp
Gtk-Message: 12:12:35.039: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:12:35.040: Failed to load module "canberra-gtk-module"

** (modrinth-app-wrapped:2): WARNING **: 12:12:35.174: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
Gtk-Message: 12:12:35.238: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:12:35.241: Failed to load module "canberra-gtk-module"
src/nv_gbm.c:288: GBM-DRV error (nv_gbm_create_device_native): nv_common_gbm_create_device failed (ret=-1)

KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 1280x800: Permission denied

Running with root privileges produces the same output.

Appimage downloaded from https://modrinth.com/app produces a similar error, but instead of a blank screen it just crashes:

~/Downloads $ chmod +x modrinth-app_0.7.1_amd64.AppImage && RUST_BACKTRACE=full ./modrinth-app_0.7.1_amd64.AppImage 
src/nv_gbm.c:288: GBM-DRV error (nv_gbm_create_device_native): nv_common_gbm_create_device failed (ret=-1)

** (modrinth-app:108966): WARNING **: 12:22:41.206: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
thread '<unnamed>' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-plugin-deep-link-0.1.2/src/linux.rs:94:49:
Can't create listener: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
stack backtrace:
   0:     0x55f0f49413b9 - <unknown>
   1:     0x55f0f4702e40 - <unknown>
   2:     0x55f0f490b2ce - <unknown>
   3:     0x55f0f4944d0e - <unknown>
   4:     0x55f0f4944635 - <unknown>
   5:     0x55f0f494552e - <unknown>
   6:     0x55f0f4945070 - <unknown>
   7:     0x55f0f4944fc6 - <unknown>
   8:     0x55f0f4944fb3 - <unknown>
   9:     0x55f0f44115e4 - <unknown>
  10:     0x55f0f4411b52 - <unknown>
  11:     0x55f0f447ac5e - <unknown>
  12:     0x55f0f448c86a - <unknown>
  13:     0x55f0f4947a35 - <unknown>
  14:     0x7efee11bbded - <unknown>
  15:     0x7efee123f0dc - <unknown>
  16:                0x0 - <unknown>
Aborted (core dumped)

Tried to install from the AUR (modrinth-app-git), but it produces a seemingly unrelated error about yarn and pnpm.

Steps to reproduce

  1. Install the app on GNOME 46.1 (NVIDIA+X11), AppImage or Flatpak.
  2. Try to launch the app.

Expected behavior

App displaying some UI

System information

OS: Arch Linux (6.8.9-arch1-2) DE: GNOME 46.1 (X11 display server) App Version: v0.7.1 (from Flathub) GPU: RTX 3070 Ti, Proprietary NVIDIA Driver (nvidia-550.78-2)

Additional context

No response

carterprince commented 6 months ago

Running with WEBKIT_DISABLE_DMABUF_RENDERER=1 or __NV_PRIME_RENDER_OFFLOAD=1 fixes the Flatpak.

So running

flatpak override --user --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 com.modrinth.ModrinthApp

will make the variable permanent for the Flatpak.

Putting

export WEBKIT_DISABLE_DMABUF_RENDERER=1

in ~/.bash_profile or ~/.profile or wherever you generally set environment variables makes it apply to all applications.

The AppImage still crashes.

KristianSvanholm commented 4 months ago

Same issue on nixos, however the ~/.profile fix does not work for me :/

** (modrinth-app:42571): WARNING **: 22:58:42.737: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
Could not determine the accessibility bus address
thread '<unnamed>' panicked at /build/cargo-vendor-dir/tauri-plugin-deep-link-0.1.2/src/linux.rs:94:49:
Can't create listener: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

Setting RUST_BACKTRACE does nothing, as seen in #1198.

System

OS: NixOS 24.05.20240711.a046c12 (Uakari) x86_64 DE: i3 App version: v0.7.1 (from nixpkgs) GPU: RTX3070, Proprietary NVIDIA Driver (550.78)

carterprince commented 4 months ago

(modrinth-app:42571): WARNING : 22:58:42.737: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing. Could not determine the accessibility bus address thread '' panicked at /build/cargo-vendor-dir/tauri-plugin-deep-link-0.1.2/src/linux.rs:94:49: Can't create listener: Os { code: 98, kind: AddrInUse, message: "Address already in use" } note: run with RUST_BACKTRACE=1 environment variable to display a backtrace Aborted (core dumped)

@KristianSvanholm Because you're using i3, you should try putting the export line in ~/.bash_profile and restarting. i3 may not read ~/.profile while GNOME and other DEs do. I've edited the text of my solution to account for this.

KristianSvanholm commented 4 months ago

Environment variable is set, but still doesn't work for me :P Might be some nixos shenanigans, not quite sure ...

getchoo commented 4 months ago

This is an issue with webkitgtk across multiple tauri apps. NVIDIA's 555 driver is know to fix it in some cases

Same issue on nixos, however the ~/.profile fix does not work for me :/

** (modrinth-app:42571): WARNING **: 22:58:42.737: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
Could not determine the accessibility bus address
thread '<unnamed>' panicked at /build/cargo-vendor-dir/tauri-plugin-deep-link-0.1.2/src/linux.rs:94:49:
Can't create listener: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

Setting RUST_BACKTRACE does nothing, as seen in #1198.

System

OS: NixOS 24.05.20240711.a046c12 (Uakari) x86_64 DE: i3 App version: v0.7.1 (from nixpkgs) GPU: RTX3070, Proprietary NVIDIA Driver (550.78)

This is a separate issue (https://github.com/modrinth/code/issues/1043). Try removing /tmp/com.modrinth.theseus-deep-link.sock and launching it again (along with updating your drivers)