Every article tag can be clicked to get a list of all articles in that category. Every article tag also has an RSS feed! You can customize an RSS feed too!
FlyDigi Apex 4 Linux controller support
zany130 May 27
inxi -b
System:
  Host: Garuda-Linux Kernel: 6.9.1-2-cachyos arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.0.5 Distro: Garuda Linux
Machine:
  Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
    UEFI: American Megatrends v: P5.10 date: 10/20/2022
CPU:
  Info: 6-core AMD Ryzen 5 5600X [MT MCP] speed (MHz): avg: 3666
    min/max: 550/4651
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
    driver: amdgpu v: kernel
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositors: 1: Gamescope 2: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution:
    1: 2048x864 2: 1396x785 3: 1536x864
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.8-arch1.1
    renderer: AMD Radeon RX 6700 XT (radeonsi navi22 LLVM 17.0.6 DRM 3.57
    6.9.1-2-cachyos)
Network:
  Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi
  Device-2: Intel I211 Gigabit Network driver: igb
Drives:
  Local Storage: total: 5.46 TiB used: 4.77 TiB (87.4%)
Info:
  Memory: total: 32 GiB available: 31.26 GiB used: 14.32 GiB (45.8%)
  Processes: 545 Uptime: 43m Shell: fish inxi: 3.3.34


I am trying to get my Apex 4 working on my desktop system. This is a really nice $90 controller (if you can find it at MSRP amazon over charges) that strangely works perfectly fine on steam deck but not on desktop linux (at least garuda linux and Vanilla Arch)


The controller has several conection modes:

1. PC xpad wired  not reconized as a controller by linux desktop. Steam deck works perfectly
2. PC dinput wired   Exposes all buttons including the back paddels as individual buttons! no rumble. gryo controlls mouse (share button toogles this)

3. PC xpad dongle  not reconized as a controller by linux desktop (no input device in steam, evtest, jtest). Steam deck works perfectly

4. PC dinput dongle  not reconized as a controller by linux desktop (no input device in steam, evtest, jtest). Steam deck works perfectly
5. PC xpad bluetooth  Reconized as a xbox one controller. Rumble works. no Gryo. share button can't be mapped. Backpaddles use mapping setup in the controllers software (can be mapped on the fly using the on board screen)

6. PC dinput bluetooth  Exposes all buttons including the back paddels as individual buttons! no rumble. unlike wired dinput no gryo mouse
7. Switch wired  not reconized as a controller by linux desktop (no input device in steam, evtest, jtest). Steam deck works perfectly including share back paddles (mapped with software or on board screen),rumble

8. Switch bluetooth  reconized as a switch controller, but it does not recive any input from the controller Steam deck works perfectly including share back paddles (mapped with software or on board screen),rumble, AND EVEN GYRO! (only mode with working gyro)
9. Android bluetooth Doesn't work on deck or linux desktop
10. iOS bluetooth this seems to be the same thing as xinput Bluetooth?


As you can see, pretty much all modes work on Steam Deck and it is best to use either xpad wired/dongle or switch wired for minimal latency. Switch Bluetooth fully supports everything the controller has to offer including rumble and gryo.



On Linux desktop, however, Bluetooth Xpad is the closest to fully working (unfortunately, the share key can't be used, and gyro doesn't work)

Dinput Bluetooth/wired is interesting as it exposes all buttons as individual buttons, but there is no rumble support, and I can't figure out how to map the back paddles. I can't get Steam to recognize them.

I tried setting this SDL env var.


SDL_GAMECONTROLLERCONFIG="03000000b40400001224000011010000,Flydigi APEX 4 dinput,a:b0,b:b1,back:b10,dpleft:h0.8,dpright:h0.2,dpup:h0.1,dpdown:h0.4,guide:b15,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,le
fty:a1,paddle1:18,paddle2:17,paddle3:16,paddle4: 14,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a2,righty:a3,start:b11,steam:2,x:b3,y:b4,platform:Linux," 


but that doesn't work

Last edited by zany130 on 27 May 2024 at 4:15 pm UTC
This topic has an answer marked - jump to answer.
zany130 May 27
going by my above notes I think the best mode is Bluetooth switch. On my deck everything the controller has to offer fully works here but for some reason on linux desktop I don't receive any input... I can see the controller in steam and evtest but pressing buttons does nothing.
deron9 May 27
This is also a problem I faced a long while back when I tried to swith to a controller, I didn't spend 90$ bucks on it but it was fairly operatable, same issue.
Maybe there is a problem with the platform detecting the input as a controller or it doesn't want to recognize your controller model specifically, hardly the case though
zany130 May 27
Got the gontroller working as a switch pro controller!!!

everything works including back paddles, rumble, gyro, and share button !!!

only thing is I had to add my user to the `input` group

sudo usermod -a -G input zany130

and I had to uninstall the joycon driver https://aur.archlinux.org/packages/joycond-git as that was "grabbing" my controller and preventing steam from using it.

I guess all of this could be fixed with a udev rule?

EDIT: adding

SDL_HIDAPI_DISABLE_LIBUSB=1

to /etc/environment Helps with a few of the modes of the controller not being detected as input devices



Last edited by zany130 on 28 May 2024 at 4:18 pm UTC
mdedetrich May 30
Just wanted to add that this info is also available in https://wiki.archlinux.org/title/Gamepad under 4 Multi-mode wired gamepads.

Would be great if steam could automatically do this
zany130 May 30
Yes, I referenced the gamepad arch wiki page a lot, especially the multi-mode section. That's where I saw it suggested removing the joycond, and that worked. Luckily, since the controller has onboard controls (in the screen) for switching modes, I didn't need to do any of the USB quirks stuff, but everything else is relevant to this controller

I think it mentions switch mode has the most support for the hardware (gryo) in these controllers.

What I did never get working is wired Xpad mode and dongle Xpad mode (Bluetooth Xpad works). No idea why, works fine on my steam deck :shrug: (Xpad is xbox btw)

also the gamepad page to write a quick and dirty udev rule so I don't need to have my user in the input group

File: /etc/udev/rules.d/71_FlyDigi_Apex4-Switch.rules
SUBSYSTEM=="input", ATTRS{id/product}=="2009", ATTRS{id/vendor}=="057e", MODE="0660", TAG+="uaccess"

no idea why the switch controller rule valve includes with steam doesn't work on my system (it targets the same product and vendor id as apparently flydiji are using the switch pro controller's ids for the apex 4)

File: /usr/lib/udev/rules.d/71-nintendo-controllers.rules
# Nintendo Switch Pro Controller; Bluetooth; USB
KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0660", TAG+="uaccess"
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0660", TAG+="uaccess"
# Grand access for some userspace tools, if connected via USB
SUBSYSTEM=="usb", ATTR{idProduct}=="2009", ATTR{idVendor}=="057e", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess"

# Nintendo GameCube Controller / Adapter; USB
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0660", TAG+="uaccess"

# Nintendo Switch Joy-Con Charging Grip; USB
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="200e", MODE="0660", TAG+="uaccess"

# Nintendo Switch Joy-Con (L); Bluetooth
KERNEL=="hidraw*", KERNELS=="*057E:2006*", MODE="0660", TAG+="uaccess"
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2006", MODE="0660", TAG+="uaccess"

# Nintendo Switch Joy-Con (R); Bluetooth
KERNEL=="hidraw*", KERNELS=="*057E:2007*", MODE="0660", TAG+="uaccess"
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2007", MODE="0660", TAG+="uaccess"


Last edited by zany130 on 30 May 2024 at 10:00 pm UTC
zany130 Jun 7
So update

For Xpad mode dongle and wired, you need https://github.com/medusalix/xpad-noone if you are using xpad-one



so to summarize

Xpad Wired/Dongle

everything works in this mode, but Gryo (apparently, this only fully works in switch mode on Windows as well unless you have the space station app running) and the circle button

this is also the only mode you get the 1000hz polling rate (super responsive)

Pros:
1. Rumble support
2. really fast polling rate (1000hz)

Cons:
1. No Gryo
2. no circle button


Dinput Wired/Dongle

Dinput wired and dongle mode exposes the most inputs.

you get all the standard buttons but on top of that not only does the circle button register as its own button but so do the paddles!!! meaning you can bind them to what ever you want (even keyboard keys) in something like input-remapper.

circle also acts as a toggle for a gyro mouse, which is cool (you can disable that in input-remapper if you want)

Pros:

1. Back paddles are remappable in programs like input-remapper. It can be set to keyboard keys
2. gyro mouse toggled with the circle button
3. The circle button can be remapped to something else if you want by using something like input-remapper
4. 500hz polling rate, which is still pretty good

Cons:

1. no rumble
2. no controller Gryo (only Gryo mouse with a circle button as a toggle)
3. The poll rate is limited to 500hz and not 1000hz


Switch wired/bluetooth
you might need a udev rule (the switch udev rule from steam-devices  and game-devices-udev doesn't seem to work for this controller...

Pros:

1. Rumble and gyro work
2. The circle button is mapped to share

Cons:

1. Digital triggers only (only registers full pull or nothing)
2. The lowest poll rate is only 250hz

Xinput/Dinput Bluetooth

works pretty much the same as their wired/dongle counterparts but with a lower polling rate, of course

Xinput Bluetooth was glitchy for me, sometimes refusing to connect, so stick to wired/dongle for this, and Dinput.

Android flashplay

does not work as a controller in this mode. It is intended to be used with their Android app, which allows for fancy things like touchscreen emulation.

All modes

Any configs you set in the Flidigi Station app (including trigger rumble, button mapping, macros, response curves, etc.) work. They can also be changed on the fly with the controller screen.

Button mapping/macros for the back paddles do not work in Dinputs modes since those modes expose the paddle buttons, not what they are mapped to.

Any features that need the app running, like gyro (outside of inputs gyro mouse and switch controller gyro) and DS mode (dual sense mode for adaptive triggers in dual sense games), do not work on Linux.

Last edited by zany130 on 7 June 2024 at 5:57 pm UTC
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.