[bug] app window fails under Linux with Nvidia gpu
Describe the bug
Hi, under Arch Linux, since today I hit an issue where the window app open with a blank screen and this message is spamming the terminal
AcceleratedSurfaceDMABuf was unable to construct a complete framebuffer
AcceleratedSurfaceDMABuf was unable to construct a complete framebuffer
…
journal logs:
[drm:drm_new_set_master] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Note: My machine is NVIDIA gpu equipped, installed driver is 550.67-3
If I remove nvidia_drm.modeset=1 from kernel params, I get other logs
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 2524x827: Permission denied
Based on the logs I tried with KMS disabled completely (removing nvidia kernel modules and regenerating the initramfs) but without any success
Reproduction
npm create tauri-app@latest then cargo tauri dev (or npm run tauri dev)
Expected behavior
No response
Full tauri info output
[✔] Environment
- OS: Arch Linux Unknown X64
✔ webkit2gtk-4.0: 2.44.0
✔ rsvg2: 2.58.0
✔ rustc: 1.77.1 (7cf61ebde 2024-03-27)
✔ cargo: 1.77.1 (e52e36006 2024-03-26)
✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
- node: 20.11.0
- npm: 10.2.4
- bun: 1.0.7
[-] Packages
- tauri [RUST]: 1.6.0
- tauri-build [RUST]: 1.5.1
- wry [RUST]: 0.24.7
- tao [RUST]: 0.16.5
- tauri-cli [RUST]: 1.5.11
- @tauri-apps/api [NPM]: 1.5.3
- @tauri-apps/cli [NPM]: 1.5.11
[-] App
- build-type: bundle
- CSP: unset
- distDir: ../dist
- devPath: http://localhost:1420/
- framework: React
- bundler: Vite
Stack trace
No response
Additional context
No response
Oddly enough, I'm having similar problems trying to use https://github.com/tryphotino/photino.NET under Fedora (that's how I found this issue), both utilize gtkwebview so I'm guessing this might be a problem beyond Tauri/Photino.
Yup, as I thought, it's an issue with webkit2gtk being broken under 2.44 with Nvidia GPUs (https://gitlab.archlinux.org/archlinux/packaging/packages/webkit2gtk/-/issues/1)
For your local dev environment, you can add WEBKIT_DISABLE_DMABUF_RENDERER=1 in /etc/environment for the time beeing.
Hi, thanks for the info @LauraWebdev !
Yup, as I thought, it's an issue with webkit2gtk being broken under 2.44 with Nvidia GPUs (https://gitlab.archlinux.org/archlinux/packaging/packages/webkit2gtk/-/issues/1)
For your local dev environment, you can add
WEBKIT_DISABLE_DMABUF_RENDERER=1in/etc/environmentfor the time beeing.
Thank you, this also fixed other apps such as yelp
Hi there, thanks that WEBKIT_DISABLE_DMABUF_RENDERER=1 does worked, my tauri apps works now. But unfortunately, my app becomes very slow, it takes 1 secs or even more every operation. If there's a complex animation based on JavaScript, my app looks like a PowerPoint lol. It's odd that this only happens when pnpm tauri dev, it works fine after I publish my package to AUR and install it.
I'm on Arch Linux with NVIDIA RTX 4060 laptop.
Any response will be very appreciate.
This doesn't really make sense to me unless your frontend is somehow super unoptimized in dev but for "simple" css statements that can't really be either. The webengine doesn't have a dev and release mode and should have the same performance in dev and prod.
Really weird...
Hi there, thanks that
WEBKIT_DISABLE_DMABUF_RENDERER=1does worked, my tauri apps works now. But unfortunately, my app becomes very slow, it takes 1 secs or even more every operation. If there's a complex animation based on JavaScript, my app looks like a PowerPoint lol. It's odd that this only happens whenpnpm tauri dev, it works fine after I publish my package to AUR and install it.I'm on Arch Linux with NVIDIA RTX 4060 laptop.
Any response will be very appreciate.
Hello,
I also need to develop my app using (WEBKIT_DISABLE_DMABUF_RENDERER=1) on my linux.
I'm also expriencing very slow app on my app page (using solidjs) where there 10 json (with like 30 member each) being processed then rendred on cards. The other page where there is no data procesed work fine. I doubt it is an optimization problem as the processing is very simple json with very simple jsx, but I could be wrong.
The wierd thing is that the slow part of the page is static between all of them (it is the transition I have from the side bar). It stay the same and only the content change, so when I'm on the page that inject big content, the transition become very slow, but the content is rendred fairly smoothly and I can move trough it very quickly. The transition being noticibly slow is what made think it is because of (WEBKIT_DISABLE_DMABUF_RENDERER=1) as first tought.
I also removed the "invoke" part of my code to be able to run the app on my browser, and imediatly the transition went to become very fast and smooth as it should be while it stayed laggy and slow on the app.
I have run OpenSuse Tumbleweed on an i9 (gen 9) laptop cpu with a desktop RTX 3060 (12G) and 64GB RAM.
Edit: This happen on dev and prod mode for me.
I noticed some apps started working correctly for me without this environment variable... Additionally, setting WEBKIT_DISABLE_DMABUF_RENDERER=1 leads to significant performance issues, causing lag and inertia.
Yeah...And it works fine on wayland with nvidia but failed on x11.