Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Joypad not available for vba-m snap #934

Closed
1 task done
erishiamu opened this issue Mar 16, 2022 · 6 comments
Closed
1 task done

[Bug]: Joypad not available for vba-m snap #934

erishiamu opened this issue Mar 16, 2022 · 6 comments
Labels
bug input UI Linux UI issues on linux.

Comments

@erishiamu
Copy link

erishiamu commented Mar 16, 2022

Expected behavior?

Inputs from a usb-attached gamepad can be configured in the input menu

Actual behavior?

The program does not acknowledge inputs from attached usb joypad. Joypad input works in jstest. Some searching has yielded 'sudo snap connect snapname:joystick' as a solution for other projects, however joystick/raw-usb plugins are not in this snap.

Steps to reproduce the problem

  1. try to build from source, fail. :)
  2. Install vba-m snap with sudo snap install visualboyadvance-m --beta (behavior occurs with edge as well)
  3. Launch visualboyadvance
  4. options > input > configure, select a button input and press corresponding joypad button

Error messages?

N/A this does not crash, it simply does not work as expected.

What game were you playing

N/A this is duplicable without a rom loaded.

What settings are you using?

Video driver (simple, opengl):simple
Sound driver (directsound, xaudio, openal, SDL): sdl
Scale Filter Used?: apologies, I do not know what this means.

Specifications and Build details

VBA-M: 2.14-4-94b4a798, this was installed with snap not sure if its x86 or amd64
OS: (include version and OS build number using WinVer if on Windows): Kubuntu 21.10
If using Linux, specify if using xorg or Wayland: xorg
CPU: Ryzen 5800x
GPU: radeon 5700 xt
RAM: 32gb Gskill DDR4 3200mhz

Copyright Compliance

  • There are no infringing files attached to this bug report.
@erishiamu erishiamu added the bug label Mar 16, 2022
@Squall-Leonhart Squall-Leonhart added input UI Linux UI issues on linux. labels May 14, 2022
@visualboyadvance-m visualboyadvance-m deleted a comment from ManicQuinn Jul 24, 2022
@Hooloovoo
Copy link

Hooloovoo commented Jul 31, 2023

It looks to me as though this just needs joystick added to the list of plugs.

If I download the latest beta snap and install it manually:

snap download visualboyadvance-m --beta
snap install visualboyadvance-m_2.snap --dangerous

Nothing happens when I go into Input and try to configure the controls with joystick presses.

If I remove it and install it again in devmode:

snap remove visualboyadvance-m
snap install visualboyadvance-m_2.snap --devmode

It works as expected, reacting to gamepad presses on my wireless Logitech Rumblepad 2.

Using snappy-debug to capture a log while doing this:

sudo snappy-debug > snappy-debug.log

gives this log including:

= AppArmor =
Time: Jul 31 22:05:46
Log: apparmor="ALLOWED" operation="open" profile="snap.visualboyadvance-m.visualboyadvance-m" name="/dev/input/event21" pid=46896 comm="visualboyadvanc" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/input/event21 (read)
Suggestions:
* add one of 'device-buttons, joystick' to 'plugs'
* add 'raw-input' to 'plugs'

Removing the snap again and unsquashing the snap with:

unsquashfs visualboyadvance-m_2.snap

lets me go into the squashfs-root/meta/ folder and edit the snap.yaml
Changing the:

apps:
  visualboyadvance-m:
    command: usr/bin/visualboyadvance-m
    command-chain:
    - snap/command-chain/snapcraft-runner
    - snap/command-chain/desktop-launch
    environment:
      LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio
    plugs:
    - desktop
    - desktop-legacy
    - wayland
    - x11

to add a

    - joystick

underneath and then running a snap try squashfs-root/ means that I can then run visualboyadvance-m and I have a version where the input configuration screen works as expected with the gamepad.

You may have to manually connect the plug. If it doesn't just work after doing the above and snap connections looks like:

$ snap connections visualboyadvance-m 
Interface                 Plug                                Slot                             Notes
audio-playback            visualboyadvance-m:audio-playback   :audio-playback                  -
content[gnome-3-28-1804]  visualboyadvance-m:gnome-3-28-1804  gnome-3-28-1804:gnome-3-28-1804  -
content[gtk-3-themes]     visualboyadvance-m:gtk-3-themes     gtk-common-themes:gtk-3-themes   -
content[icon-themes]      visualboyadvance-m:icon-themes      gtk-common-themes:icon-themes    -
content[sound-themes]     visualboyadvance-m:sound-themes     gtk-common-themes:sound-themes   -
desktop                   visualboyadvance-m:desktop          :desktop                         -
desktop-legacy            visualboyadvance-m:desktop-legacy   :desktop-legacy                  -
home                      visualboyadvance-m:home             :home                            -
joystick                  visualboyadvance-m:joystick         -                                -
network                   visualboyadvance-m:network          :network                         -
opengl                    visualboyadvance-m:opengl           :opengl                          -
removable-media           visualboyadvance-m:removable-media  -                                -
wayland                   visualboyadvance-m:wayland          :wayland                         -
x11                       visualboyadvance-m:x11              :x11                             -

run snap connect visualboyadvance-m:joystick and it should go to:

$ snap connections visualboyadvance-m 
Interface                 Plug                                Slot                             Notes
audio-playback            visualboyadvance-m:audio-playback   :audio-playback                  -
content[gnome-3-28-1804]  visualboyadvance-m:gnome-3-28-1804  gnome-3-28-1804:gnome-3-28-1804  -
content[gtk-3-themes]     visualboyadvance-m:gtk-3-themes     gtk-common-themes:gtk-3-themes   -
content[icon-themes]      visualboyadvance-m:icon-themes      gtk-common-themes:icon-themes    -
content[sound-themes]     visualboyadvance-m:sound-themes     gtk-common-themes:sound-themes   -
desktop                   visualboyadvance-m:desktop          :desktop                         -
desktop-legacy            visualboyadvance-m:desktop-legacy   :desktop-legacy                  -
home                      visualboyadvance-m:home             :home                            -
joystick                  visualboyadvance-m:joystick         :joystick                        manual
network                   visualboyadvance-m:network          :network                         -
opengl                    visualboyadvance-m:opengl           :opengl                          -
removable-media           visualboyadvance-m:removable-media  -                                -
wayland                   visualboyadvance-m:wayland          :wayland                         -
x11                       visualboyadvance-m:x11              :x11                             -

and then work as expected.

I could not immediately get snapcraft to make a snap from the current main branch and couldn't immediately see any instructions on building the snap, so I didn't want to put up a pull request with the change if I couldn't test it first.

@ZachBacon
Copy link
Contributor

Sorry for taking long to reply. I was busy with some life stuff, and other projects. I'm in the process of rebuilding the snapcraft yaml, beginning with the nightly one using core22 but with the joystick stuff. I'll let you know when it's available.

@ZachBacon
Copy link
Contributor

So, I managed to build the updated snap, added the joystick, but it's still not usable. Mainly due to the fact it's not autoconnecting. You'd have to enable it manually for now. The only way to get it autoconnect is if I request it on the snapcraft forums, which I shall be doing so with in the next few days

@ZachBacon
Copy link
Contributor

https://forum.snapcraft.io/t/autoconnect-for-visualboyadvance-m/37437 Request is in, just have to wait for approval.

@ZachBacon
Copy link
Contributor

@Hooloovoo @erishiamu Apologies for the long delays. Request from the snapcraft team has been approved, Joystick is now set to autoconnect for vba-m's snap. I'll close this for now. Feel free to report anything though if you're still having troubles.

@Hooloovoo
Copy link

Works exactly as expected with stable snap, many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug input UI Linux UI issues on linux.
Projects
None yet
Development

No branches or pull requests

4 participants