This repository contains some helper items for working with the interfaces supplying GPU userspace for snaps.
-
bin/gpu-2404-wrapperYou should prime this script in your snap and use it in yourcommand-chain:for all apps requiring GPU support:apps: app: plugs: - opengl - wayland command-chain: - bin/gpu-2404-wrapper command: usr/bin/eglinfo
NB: the script assumes that
gpu-2404.target:is set to$SNAP/gpu-2404. -
bin/gpu-2404-cleanupThis is a script to help avoid priming any libraries provided by the content providers. You should run it inoverride-prime:of the part whose source is this repository,after:any parts that stage any libraries, passing the names of the providers you want to make sure you're compatible with:parts: my-app: stage-packages: # ... gpu-2404: after: [my-app] source: https://github.com/canonical/gpu-snap.git plugin: dump override-prime: | craftctl default ${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404 nvidia-2404 prime: - bin/gpu-2404-wrapper
-
bin/graphics-core22-wrapperYou should prime this script in your snap and use it in yourcommand-chain:for all apps requiring GPU support:apps: app: plugs: - opengl - wayland command-chain: - bin/graphics-core22-wrapper command: usr/bin/eglinfo
NB: the script assumes that
graphics-core22.target:is set to$SNAP/graphics. -
bin/graphics-core22-cleanupThis is a script to help avoid priming any libraries provided by the content providers. You should run it inoverride-prime:of the part whose source is this repository,after:any parts that stage any libraries, passing the names of the providers you want to make sure you're compatible with:parts: my-app: stage-packages: # ... graphics-core22: after: [my-app] source: https://github.com/canonical/gpu-snap.git plugin: dump override-prime: | craftctl default ${CRAFT_PART_SRC}/bin/graphics-core22-cleanup mesa-core22 nvidia-core22 prime: - bin/graphics-core22-wrapper
For more information about those interfaces, see:
- The graphics-core22 snap interface documentation.
- The gpu-2404 snap interface documentation.