Skip to content

Instantly share code, notes, and snippets.

@zerkz
Last active February 23, 2024 19:11
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerkz/6987e322882851d47b89ecd84dbc5b0f to your computer and use it in GitHub Desktop.
Save zerkz/6987e322882851d47b89ecd84dbc5b0f to your computer and use it in GitHub Desktop.
[Linux] Simple Guide To Using a PS5 Controller with Chiaki

Overview

This guide is meant for those using Linux and wanting to use a PS5 Controller (Dualsense) with Chiaki to enable remote play for PS4/PS5.

If you're using a Steam Deck, check out the great chiaki4deck project instead.

Despite the PS5 Controller support added to the 5.12 kernel, I had issues getting it to be recognized by Chiaki.

I've only verified these steps on a PopOS 21.10 (Ubuntu derivative) system, running on 5.16 kernel.

If you have an alternate solution for Linux that worked for you, leave a comment to help others out!

What does this guide provide?

A reliable way of mapping your PS5 controller buttons to keyboard inputs, and then mapping those keyboard inputs to Chiaki.

This works when wired via USB-C, or wirelessly via bluetooth.

What doesn't work, and other oddities.

  • Haptic stuff does not seem to work.
  • Touchpad "button" seems to be recognized even though we can't explicitly map it using AntiMicroX.

Guide

Install dependencies

Both Chiaki and AntiMicroX have AppImage's available. AppImageLauncher handles easily integrating AppImages. Or you can run it manually

Map your PS5 Controller to Keyboard Inputs.

Run AntiMicroX (if you don't see it, it's likely running in your OS's "tray").

Your controller should be detected, and you should see inputs from it flashing as you pressed them on the controller.

Start mapping all buttons to keyboard inputs. I suggest avoiding dangerous keys like Delete, modifier keys like ctrl or alt, etc. Once finished, be sure to save them!

Here are mine for example:

res_mappings_1.png res_mappings_2.png

Configure Chiaki's mappings.

Run Chiaki, click the gear to open settings.

Click through each setting, hit the corresponding button on your controller, and it should be set to what you configured in AntiMicroX.

Here's my configuration for example:

res_chiaki_config.png

That's it. Connect to your PS5 remotely and test it out!

@zerkz
Copy link
Author

zerkz commented Jan 9, 2023

SDL is definitely something I would suggest (and seems future proof). Recently Chiaki got some new updates that allow touchpad / sensor handling via SDL.

I've tried this out on my Steam Deck using Chiaki, and it was beautiful. The gyro sensors integrated great with games like God of War.

@danfulf
Copy link

danfulf commented Jan 14, 2023

Thank you very much all for the input here.

Between @cjones26 and @ayrton04 comments, I now have Chiaki built on Fedora 37 and DualSense is working. Runs so much better than the Windows Official client.

Much appreciated, thank you.

@golgotow
Copy link

can you share your config file ?

@54keesh
Copy link

54keesh commented Feb 17, 2024

Great, thanks it worked, lemme share the antimicrox config file for anyone else to use, just paste the following xml markdown into an .amgp file and load the config into the antimicrox

<?xml version="1.0" encoding="UTF-8"?> <gamecontroller configversion="19" appversion="3.3.4"> <!--The SDL name for a joystick is included for informational purposes only.--> <sdlname>PS5 Controller</sdlname> <!--The Unique ID for a joystick is included for informational purposes only.--> <uniqueID>0300fd574c050000e60c00001181000013563302</uniqueID> <stickAxisAssociation index="1" xAxis="1" yAxis="2"/> <stickAxisAssociation index="2" xAxis="3" yAxis="4"/> <vdpadButtonAssociations index="1"> <vdpadButtonAssociation axis="0" button="12" direction="1"/> <vdpadButtonAssociation axis="0" button="13" direction="4"/> <vdpadButtonAssociation axis="0" button="14" direction="8"/> <vdpadButtonAssociation axis="0" button="15" direction="2"/> </vdpadButtonAssociations> <names> <controlstickname index="1">Stick 1</controlstickname> <controlstickname index="2">Stick 2</controlstickname> </names> <sets> <set index="1"> <stick index="1"> <stickbutton index="5"> <slots> <slot> <code>0x53</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> <stickbutton index="7"> <slots> <slot> <code>0x41</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> <stickbutton index="1"> <slots> <slot> <code>0x57</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> <stickbutton index="3"> <slots> <slot> <code>0x44</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> </stick> <stick index="2"> <stickbutton index="5"> <slots> <slot> <code>0x47</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> <stickbutton index="7"> <slots> <slot> <code>0x46</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> <stickbutton index="1"> <slots> <slot> <code>0x54</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> <stickbutton index="3"> <slots> <slot> <code>0x48</code> <mode>keyboard</mode> </slot> </slots> </stickbutton> </stick> <dpad index="1"> <dpadbutton index="4"> <slots> <slot> <code>0x1000015</code> <mode>keyboard</mode> </slot> </slots> </dpadbutton> <dpadbutton index="8"> <slots> <slot> <code>0x1000012</code> <mode>keyboard</mode> </slot> </slots> </dpadbutton> <dpadbutton index="1"> <slots> <slot> <code>0x1000013</code> <mode>keyboard</mode> </slot> </slots> </dpadbutton> <dpadbutton index="2"> <slots> <slot> <code>0x1000014</code> <mode>keyboard</mode> </slot> </slots> </dpadbutton> </dpad> <trigger index="5"> <deadZone>2000</deadZone> <throttle>positivehalf</throttle> <hapticTrigger>None</hapticTrigger> <triggerbutton index="2"> <slots> <slot> <code>0x4f</code> <mode>keyboard</mode> </slot> </slots> </triggerbutton> </trigger> <trigger index="6"> <deadZone>2000</deadZone> <throttle>positivehalf</throttle> <hapticTrigger>None</hapticTrigger> <triggerbutton index="2"> <slots> <slot> <code>0x49</code> <mode>keyboard</mode> </slot> </slots> </triggerbutton> </trigger> <button index="1"> <slots> <slot> <code>0x4a</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="2"> <slots> <slot> <code>0x4b</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="3"> <slots> <slot> <code>0x4c</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="4"> <slots> <slot> <code>0x4d</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="5"> <slots> <slot> <code>0x1000003</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="6"> <slots> <slot> <code>0x1000010</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="7"> <slots> <slot> <code>0x1000011</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="8"> <slots> <slot> <code>0x1000016</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="9"> <slots> <slot> <code>0x1000017</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="10"> <slots> <slot> <code>0x5b</code> <mode>keyboard</mode> </slot> </slots> </button> <button index="11"> <slots> <slot> <code>0x5d</code> <mode>keyboard</mode> </slot> </slots> </button> </set> </sets> </gamecontroller>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment