flathub / com.unity.UnityHub

https://flathub.org/apps/details/com.unity.UnityHub
21 stars 11 forks source link

Run on discrete GPU, if available #91

Closed wjt closed 1 year ago

wjt commented 1 year ago

On systems where a more powerful secondary GPU is available, this key causes GNOME, KDE, and possibly other desktops to launch the app (by default) with an appropriate set of environment variables to use that GPU. The assumption is that, as a gaming tool, Unity users probably want to use a discrete GPU if available.

Unity Hub itself probably won't care either way, but the Unity editor it spawns will, as will the games spawned by that editor.

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#key-prefersnondefaultgpu

flathubbot commented 1 year ago

Started test build 23770

wjt commented 1 year ago

completely, 100% untested!

flathubbot commented 1 year ago

Build 23770 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/6415/com.unity.UnityHub.flatpakref
flathubbot commented 1 year ago

Started test build 26301

flathubbot commented 1 year ago

Build 26301 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/8962/com.unity.UnityHub.flatpakref
wjt commented 1 year ago

I still haven't actually tested this but it's exactly the same bytes as are present in com.valvesoftware.Steam.desktop so I can't see how it can be wrong :)

cassidyjames commented 1 year ago

Having tested this on Endless OS 5, I can confirm GNOME launches it on the discrete graphics with this PR, including the Unity editor itself and e.g. the included LEGO demo project works great.

Master defaults to the integrated graphics which makes the LEGO demo project crash upon starting.