xref: /src/share/man/man4/ps4dshock.4 (revision b6cad334e649f49c57da52b139de353ad9078985)
1.\" Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org>
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\"    notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright
9.\"    notice, this list of conditions and the following disclaimer in the
10.\"    documentation and/or other materials provided with the distribution.
11.\"
12.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22.\" SUCH DAMAGE.
23.\"
24.Dd November 30, 2025
25.Dt PS4DSHOCK 4
26.Os
27.Sh NAME
28.Nm ps4dshock
29.Nd Sony PlayStation 4 Dualshock 4 gamepad driver
30.Sh SYNOPSIS
31To compile this driver into the kernel,
32place the following lines in your
33kernel configuration file:
34.Bd -ragged -offset indent
35.Cd "device ps4dshock"
36.Cd "device hid"
37.Cd "device hidbus"
38.Cd "device hidmap"
39.Cd "device evdev"
40.Ed
41.Pp
42Alternatively, to load the driver as a
43module at boot time, place the following line in
44.Xr loader.conf 5 :
45.Bd -literal -offset indent
46ps4dshock_load="YES"
47.Ed
48.Sh DESCRIPTION
49The
50.Nm
51driver provides support for Sony PlayStation 4 Dualshock 4 gamepad driver.
52.Pp
53The
54.Pa /dev/input/event*
55device presents the game controller as a
56.Ar evdev
57type device.
58It is accessible to members of the
59.Em games
60group.
61.Sh SYSCTL VARIABLES
62Next parameters are available as
63.Xr sysctl 8
64variables.
65Debug parameter is available as
66.Xr loader 8
67tunable as well.
68.Bl -tag -width indent
69.It Va dev.p4dshock.*.led_state
70LED state: 0 - off, 1 - on, 2 - blinking.
71.It Va dev.p4dshock.*.led_color_r
72LED color.
73Red component.
74.It Va dev.p4dshock.*.led_color_g
75LED color.
76Green component.
77.It Va dev.p4dshock.*.led_color_b
78LED color.
79Blue component.
80.It Va dev.p4dshock.*.led_delay_on
81LED blink.
82On delay, msecs.
83.It Va dev.p4dshock.*.led_delay_off
84LED blink.
85Off delay, msecs.
86.It Va hw.hid.ps4dshock.debug
87Debug output level, where 0 is debugging disabled and larger values increase
88debug message verbosity.
89Default is 0.
90.El
91.Sh FILES
92.Bl -tag -width /dev/input/event* -compact
93.It Pa /dev/input/event*
94input event device node.
95.El
96.Sh BUGS
97The
98.Nm
99does not support force-feedback events.
100.Sh HISTORY
101The
102.Nm
103driver first appeared in
104.Fx 13.0 .
105.Sh AUTHORS
106.An -nosplit
107The
108.Nm
109driver was written by
110.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org .
111