GPU not recognised in renpy snap


#1

I’m trying to snap The Climate Trial a game built with The Ren’Py Visual Novel Engine.

Everything seems to be working, except for 3D acceleration. At bootup, the game shows an error message

This computer is using software rendering.
Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display.

I’m not entirely sure how to fix this. I’ve staged libgl1-mesa-dri, libgl1-mesa-glx and libglu1-mesa and I use desktop-launch but it doesn’t seem to be helping. Any ideas?

source: https://github.com/snapcrafters/climate-trail/blob/master/snap/snapcraft.yaml

base: core18
name: climate-trail
title: The Climate Trail
summary: Surviving The Climate Apocalypse
version: "1.3"
description: |
  The Climate Trail is a completely free (no ads, no in-app purchases) multi-platform game.
  The game is about climate refugees fleeing ever worsening conditions after inaction on climate has rendered much of the USA (and the world) uninhabitable.  The game combines the adventure and play of the journey north with visual novel elements, where characters reveal how and why this climate apocalypse unfolded.
  Like the game? Support the developer by paying what you think is fair on itch.io: <https://deepstategames.itch.io/the-climate-trail-10>
  This snap is maintained by the Snapcrafters community, and is not necessarily
  endorsed or officially maintained by the upstream developers.
icon: snap/gui/climate-trail.png

grade: stable
confinement: strict

apps:
  climate-trail:
    command-chain: 
      - bin/desktop-launch
    command: ClimateTrail.sh
    plugs:
      - unity7
      - network
      - network-bind
      - opengl
      - pulseaudio
      - screen-inhibit-control
      - joystick

parts:
  climate-trail:
    after: [desktop-glib-only]
    plugin: dump
    source: ClimateTrail-1.3-pc.tar.xz
    stage-packages:
      - libgl1-mesa-dri
      - libgl1-mesa-glx
      - libglu1-mesa
      - libpulse0

  desktop-glib-only:
    build-packages:
    - libglib2.0-dev
    plugin: make
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: glib-only
    stage-packages:
    - libglib2.0-bin

#2

I’ll put a braindump here because I just got a breakthrough but don’t have enough time to actually fix it right now.

With the help of renpytom, I was able to get a log file (by pointing RENPY_LOG_BASE to the snap userdirs) which shows this error:

Couldn't import gl renderer:
Traceback (most recent call last):
  File "/snap/climate-trail/x6/renpy/display/core.py", line 1935, in make_draw
    __import__(mod)
ImportError: libXmu.so.6: cannot open shared object file: No such file or directory

Tom also said where the opengl detection is handled

It’s a mix renpy.game.core.Interface.make_draw, and then pretty much the entire renpy.gl module. If you get me lthe log.txt, I can probably make a more specific recommendation."

I’ll take a look to see why this library isn’t found tomorrow.