On Wed, Apr 10, 2024 at 02:46:30PM +0200, Werner Sembach wrote: > Hi all, > > I'm task to evaluate a better way to handle GPU offloading then it's > currently done on Linux with environment variables. > > The Goal is to have some kind of GUI editable database/config file where the > user can add and remove binaries/programs. > > For this I would like to push > https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/224 and > https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/228 as it > seems to be a good basis for exactly this. However the discussion on them is > stale, not because of technical difficulties, but because of lack of > interest it seems.
I'm not convinced a specialized format stored somewhere is necessarily a good idea in how to achieve this. A really global list would have to be managed by root, and would it be a configuration file stored somewhere in $HOME, it would now be inaccessible to sandboxed applications. For OpenGL/Vulkan clients using Wayland I imagine something that doesn't use environment variables can be achieved using the linux_dmabuf protocol, which has the concept of "preferred main device". If applications are configured in whatever way, and if there is integration with the Wayland compositor, perhaps this way is a better option. It'll leave compositors and desktop environments more free to make decisions how to present and store user preferences, which I think makes much more sense than a text file and matching rules on /proc/<pid>/cmdline, which seems really terrible from a UX perspective. I realize X11 is a different story, I suspect something similar to the Wayland protocol would need to be invented there to achieve something similar, but I don't really know the details about how X11+EGL and GLX works. Jonas > > Are there other people here interested in this topic? > > Best regards, > > Werner Sembach >
