libretro / libretro/RetroArch

Controller profile override for my GC adapter can't be saved or created locally (outside of install path) on Flatpak

Open
#16,236 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Description

RetroArch is not loading my controller's auto-config when placed here (with or without a sdl2/ sub-folder):
~/.var/app/org.libretro.RetroArch/config/retroarch/autoconfig/
Even though it works when I place it on the install path (but this is replaced when flatpak updates RetroArch):
~/.local/share/flatpak/app/org.libretro.RetroArch/current/active/files/share/libretro/autoconfig/sdl2/
Isn't this the purpose of this folder? So I can add/override an auto-detection?

I've also tried using "Save Controller Profile" feature, but it gives an error without explaining anything. Logs shown on command-line stdout are useless too, this error is not even shown there at all.
I can only see the error that it's not auto-detected (it's a brand-less USB adapter with 4 GameCube ports):

[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [Autoconf]: Nintendo GameCube Controller Adapter (121/6214) not configured, using fallback.
[INFO] [Autoconf]: Nintendo GameCube Controller Adapter (121/6214) not configured, using fallback.
[INFO] [Autoconf]: Nintendo GameCube Controller Adapter (121/6214) not configured, using fallback.
[INFO] [Autoconf]: Nintendo GameCube Controller Adapter (121/6214) not configured, using fallback.

This is the profile I want it to detect:
GameCube Controller Adapter.cfg

input_device_display_name = "GameCube Controller Adapter"
input_driver = "sdl2"
input_device = "DragonRise Inc. GameCube Controller Adapter"
input_vendor_id = "121"
input_product_id = "6214"
# etc...  lots of mappings

It's shown like this on lsusb:

Bus 002 Device 007: ID 0079:1846 DragonRise Inc. GameCube Controller Adapter

I wanted to contribute this controller configuration to the repo, since it does work, but with this I don't even know if I should.

Expected behavior
  • Adding a profile on "local config" autoconfig folder should override as if I had added/changed it on "app install dir" autoconfig folder, so it's not lost on updates.
  • Clearer explanation on what is the error when trying to save the controller bindings in-app. On UI, or at least in stdout/stderr logs.
Actual behavior
  • Only works when .cfg file is next to the bundled ones. Lost on flatpak updates.
  • Obscure error, so I can't even figure out if I'm doing something wrong, or if it has anything to do with Flatpak sandboxing or with my specific adapter device, or some other solvable issue.
Steps to reproduce the bug

Might be difficult to reproduce without having this specific GameCube-USB adapter (and it's brand-less too, not Nintendo official). But I basically tried to follow instructions from here under Generating a controller profile (which btw is outdated wrt menu names).

When I try to "Save Controller Profile" after adding the file next to the bundled autoconfig profiles (since it's impossible to navigate on the menus otherwise with its fallback configuration thinking an axis is always pressed), it won't work, and it only shows "Error saving controller profile." which is not even logged.

Bisect Results

N/A

Version/Commit
  • RetroArch: v1.17.0 (commit ad8975c), from Flathub
Environment information
  • OS: Kubuntu 23.10; Linux 6.5.0-17-generic x86_64
  • Flatpak: flathub/org.libretro.RetroArch

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the “Save Controller Profile” action and the local autoconfig path under ~/.var/app/org.libretro.RetroArch/config/retroarch/autoconfig/. Compare its behavior with the bundled autoconfig/sdl2/ location and check how the Flatpak environment affects writes. Done means a local GameCube Controller Adapter.cfg can be saved or loaded without modifying the install path, and failures are reported clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.