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 utilise 40% of CPU. #569

Open
m1cha1s opened this issue Aug 10, 2024 · 6 comments
Open

COSMIC apps utilise 40% of CPU. #569

m1cha1s opened this issue Aug 10, 2024 · 6 comments

Comments

@m1cha1s
Copy link

m1cha1s commented Aug 10, 2024

Hello, I am running Asahi linux, i have been trying out the cosmic-desktop package provided by this repo.

The desktop launches as it should, however when i start any program that uses libcosmic then these apps utilise 40-50% of CPU when they are interacted with in any way, even mouse movement over the window. There is also a bug in the cosmic-settings app that when you click around and then enter the Display section there is a constant 30-40% load on the CPU even without user interaction. This disappears when you click around a little bit and the enter the Display section again.

I believe that this may be related to software rendering within the wgpu library. Even thou Asahi supports both OpenGL and Vulkan.

@m1cha1s
Copy link
Author

m1cha1s commented Aug 10, 2024

According to more findings, it seems to be related to COSMIC preferring the Vulkan/lavapipe renderer instead of the OpenGL one, this has been found by @jannau:fedora.im on Asahi Matrix. There are also some issues with the OpenGL backend, for example all images(icons) turn into black boxes, and also while launching cosmic-settings there is a lot of errors being spit out.

@jannau
Copy link

jannau commented Aug 10, 2024

probably related: iced-rs/iced#2259
Production Asahi systems have no vulkan driver for the GPU. The driver is under development but not yet ready for production: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382

@mmstick
Copy link
Member

mmstick commented Aug 10, 2024

As above, applications currently require Vulkan hardware support. If lacking, a LLVM software renderer is used instead.

@m1cha1s
Copy link
Author

m1cha1s commented Aug 10, 2024

So this should be solved by the creation of the Vulkan driver for Asahi, right?

@mmstick
Copy link
Member

mmstick commented Aug 10, 2024

Or when we update iced, which may have fixes to the wgpu renderer to use OpenGL instead.

@bbb651
Copy link
Contributor

bbb651 commented Aug 24, 2024

So this should be solved by the creation of the Vulkan driver for Asahi, right?

In case you don't know, there's one in the works.

I do think libcosmic should display some very visible warning, maybe a popup when you open the application, when lavapipe is used, in the vast majority of cases users have a way to get proper vulkan drivers set up but don't have them for whatever reason (such as outdated/missing drivers or mismatched userspace drivers and kernel drivers in a flatpak environment), and since most applications (like browsers) have a fallback, they are going to have a bad expirence and blame it on libcosmic or the applications. I've seen this happen a lot with Zed (iirc they are also working on an OpenGL fallback).

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

4 participants