---
name: "ps4dshock"
section: "4"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/ps4dshock"
---

# ps4dshock(4)

Sony PlayStation 4 Dualshock 4 gamepad driver

## NAME

**ps4dshock** – Sony PlayStation 4 Dualshock 4 gamepad driver

## SYNOPSIS

**device** **ps4dshock** **device** **hid** **device** **hidbus** **device** **hidmap** **device** **evdev**

In [loader.conf(5)](/loader.conf/5.md): **hw.hid.ps4dshock.debug** **ps4dshock\_load="YES"**

In [loader.conf(5)](/loader.conf/5.md) or [sysctl.conf(5)](/sysctl.conf/5.md): **dev.p4dshock.\*.led\_state** **dev.p4dshock.\*.led\_color\_r** **dev.p4dshock.\*.led\_color\_g** **dev.p4dshock.\*.led\_color\_b** **dev.p4dshock.\*.led\_delay\_on** **dev.p4dshock.\*.led\_delay\_off**

## DESCRIPTION

The **ps4dshock** driver provides support for Sony PlayStation 4 Dualshock 4 gamepad driver.

The */dev/input/event\** device presents the game controller as a *evdev* type device. It is accessible to members of the *games* group.

## SYSCTL VARIABLES

Next parameters are available as [sysctl(8)](/sysctl/8.md) variables. Debug parameter is available as [loader(8)](/loader/8.md) tunable as well.

- *dev.p4dshock.\*.led\_state*

  LED state: 0 - off, 1 - on, 2 - blinking.

- *dev.p4dshock.\*.led\_color\_r*

  LED color. Red component.

- *dev.p4dshock.\*.led\_color\_g*

  LED color. Green component.

- *dev.p4dshock.\*.led\_color\_b*

  LED color. Blue component.

- *dev.p4dshock.\*.led\_delay\_on*

  LED blink. On delay, msecs.

- *dev.p4dshock.\*.led\_delay\_off*

  LED blink. Off delay, msecs.

- *hw.hid.ps4dshock.debug*

  Debug output level, where 0 is debugging disabled and larger values increase debug message verbosity. Default is 0.

## FILES

- */dev/input/event\**

  input event device node.

## BUGS

The **ps4dshock** does not support force-feedback events.

## HISTORY

The **ps4dshock** driver first appeared in FreeBSD 13.0.

## AUTHORS

The **ps4dshock** driver was written by Vladimir Kondratyev ⟨*wulf@FreeBSD.org*⟩.
