catsout / wallpaper-engine-kde-plugin

A kde wallpaper plugin integrating wallpaper engine
https://store.kde.org/p/1475528/
GNU General Public License v2.0
1.82k stars 77 forks source link

PRIME Offloading/Forcing Vulkan to use dedicated GPU for scene wallpapers #349

Open kyrie25 opened 10 months ago

kyrie25 commented 10 months ago

Is it currently possible to offload Wallpaper Engine to use the dedicated (NVIDIA) GPU over defaulting to integrated GPU, in regard to rendering scene wallpapers?

I've looked through older issue, which suggests either installing the Vulkan driver for the integrated GPU or only offload for video wallpapers. While using the integrated GPU for scene wallpapers does indeed work, it puts a strain on it whenever another desktop effect is rendered, which could cause frame drops/momentarily freezes just by doing normal tasks like hovering over the dock.

I've attempted to use EnvyControl (Optimus Manager alternative) and vkdevicechooser to force Vulkan to use the NVIDIA GPU only, but that only results in black screens as mentioned in #197

Any help is appreciated!

VoSed commented 9 months ago

I have exact same issue. Plugin can't find vulkan device if Nvidia chosen or vulkan-intel package not installed

ShayBox commented 7 months ago

I think this is unavoidable, you have to run it on the same GPU that Kwin is using, which should be the default.

Unless there's a specific reason not to use your iGPU, it should be your default and you can launch games and programs with prime-run. Switching entirely over to the dGPU with things like EnvyControl/Optimus/Bumblebee are not recommended; you can get extra performance out of your dGPU if some processes like Kwin and Wallpaper Engine are running on the iGPU.

ShayBox commented 3 months ago

You can use prime-run plasmashell --replace to achieve this, but it would be nice to offload just this plugin instead of the whole shell, it uses around 30% of my A380.

kyrie25 commented 3 months ago

Unless there's a specific reason not to use your iGPU, it should be your default and you can launch games and programs with prime-run.

you can get extra performance out of your dGPU if some processes like Kwin and Wallpaper Engine are running on the iGPU.

Wallpaper Engine itself is a very GPU-demanding process. By default Wallpaper Engine on Windows utilizes dGPU for rendering and decoding (video) wallpapers. That's also why it crippled my iGPU as mentioned above.

You can use prime-run plasmashell --replace to achieve this, but it would be nice to offload just this plugin instead of the whole shell

Indeed, but it creates artifacts on the desktop shell. In my case, the transparency and border radius in the dock and window frames was broken along with some other stuff. This should be a KWin bug, but running the entire shell on dGPU itself is a workaround, so it'd be nice if it is possible to offload only Wallpaper Engine

ShayBox commented 2 months ago

This only supports videos, could add an input for us to add prime-run/env, or a checkbox to add it automatically?