How to Use a PS4 Controller on Linux: USB, Bluetooth, and Steam

A PS4 controller (DualShock 4) usually works on a current Linux distribution without a separate driver. Connect it with USB or pair it over Bluetooth, then let Linux expose it as a gamepad. If you play through Steam, Steam Input can use a game's built-in controller support or translate the controller's buttons when the game needs help. Start with USB if you want the quickest setup.

A DualShock 4 controller connected to a Linux laptop with a USB cable.
A DualShock 4 controller connected to a Linux laptop with a USB cable.

Connect a DualShock 4 with USB

  1. Use a micro-USB cable that carries data; some charging cables do not transfer input.
  2. Connect the controller directly to a USB port on your Linux computer. Press the PS button if its light bar stays off.
  3. Open a game with controller support or the controller test/settings page in your desktop or emulator. Press buttons and move both sticks to confirm input.

Most mainstream distributions include the Linux kernel's Sony HID support, so you should not need to compile a driver or run a system-wide Python install. If the controller does not appear, try another data cable and USB port before changing drivers.

Pair the PS4 controller over Bluetooth

  1. Turn the controller off. If its player light is on, hold the PS button until it goes dark. Unplug any USB cable.
  2. Hold Share, then hold the PS button until the light bar flashes. The controller is now discoverable.
  3. On Linux, open the desktop's Bluetooth settings, enable Bluetooth, and choose the controller in the nearby-device list. It commonly appears as Wireless Controller; select Pair or Connect.
  4. When pairing completes, the light bar should stop its rapid pairing flash. Test the sticks and buttons in a game or Steam.
A Linux Bluetooth panel listing Wireless Controller with a Pair button.
A Linux Bluetooth panel listing Wireless Controller with a Pair button.

If it does not show up, make sure the controller is not still connected to a console or another computer, then repeat pairing mode. Bluetooth menus differ across GNOME, KDE Plasma, and other desktops, but the controller-side button sequence is the same.

Set up the controller in Steam

Install Steam from your distribution's software center or supported package repository, or use Valve's official Steam download page. Launch Steam, sign in, and connect the controller before opening a game.

  1. Open Steam > Settings > Controller. Check that the DualShock 4 appears as a connected PlayStation controller. The exact labels can vary between Steam client versions.
  2. Leave Steam Input on its default behavior first. Valve's current approach routes a PlayStation controller to a game's own support when the game provides it, and uses Steam Input when the game does not. You can change PlayStation controller support globally in Controller settings.
  3. For one game, open its Library page and select the controller configuration button near the play controls. Choose a recommended or community layout, or edit button assignments if the game's default mapping is unsuitable. Relaunch the game after changing its input mode.
Steam controller settings showing a connected PlayStation controller and support options.
Steam controller settings showing a connected PlayStation controller and support options.

Steam's store and Library pages can also show whether a title lists DualShock support and whether support is USB-only. A controller can be detected by Linux and Steam while a particular game still lacks full controller support. In that case, try Steam Input for that title or use keyboard and mouse for menus the game has not mapped.

Use the controller with a non-Steam game

A native Linux game may read the gamepad directly, in which case open its own Controls or Input menu and select the controller. For a compatible external game, Steam can also launch it after you choose Games > Add a Non-Steam Game to My Library. Then set or adjust its layout from the Library controller configuration button. This does not make every launcher or game compatible; the game still needs to accept controller input or a usable Steam Input mapping.

A controller layout screen with DualShock 4 buttons and triggers mapped for a game.
A controller layout screen with DualShock 4 buttons and triggers mapped for a game.

Fix common connection problems

  • Linux does not detect it: test with USB first, use a known data cable, and try another port. For Bluetooth, remove an old saved pairing in the desktop's Bluetooth panel and pair again.
  • Steam detects it but the game does not: confirm the game supports controllers, then try its per-game Steam Input setting. A title with native PlayStation support may behave worse if input is translated twice.
  • The game shows Xbox button prompts: this is a game-level prompt choice and does not necessarily mean the controller failed. Some games use Xbox labels for every gamepad.
  • Touchpad, vibration, or motion controls are missing: feature support depends on the game, connection type, Linux input path, and whether Steam Input is handling the device. Basic buttons and sticks can work even when an extra feature does not.

Older guides may recommend installing ds4drv with sudo pip. That is not the normal first step on a current Linux system: diagnose USB or Bluetooth detection and the game's controller settings before adding an older third-party driver.

Official references

Leave a Comment

How to Share Files Over Bluetooth on Linux with Blueman

How to Share Files Over Bluetooth on Linux with Blueman

Send and receive files over Bluetooth on Linux with Blueman. Install OBEX support, pair devices, choose a file, accept transfers, and fix common issues.

How to Connect to Servers with GNOME Files

How to Connect to Servers with GNOME Files

Connect GNOME Files to SSH/SFTP, FTP, SMB, WebDAV, or NFS with the correct server URI, sign-in details, and fixes for common connection errors.

How to Connect to Servers in Linux With the KDE Dolphin File Manager

How to Connect to Servers in Linux With the KDE Dolphin File Manager

Open SFTP, SSH, SMB, FTP, NFS, and WebDAV locations in Dolphin, sign in safely, transfer files, and save network folders for later.

How to Use a PS4 Controller on Linux: USB, Bluetooth, and Steam

How to Use a PS4 Controller on Linux: USB, Bluetooth, and Steam

Connect a DualShock 4 to Linux by USB or Bluetooth, then check controller detection and configure Steam Input only when a game needs it.

How to Speed Up the Fedora Linux App Installer

How to Speed Up the Fedora Linux App Installer

Use DNF5 parallel downloads to reduce RPM install waits in GNOME Software, then tell when mirror or Flatpak delays need a different fix.

How to Use iCloud on Linux Through Your Web Browser

How to Use iCloud on Linux Through Your Web Browser

Access iCloud on Linux in a current browser. Learn how to sign in, use iCloud Drive and other web apps, and understand the limits of browser access.

How to Back Up the Linux Bootloader to a USB Drive

How to Back Up the Linux Bootloader to a USB Drive

Save GRUB settings, boot files, and UEFI entry details to removable storage, then use rescue media to repair the correct boot path safely.

How to Install and Set Up Bitwarden on Linux

How to Install and Set Up Bitwarden on Linux

Install Bitwarden on Linux with the right DEB, RPM, Snap, Flatpak, or AppImage package, then sign in and set a secure vault timeout.

How to Change the Screensaver on Xfce: Choose a Theme and Set the Idle Time

How to Change the Screensaver on Xfce: Choose a Theme and Set the Idle Time

Pick a screensaver theme in Xfce, preview it, choose when it starts, and configure automatic locking in the separate Lock Screen tab.

How to Disable the Screensaver in GNOME Shell

How to Disable the Screensaver in GNOME Shell

Stop GNOME Shell from blanking or locking your display automatically. Change Power and Screen Lock settings, or use Caffeine for a temporary keep-awake toggle.