Launch software with dedicated GPU doesn’t seems to work with Flatpak, but works fine with snap applications

Hello,
With Zorin 18, if I try the command nvidia-smi to verify if Krita or Kdenlive for instance, are launched from dedicated GPU, I have any returns from the command line if these have been installed with Flatpak ; but it seems to work if they were installed from Snap

`sudo snap install (my_package)

I tried this with the Nvidia On-demand mode.
I also tried to launch them from Zorin Menu, Zorin Taskbar, Shell by choosing “run with dedicated GPU” (something similar, I have french version of Zorin 18).

I cannot remember if this occurred on Ubuntu / Kubuntu, since I’m use to install snap packages with the “Ubuntu’s family”, so this is not a “real problem”, just kind of feedback …

I first tried just after installed Zorin (yesterday), to ensure Krita’s Flatpak was using my Nvidia GPU when needed ; the funny things is that it was working as expected. I don’t know why today it doesn’t. The thing i did as usual with Ubuntu / Kubuntu), is switching to my Intel card when I needed and back to Nvidia or On-demand Mode.

It's funny that Zorin promotes Flatpaks—by giving us the choice with everything configured, which is pretty cool—but that Snaps seem to handle this type of hybrid GPU situation better... But this is perhaps my misunderstanding of these principles. :thinking:
Without the option to choose the card


With the option

Thanks to all

I assume you are running an up to date video driver yes?

Running the 580 proprietary driver

Now, go to Nvidia X Server Settings app

Choose the mode you wish to run, likely is going to be the Nvidia Performance option for you. Once chosen, you will be required to reboot. Now all apps will run on your Nvidia GPU with performance.

Any Flatpak app that requires GPU power will use it, if you have set your Nvidia GPU as primary. For example, I'm using the Steam Flatpak for gaming, they use the Nvidia GPU. I also disabled my Intel GPU in the BIOS, forcing Nvidia as the only option.


I think I had a similar problem with getting the flatpak heroic launcher to run Baldur's gate 3 via GPU when I updated the driver to 580. It just wouldn't detect the GPU, but I think updating flatpak fixed it.

Correct me if I'm wrong, but I think it's:
flatpak update

Maybe there's a "sudo" in there.

I still use On Demand mode, but BG3 can find the GPU now.

Thanks both of you.
@StarTreker : i like to keep this choice of choosing GPU, so using snap will be ok - it's more like a kind of feedback ... As far as it works anyway.