Balls2 not running with nvidia/proprietary drivers

balls2 not running with nvidia/proprietary drivers

to install balls2 “snap install balls2”

snapcraft.yaml

name: balls2
version: “0.3”
summary: game
description: |
simple silly games with balls
icon: src/assets/icon.png
confinement: strict

apps:
balls2:
command: wrapper
plugs: [wayland, x11, unity7, opengl]

parts:
balls2:
plugin: make
source: src/
artifacts: [“balls2”, “assets/”]
build-packages:
- g++
- libsdl2-dev
- libsdl2-image-dev
- libsdl2-mixer-2.0-0
- libsdl2-ttf-2.0-0
stage-packages: [libsdl2-mixer-2.0-0, libsdl2-image-2.0-0, libsdl2-2.0-0, libgl1-mesa-dri, libgl1-mesa-glx]
wrapper:
plugin: copy
files:
wrapper: usr/bin/wrapper


wrapper

#!/bin/sh
export LIBGL_DRIVERS_PATH=$SNAP/usr/lib/x86_64-linux-gnu/dri
exec “$SNAP/balls2” “$@”


on my intel gpu it does run.
the “INFO: error loading texture /snap/balls2/3/assets/loading_bomb.png Invalid renderer” error means that SDL2 can’t use hardware acceleration/opengl i think

Works on nVidia here…

1 Like

same here (GeForce GTX 970 on 16.04)

there seem to be some asset files missing though:

ogra@anubis:~/datengrab$ balls2
INFO: Balls Snap
Current working dir: /home/ogra/datengrab
shm_open() failed: Permission denied
INFO: Display #0: current display mode is 1920x1080px @ 60hz. 
INFO: Display #1: current display mode is 1920x1080px @ 60hz. 
INFO: Display #2: current display mode is 1920x1080px @ 60hz. 
INFO: getdpi! 0
INFO: ddpi 91.8187
INFO: hdpi 91.8418
INFO: vdpi 91.7458
INFO: window X:495 Y:880
INFO: error loading texture /snap/balls2/3/assets/your_loose1.png Couldn't open /snap/balls2/3/assets/your_loose1.png
INFO: error loading texture /snap/balls2/3/assets/your_win1.png Couldn't open /snap/balls2/3/assets/your_win1.png
INFO: error loading texture /snap/balls2/3/assets/map_sand_boss.png Couldn't open /snap/balls2/3/assets/map_sand_boss.png
INFO: error loading texture /snap/balls2/3/assets/map_ice_boss.png Couldn't open /snap/balls2/3/assets/map_ice_boss.png
INFO: error loading texture /snap/balls2/3/assets/20.png Couldn't open /snap/balls2/3/assets/20.png
INFO: error loading texture /snap/balls2/3/assets/40.png Couldn't open /snap/balls2/3/assets/40.png
INFO: error loading texture /snap/balls2/3/assets/60.png Couldn't open /snap/balls2/3/assets/60.png
INFO: error loading texture /snap/balls2/3/assets/80.png Couldn't open /snap/balls2/3/assets/80.png
INFO: error loading texture /snap/balls2/3/assets/100.png Couldn't open /snap/balls2/3/assets/100.png
INFO: error loading texture /snap/balls2/3/assets/120.png Couldn't open /snap/balls2/3/assets/120.png
INFO: error loading texture /snap/balls2/3/assets/140.png Couldn't open /snap/balls2/3/assets/140.png
INFO: error loading texture /snap/balls2/3/assets/160.png Couldn't open /snap/balls2/3/assets/160.png
INFO: number_of_levels: 6
INFO: current_level: 0
INFO: wtffff
INFO: cannot access dir
INFO: number_of_levels: 6
INFO: current_level: 0
1 Like

yep :smiley: i have to clean the code a bit (i don’t really use this assets in the game)

btw, @ogra and @popey you are using the proprietary nvidia drivers, right? not nouveau stuff

yes, nvidia-384 here

ok, so i think i’ll leave it here for now.
pastebin https://paste.ubuntu.com/26398098/ is from Marius, and he’s running the snap on Solus 3 + latest driver from NVIDIA-340, kernel 4.14.12-44

i’ll be back after i learn how to debug snap stuff and maybe install solus3

yeah, sounds solus related … are all the interfaces connected as they should be on solus ?

from Marius

~ $ snap interfaces | grep balls
:opengl balls2,boa,chromium,minecraft,spotify,waveform
:unity7 balls2,boa,chromium,mailspring,minecraft,remmina,spotify
:wayland balls2,remmina
:x11 balls2,bucklespring,chromium,mailspring,minecraft,spotify,waveform

looks the same here …