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

Cosmic Apps using wgpu fail with Nvidia graphics. #264

Closed
XV-02 opened this issue Jan 2, 2024 · 14 comments
Closed

Cosmic Apps using wgpu fail with Nvidia graphics. #264

XV-02 opened this issue Jan 2, 2024 · 14 comments

Comments

@XV-02
Copy link

XV-02 commented Jan 2, 2024

I stumbled on this while testing both Cosmic-Edit and Cosmic-Term, on a System76 Gaze17 and a Galp5-1650ti.

Both applications functioned as expected in Pop with Gnome sessions (both X org and Wayland) in all three graphics modes provided by system76-power - Integrated, Hybrid, and Discrete.

In a Cosmic session, the applications work as expected in Integrated graphics mode. However, in both Hybrid and Discrete mode they both cause a window to be drawn, but are totally non-responsive. The only way to close the window is to manually terminate the process.

After back-and-forth with others, it was suggested that the issue might be wgpu. When both Cosmic-Edit and Cosmic-Term were compiled with the wgpu feature disabled, they functioned without issue in Cosmic session in all graphics modes.

I'm not sure of next-steps for finding debug information, and would appreciate guidance to collect info for this issue.

@XV-02
Copy link
Author

XV-02 commented Jan 2, 2024

Testing this on a desktop with an Nvidia 1080 and running on nouveau drivers, Cosmic-Term and Cosmic-Edit were both fine, despite being compiled with the wgpu feature present.

Attempting to run Cosmic on proprietary Nvidia drivers on 10 series cards on desktops results in a thoroughly unresponsive experience, so I haven't tested Cosmic+Desktop Nvidia+Proprietary Nvidia drivers yet. That's another kettle of fish though.

Still, it suggests this might be more directly linked to Nvidia drivers.

@ids1024
Copy link
Member

ids1024 commented Jan 3, 2024

Apparently this is a known issue with wgpu on recent Nvidia drivers with Wayland. Most likely a driver bug: gfx-rs/wgpu#4775

I can reproduce it on Fedora Rawhide with Gnome Wayland.

@luccahuguet
Copy link

luccahuguet commented Jan 5, 2024

pop-os/cosmic-epoch#168 (comment)

I can reproduce #264

and it does work only on integrated graphics. Discrete or hybrid does not.

my system is the following:
OS: Pop!_OS 22.04 LTS x86_64
Host: 80YH Lenovo ideapad 320-15IKB
Kernel: 6.6.6-76060606-generic
Uptime: 12 mins
Packages: 2489 (dpkg), 2 (nix-user), 48 (nix-default), 45 (flatpak), 11 (snap)
Shell: nu 0.88.1
Resolution: 1920x1080
DE: COSMIC
Theme: Adwaita [GTK3]
Icons: Adwaita [GTK3]
Terminal: zellij
CPU: Intel i7-7500U (4) @ 3.500GHz
GPU: NVIDIA GeForce 940MX
GPU: Intel HD Graphics 620

@anarsoul
Copy link

The bug has not been reported to NVIDIA, so I doubt that they are aware

@gabriele2000
Copy link

I've noticed something really weird... I'm using hybrid GPU mode, of course.
I'm a laptop user.

Since today (an update for cosmic-files, cosmic-term and cosmic-edit dropped, I'm in the staging branch) cosmic apps doesn't run at 0.5FPS but at full speed, with a really funny workaround:
Screenshot_2024-01-15_01-20-10

@gabriele2000
Copy link

The bug has not been reported to NVIDIA, so I doubt that they are aware

NVIDIA/egl-wayland#72 (comment)
It'll be fixed in v550, coming soon, apparently.

@anarsoul
Copy link

NVIDIA/egl-wayland#72 (comment) It'll be fixed in v550, coming soon, apparently.

I don't think it's the same issue. I'm seeing it on Turing GPU (GTX 1650), while the comment says that only pre-Turing GPUs are affected and it should work fine on Turing or later.

@ids1024
Copy link
Member

ids1024 commented Jan 15, 2024

There's been some debate on wgpu about whether or not this is a driver bug, or if wgpu is doing something wrong. The Vulcan spec seems a bit vague. But gfx-rs/wgpu#4967 is meant to fix it, and seems like better approach in general.

@anarsoul
Copy link

There's been some debate on wgpu about whether or not this is a driver bug, or if wgpu is doing something wrong.

My understanding is that it's a driver bug, since fences should work just fine.

@luccahuguet
Copy link

pop-os/cosmic-epoch#168 (comment)

I can reproduce #264
and it does work only on integrated graphics. Discrete or hybrid does not.
my system is the following:
OS: Pop!_OS 22.04 LTS x86_64
Host: 80YH Lenovo ideapad 320-15IKB
Kernel: 6.6.6-76060606-generic
Uptime: 12 mins
Packages: 2489 (dpkg), 2 (nix-user), 48 (nix-default), 45 (flatpak), 11 (snap)
Shell: nu 0.88.1
Resolution: 1920x1080
DE: COSMIC
Theme: Adwaita [GTK3]
Icons: Adwaita [GTK3]
Terminal: zellij
CPU: Intel i7-7500U (4) @ 3.500GHz
GPU: NVIDIA GeForce 940MX
GPU: Intel HD Graphics 620

I can no longer reproduce this bug

@ryzendew
Copy link

apps now render properly but will freeze .. with 550 drivers WGPU_BACKEND=gl fixes my apps freezing

@ryzendew
Copy link

https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967#note_2258144 Confirmed a Driver Bug not a WGPU bug and An nvidia Dev will take a look at the issue! see it helps to report things instead of whining on discord when someone tries to help

@ryzendew
Copy link

As of the newest stable driver this no longer happens and can be closed @Drakulix

@soucosmo
Copy link

soucosmo commented Apr 3, 2024

WGPU_BACKEND=gl

Thanks, its worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants