PS4DSHOCK(4)
๐ PS4DSHOCK ๐
okay bestie, so this is page 4 of the Kernel Interfaces Manual and it's literally all about ps4dshock โ the Sony PlayStation 4 Dualshock 4 gamepad driver. yes, that's the whole vibe. your controller, but make it FreeBSD. ๐ฎโจ
๐ธ NAME ๐ธ
ps4dshock โ Sony PlayStation 4 Dualshock 4 gamepad driver
no cap, that's it. that's the name. short, iconic, does what it says on the tin. ๐
๐ SYNOPSIS ๐
so there's two ways to get this driver living in your system, and honestly both are valid. pick your fighter:
compiling it into the kernel ๐ง
drop these lines into your kernel configuration file, in exactly this order, don't @ me:
device ps4dshock
device hid
device hidbus
device hidmap
device evdev
like, all five. the whole squad. no substitutions. ๐ซถ
orrrr loading it as a module ๐ฅ
if you'd rather not rebuild your kernel (fair, honestly), just load the driver as a module at boot time by putting this line in loader.conf(5):
ps4dshock_load="YES"
one line. that's the whole thing. slay. โญ
โจ DESCRIPTION โจ
the ps4dshock driver provides support for the Sony PlayStation 4 Dualshock 4 gamepad driver. yes, that sentence says "driver" twice โ it's giving main character energy, we love it, moving on. ๐
the /dev/input/event* device presents the game controller as an evdev type device. and here's the tea: it's accessible to members of the games group. so if your controller is being weirdly invisible, bestie, check your groups first. ๐
๐ SYSCTL VARIABLES ๐
these parameters are available as sysctl(8) variables. and psst โ the debug parameter is also available as a loader(8) tunable, so you can set it before the system even fully wakes up. โญ
dev.p4dshock.*.led_stateโ LED state, and the values are:0- off,1- on,2- blinking. three moods. pick one. ๐กdev.p4dshock.*.led_color_rโ LED color. the red component. โค๏ธdev.p4dshock.*.led_color_gโ LED color. the green component. ๐dev.p4dshock.*.led_color_bโ LED color. the blue component. ๐dev.p4dshock.*.led_delay_onโ LED blink. the on delay, in msecs. โฑ๏ธdev.p4dshock.*.led_delay_offโ LED blink. the off delay, in msecs. โฑ๏ธhw.hid.ps4dshock.debugโ debug output level, where0is debugging disabled and larger values increase debug message verbosity. default is0. ๐
note that the LED ones live underdev.p4dshock.*while the debug one ishw.hid.ps4dshock.debugโ that's not a typo on my part, that's literally how they're spelled. copy them exactly or the sysctl will simply not perceive you. ๐
๐ฆ FILES ๐ฆ
/dev/input/event*โ input event device node. this is where your controller shows up to the party. ๐
๐ BUGS ๐
the ps4dshock does not support force-feedback events. so no rumble. no haptics. no shakey-shake. the controller will not vibrate dramatically when you get hit. it's just gonna sit there, looking pretty. ๐ญ
๐ HISTORY ๐
the ps4dshock driver first appeared in FreeBSD 13.0. a whole era. ๐
๐ AUTHORS ๐
the ps4dshock driver was written by Vladimir Kondratyev <wulf@FreeBSD.org>. give him a follow, give him a flower, give him the credit he deserves. ๐ซถ๐ธ
and that's the page bestie!! this one came to you from the Debian crew, dated November 30, 2025 โ so like, thank the Debian manual-page people and the FreeBSD driver people both, because they made this whole thing possible. go forth and game. ๐ฎ๐โจ
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms