Dualsense Random Remapping (Hollow Knight)

System:
  Kernel: 5.10.84-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64
    root=UUID=40809886-d17c-433b-876f-89a03d053b64 rw quiet splash apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: GNOME 41.2 tk: GTK 3.24.30 wm: gnome-shell dm: GDM 41.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: AB350-Gaming v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: AB350-Gaming-CF v: x.x serial: <superuser required>
    UEFI: American Megatrends v: F21 date: 02/08/2018
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 15.64 GiB used: 3.54 GiB (22.7%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 5 1600 bits: 64 type: MT MCP arch: Zen
    family: 0x17 (23) model-id: 1 stepping: 1 microcode: 0x8001129
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 576 KiB desc: d-6x32 KiB; i-6x64 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 2x8 MiB
  Speed (MHz): avg: 1848 high: 3346 min/max: 1550/3200 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2177 2: 2798
    3: 2869 4: 3346 5: 1402 6: 1353 7: 1374 8: 1374 9: 1374 10: 1368 11: 1375
    12: 1373 bogomips: 76671
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext clflush clflushopt clzero cmov cmp_legacy constant_tsc cpb cpuid
    cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid
    fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate irperf lahf_lm lbrv lm mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx osvw overflow_recov pae pat pausefilter pclmulqdq pdpe1gb
    perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse pse36
    rdrand rdseed rdtscp rep_good sep sev sha_ni skinit smap smca sme smep
    ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 succor svm svm_lock syscall tce
    topoext tsc tsc_scale v_vmsave_vmload vgif vmcb_clean vme vmmcall wdt
    xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Full AMD retpoline, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GP106 [GeForce GTX 1060 3GB] vendor: Micro-Star MSI
    driver: nvidia v: 495.44 alternate: nouveau,nvidia_drm bus-ID: 08:00.0
    chip-ID: 10de:1c02 class-ID: 0300
  Display: x11 server: X.org 1.21.1.2 compositor: gnome-shell driver:
    loaded: nvidia resolution: <missing: xdpyinfo>
  OpenGL: renderer: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2
    v: 4.6.0 NVIDIA 495.44 direct render: Yes
Audio:
  Device-1: NVIDIA GP106 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 08:00.1 chip-ID: 10de:10f1
    class-ID: 0403
  Device-2: AMD Family 17h HD Audio vendor: Gigabyte driver: snd_hda_intel
    v: kernel bus-ID: 0a:00.3 chip-ID: 1022:1457 class-ID: 0403
  Device-3: Sony Wireless Controller type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-4:2 chip-ID: 054c:0ce6
    class-ID: 0300
  Sound Server-1: ALSA v: k5.10.84-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.40 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel port: f000 bus-ID: 03:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
  Device-2: Broadcom BCM4360 802.11ac Wireless Network Adapter driver: wl
    v: kernel modules: bcma bus-ID: 07:00.0 chip-ID: 14e4:43a0 class-ID: 0280
  IF: wlp7s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-3: Sony Wireless Controller type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-4:2 chip-ID: 054c:0ce6
    class-ID: 0300
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 698.65 GiB used: 151.43 GiB (21.7%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 850 EVO 250GB
    size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 3B6Q scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST3500312CS
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
    type: HDD rpm: 5900 serial: <filter> rev: CA12 scheme: MBR
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: BD-RE BH30N rev: A201
    dev-links: cdrom
  Features: speed: 40 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw-size: 232.59 GiB size: 227.88 GiB (97.98%)
    used: 151.43 GiB (66.5%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: 40809886-d17c-433b-876f-89a03d053b64
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: NO_LABEL
    uuid: E832-7B45
  ID-3: /run/media/nicholas/second disk raw-size: 434.51 GiB
    size: 426.62 GiB (98.18%) used: 60 KiB (0.0%) fs: ext4 dev: /dev/sdb2
    maj-min: 8:18 label: second disk
    uuid: 1ec047b4-ec64-4d28-8893-f16ad7899256
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sdb1 maj-min: 8:17 size: 31.25 GiB fs: swap label: N/A
    uuid: 14863704-322a-453c-b7a5-87bba34bb094
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-4:2 info: Sony Wireless Controller type: Audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 4 rev: 2.0
    speed: 480 Mb/s power: 500mA chip-ID: 054c:0ce6 class-ID: 0300
  Device-2: 1-5:3 info: Corsair Gaming K70 LUX RGB Keyboard
    type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0
    speed: 12 Mb/s power: 500mA chip-ID: 1b1c:1b33 class-ID: 0300
    serial: <filter>
  Device-3: 1-6:4 info: Logitech G502 Proteus Spectrum Optical Mouse
    type: Mouse,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0
    speed: 12 Mb/s power: 300mA chip-ID: 046d:c332 class-ID: 0300
    serial: <filter>
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 4-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 32.5 C mobo: N/A gpu: nvidia temp: 51 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
  Processes: 341 Uptime: 29m wakeups: 0 Init: systemd v: 249 tool: systemctl
  Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: 1596 pacman: 1589 lib: 450
  flatpak: 0 snap: 7 Shell: Zsh v: 5.8 running-in: gnome-terminal inxi: 3.3.11

I bought a new Dualsense controller today to use with Hollow Knight but it doesn’t work properly. It worked right in Borderlands 2 and I tried Hollow Knight with Proton instead of the native version and it seemed to work alright there (my save from Linux didn’t show up in the game so I didn’t try anything beyond menus but will try tomorrow and update).

What happens is spontaneous and bizarre remappings of the controls whenever the game starts up. Sometimes all of the buttons map to the same button. Most frequently it’s the circle button (Xbox equivalent of B) and in the game itself the triggers map to the start and select buttons and the right thumbstick maps to the right trigger. I’m not sure what is going on.

Is there any way I can log the responses from the controller or see how they’re mapped locally? I saw some other workarounds online but nothing about this specific issue yet.

I tried it with Borderlands 2 which is native and it worked great. I tried it with DUSK in Lutris from GOG and that also had bizarre mappings.