No sound in snap when run?

I just installed snap via the archiki instructions.

I installed star ruler 2 from snapcraft and run it with:

snap run starruler2

It opens but I get no sound.

There is some error output on the command line related to audio but didn’t find a conclusive answer when I looked up the error. Didn’t look for long yet though as it was the end of the night and was about done.

Here is the output:

$ snap run starruler2 realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory realpath: '': No such file or directory chmod: changing permissions of './bin/lin64/StarRuler2.bin': Read-only file system Initializing sound AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse" AL lib: (WW) alc_initconfig: Failed to initialize backend "alsa" AL lib: (EE) ALCplaybackOSS_open: Could not open /dev/dsp: No such file or directory Sound Error: Could not initialize sound system Initializing window system Loading engine settings Initializing OpenGL Engine Registering mods Starting 5 threads on 4 processors. Loading mod(s) OpenGL vendor 'Intel Open Source Technology Center', renderer 'Mesa DRI Intel(R) HD Graphics 505 (Broxton) ' version '3.0 Mesa 18.0.5' Loaded in 18.9 seconds libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile Shadow scripts: 4082ms load, 19587ms compile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile Client scripts: 7864ms load, 33206ms compile Server scripts: 2714ms load, 41682ms compile Loaded in 44.5 seconds Finished computing hulls in 61341ms libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile

Hi ! @snapcraftuser10903.

Can you show the content of your *.yaml file ?

Where is the path for that please? I am new to using snap and a quick search did not retrieve an immediate answer where it may be located.

@snapcraftuser10903 are you the owner of this snap starruler2 ? :face_with_monocle:

$ snap info starruler2
name:      starruler2
summary:   A massive scale 4X/RTS set in space
publisher: Lucy Llewellyn (lucyllewy✪)
store-url: https://snapcraft.io/starruler2
contact:   https://github.com/diddlesnaps/starruler2/issues
license:   CC-BY-NC-2.0
description: |
  Explore dozens, hundreds, or even thousands of systems in a galaxy of your choosing,
  expand across its planets, exploit the resources you find, and ultimately exterminate any
  who stand in your way. The fate of your empire depends on your ability to master the
  economy, field a military, influence galactic politics, and learn what you can about the
  universe.
  
  Upstream Project: https://github.com/BlindMindStudios/StarRuler2-Source
  snapcraft.yaml Build Definition:
  https://github.com/diddlesnaps/starruler2/blob/master/snap/snapcraft.yaml
snap-id: SJa6RDP1LVtHMkJG56zPKTb9bn6mkdhW
channels:
  latest/stable:    2.0 2021-09-24 (122) 513MB -
  latest/candidate: ↑                          
  latest/beta:      ↑                          
  latest/edge:      2.0 2022-05-04 (128) 513MB -

@snapcraftuser10903, It is unclear from the log above whether the problem is with this snap, or with the host environment. Some things that may help are:

  1. checking the plugs connected for the snap snap connections starruler2
  2. the output from snap --version

In particular, is the `audio-playback" plug connected?

You can format the output better by surrounding the text with triple backtick “`” markers.

@baldeuniversel, it looks like the snap owner is @lucyllewy

In passing, I note that the snap hasn’t seen any updates for some years, which implies it isn’t being actively maintained.

2 Likes

Thank you for the reply.

$ snap connections starruler2
Interface       Plug                       Slot             Notes
audio-playback  starruler2:audio-playback  :audio-playback  -
desktop         starruler2:desktop         :desktop         -
desktop-legacy  starruler2:desktop-legacy  :desktop-legacy  -
network         starruler2:network         :network         -
opengl          starruler2:opengl          :opengl          -
pulseaudio      starruler2:pulseaudio      :pulseaudio      -
wayland         starruler2:wayland         :wayland         -
x11             starruler2:x11             :x11             -
WARNING: There is 1 new warning. See 'snap warnings'.
$ snap --version
snap    2.65.1-1
snapd   2.65.1-1
series  16
arch    -
kernel  6.10.8-arch1-1

EDIT: scratch that! Audio is working now! I remembered I didn’t have pulseaudio installed before and did not want to reset last night to test the changes. I just ran it now and on start didn’t see the audio warnings mentioned in OP and had sound!

I have another question…

How do I install mods on a snap?

Also…

I tried the snap because building the game from source from the git repository didn’t work. In this case it caused black screen of death and would hang and I would have to restart the machine. Any guesses why the snap would work when the git install wouldn’t?

I will note I installed on another machine from the git some years ago and had no issues, just this latest machine I use.