Auto connect the joystick interface

Hi,

We’ve been unable to use joysticks with Antstream Arcade for a couple of weeks at least now, could the auto-connect be re-issued again?

Also. I wonder why the auto connection was revoked? If it was something on our side, I’d like to know how to prevent it in the future.

Thank you,

Andre

In the latest version(2.1.2744) of antstream-arcade, I can see that joystick interface is enabled for auto-connect already. I am not sure what the issue is here

cc: @reviewers

Thanks for checking.

I can use the controllers in local builds, it’s just when it’s packaged and installed from the Snap that the controllers don’t work.

If there’s anything I can do on my side to help test the issue please let me know.

Thanks again,

Andre

FYI granting of auto-connection applies for all revisions of a snap - so it shouldn’t matter which revision is installed from the store - this is global:

You can see this via the review-tools snap:

$ review-tools.store-query --snap-decl antstream-arcade
authority-id: canonical
format: 1
plugs:
  joystick:
    allow-auto-connection: true
publisher-id: 5THCIc0vShBoPHgkdHBDJxqkh8vsDedU
revision: 1
series: 16
sign-key-sha3-384: BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul
snap-id: RkPxAYeS2WBafDZjumfxhHAOlbtE3OSf
snap-name: antstream-arcade
timestamp: '2020-09-03T04:28:06.564126Z'

ie. this has the required declaration to enable auto-connect of joystick:

plugs:
  joystick:
    allow-auto-connection: true

Also I can’t reproduce this - after installing antstream-arcade, joystick appears to be auto-connected:

amurray@sec-kinetic-amd64:~$ sudo snap install antstream-arcade 
[sudo] password for amurray: 
antstream-arcade 2.1.2744 from Antstream Arcade (antstream) installed
amurray@sec-kinetic-amd64:~$ snap connections antstream-arcade 
Interface         Plug                               Slot              Notes
alsa              antstream-arcade:alsa              -                 -
audio-playback    antstream-arcade:audio-playback    :audio-playback   -
browser-support   antstream-arcade:browser-sandbox   :browser-support  -
browser-support   antstream-arcade:browser-support   :browser-support  -
desktop           antstream-arcade:desktop           :desktop          -
desktop-legacy    antstream-arcade:desktop-legacy    :desktop-legacy   -
hardware-observe  antstream-arcade:hardware-observe  -                 -
joystick          antstream-arcade:joystick          :joystick         -
network           antstream-arcade:network           :network          -
opengl            antstream-arcade:opengl            :opengl           -
pulseaudio        antstream-arcade:pulseaudio        -                 -
unity7            antstream-arcade:unity7            :unity7           -

Can you please provide more details?

Hi Alex, thanks for looking into it.

The Joystick interface doesn’t seem to auto-connect to me:

$ snap connections antstream-arcade
Interface         Plug                               Slot              Notes
alsa              antstream-arcade:alsa              -                 -
audio-playback    antstream-arcade:audio-playback    :audio-playback   -
browser-support   antstream-arcade:browser-sandbox   :browser-support  -
browser-support   antstream-arcade:browser-support   :browser-support  -
desktop           antstream-arcade:desktop           :desktop          -
desktop-legacy    antstream-arcade:desktop-legacy    :desktop-legacy   -
hardware-observe  antstream-arcade:hardware-observe  -                 -
joystick          antstream-arcade:joystick          -                 -
network           antstream-arcade:network           :network          -
opengl            antstream-arcade:opengl            :opengl           -
pulseaudio        antstream-arcade:pulseaudio        -                 -
unity7            antstream-arcade:unity7            :unity7           -
wayland           antstream-arcade:wayland           :wayland          -

Please notice that the issue has just appeared to us, it doesn’t affect the published snap. After connecting it manually, controllers work just fine.

We didn’t touch our build process. I’ve copied the package description below in case it helps.

Thanks again,

Andre

name: antstream-arcade
version: 2.1.9999
title: Antstream Arcade
summary: Play over 1000 classic games. Take on our unique challenges and leaderboards.
description: |
  Play over 1000 classic games in an instant anywhere, anytime. Pick up and play
  at home and on the go with our huge catalogue of licensed retro games. Take on
  our unique challenges and climb the global leaderboards as we reload retro.

confinement: strict
grade: stable
base: core20
type: app
license: Proprietary

parts:
  antstream-arcade:
    after: [alsa-mixin]
    plugin: dump
    source: linux-build/bin
    stage-packages:
    - libasn1-8-heimdal
    - libcurl4
    - libfreetype6
    - libgssapi3-heimdal
    - libhcrypto4-heimdal
    - libheimbase1-heimdal
    - libheimntlm0-heimdal
    - libhx509-5-heimdal
    - libkrb5-26-heimdal
    - libldap-2.4-2
    - libnghttp2-14
    - libpng16-16
    - libpsl5
    - libroken18-heimdal
    - librtmp1
    - libsasl2-2
    - libwind0-heimdal
    - libasound2
    - libatk1.0-0
    - libatk-bridge2.0-0
    - libatspi2.0-0
    - libfontconfig1
    - libgl1
    - libglew2.1
    - libgtk-3-0
    - libnspr4
    - libnss3
    - libopenal1
    - libpango-1.0-0
    - libpangocairo-1.0-0
    - libsndio7.0
    - libx11-6
    - libx11-xcb1
    - libxcb1
    - libxcomposite1
    - libxcursor1
    - libxdamage1
    - libxext6
    - libxfixes3
    - libxi6
    - libxrandr2
    - libxrender1
    - libxss1
    - libxtst6
    - libglu1-mesa
  alsa-mixin:
    plugin: dump
    source: https://github.com/diddlesnaps/snapcraft-alsa.git
    source-subdir: snapcraft-assets
    build-packages:
      - libasound2-dev
    stage-packages:
      - libasound2
      - libasound2-plugins
      - yad

layout:
  /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib:
    bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib

apps:
  antstream-arcade:
    command-chain: ["snap/command-chain/alsa-launch"]
    command: runsnap.sh
    environment:
      LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa-gl:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/xorg:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio/
      LIBGL_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri
    plugs:
    - desktop
    - desktop-legacy
    - wayland
    - unity7
    - network
    - opengl
    - audio-playback
    - alsa
    - pulseaudio
    - joystick
    - browser-support
    - hardware-observe

plugs:
  browser-sandbox:
    interface: browser-support

no such issue here when installing from the store, joystick is definitely auto-connected for me:

~$ sudo snap install antstream-arcade
[sudo] Passwort für ogra: 
antstream-arcade 2.1.2744 aus Antstream Arcade (antstream) installiert
~$ snap connections antstream-arcade|grep joystick
joystick          antstream-arcade:joystick          :joystick         -
~$ 

do you install it in any way differently (i.e. side-loading with --dangerous which will not process the snap declarations on purpose or some such) ?

Hi Ogra,

Thanks for also looking into this.

I’ve just answered Alex, this is a new development in our build process. The currently published snap is fine, but we’re unable to use the controllers in out latest local build because the Joystick plug is not being auto-connected. If I manually connect it, controllers work just fine. We don’t need any additional options when installing the snap.

The package description is included in my answer to Alex.

Thanks again,

Andre

auto-connection is only applied when snapd interacts with the store and receives the snap declaration from there while installing the snap.

if you in any way install locally you will always have to manually connect, store declarations do not apply then, simply because no store is involved in the install process …

Oh, that’s weird as we always test the snap locally before submitting to the store, and being unable to use the controllers is a recent development.

I’ll publish the package privately and see if installing from the store auto-connects the joystick plug.

Thanks for the tip!

Hm I can’t make a release private, I’ll publish it as edge instead.

that is what edge is for :wink:

1 Like