Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal. You can also buy games using our partner links for GOG and Humble Store.
DualShock 4 V2 vibration
slug45 Jan 10, 2017
I borrowed a dualshock 4 V1 a few days ago and after checking everything was working ok I decided to get one, so I bought a v2. I found out everything works fine except for vibration. Is it still not supported or am I doing something wrong?.

I'm running 4.8.0-2 kernel on debian testing. My udev rules are the ones from steam.

Thanks!.
slug45 Apr 17, 2017
Well, I finally got it working:

0. You MUST have kernel >=4.10
1. Disable steam's support for DS.
2. Udev rules (the ones from steam):

sudo gedit /lib/udev/rules.d/99-steam-controller-perms.rules

# This rule is needed for basic functionality of the controller in Steam and keyboard/mouse emulation
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"

# This rule is necessary for gamepad emulation; make sure you replace 'pgriffais' with a group that the user that runs Steam belongs to
KERNEL=="uinput", MODE="0660", GROUP="YOUR_USERNAME", OPTIONS+="static_node=uinput"

# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"

# DualShock 4 over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"

# DualShock 4 wireless adapter over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"

# DualShock 4 Slim over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"

# DualShock 4 over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"

# DualShock 4 Slim over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"


Trigger a refresh of UDEV rules:

sudo udevadm control --reload-rules
sudo udevadm trigger


3. If mapping is messed out, you'll probably need the correct mapping, controllermap is needed for that purpose:

sudo apt-get install build-essential xorg-dev libudev-dev libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libpulse-dev libopenal-dev libogg-dev libvorbis-dev libaudiofile-dev libpng12-dev libfreetype6-dev libusb-dev libdbus-1-dev zlib1g-dev libdirectfb-dev

download sdl 2.0.2 (woking on ubuntu 17.04):
cd
cd Downloads
wget https://libsdl.org/release/SDL2-2.0.2.zip
unzip SDL2-2.0.2.zip
cd SDL2-2.0.2
./configure
make
sudo make install
cd test
./configure
make
./controllermap

follow on screen instructions, use backspace key if you mess up an input.

Then you should get something like:

050000004c050000cc09000000810000,Wireless Controller,platform:Linux,x:b3,a:b0,b:b1,y:b2,back:b8,guide:b10,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b6,rightshoulder:b5,righttrigger:a5,leftstick:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,

Let's use this for grid autosport, for example:
gedit ~/.steam/steam/steamapps/common/GRID Autosport/share/controllermapping.txt
add the result from controllermap at the end.

Done.

I have to test it on other games. Working fine on grid autosport so far.
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.