Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] app window fails under Linux with Nvidia gpu #9304

Open
doums opened this issue Mar 29, 2024 · 6 comments
Open

[bug] app window fails under Linux with Nvidia gpu #9304

doums opened this issue Mar 29, 2024 · 6 comments
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug

Comments

@doums
Copy link

doums commented Mar 29, 2024

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

@doums doums added status: needs triage This issue needs to triage, applied to new issues type: bug labels Mar 29, 2024
@doums doums changed the title [bug] AcceleratedSurfaceDMABuf was unable to construct a complete framebuffer [bug] app window is failing under Linux with Nvidia gpu Mar 29, 2024
@doums doums changed the title [bug] app window is failing under Linux with Nvidia gpu [bug] app window fails under Linux with Nvidia gpu Mar 29, 2024
@FabianLars FabianLars added status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes platform: Linux labels Mar 29, 2024
@LauraWebdev
Copy link

LauraWebdev commented Mar 30, 2024

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.

@LauraWebdev
Copy link

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.

@doums
Copy link
Author

doums commented Mar 30, 2024

Hi, thanks for the info @LauraWebdev !

@ssrublev
Copy link

ssrublev commented Jun 4, 2024

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.

Thank you, this also fixed other apps such as yelp

@fu050409
Copy link
Contributor

fu050409 commented Nov 20, 2024

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.

@FabianLars
Copy link
Member

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug
Projects
None yet
Development

No branches or pull requests

5 participants