protonscr

[Feature Request] Steam Input should respect exclusive hidraw locks and allow for third party applications to take exclusive control of a controller

steamopen General controller / Steam Input
ValveSoftware/steam-for-linux#13534 · opened 2026-08-21 by skyrina · updated 2026-08-22 · 0 comments · github
Sskyrina 2026-08-21 github

Your system information

  • Steam client version (build number or date): 1787097529
  • Distribution (e.g. Ubuntu): NixOS
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes
  • Steam Logs: N/A
  • GPU: AMD

Please describe your issue in as much detail as possible:

I would like to ask for Steam Input to take a shared advisory lock (flock() on linux, LockFileEx on windows) when it opens a HID device, and release the device if it finds an exclusive lock, so that third-party applications can take specific controllers from Steam Input's management.
When Steam Input recognizes a supported controller it opens the corresponding /dev/hidrawX device directly and starts managing it regardless of whether another program was already using the same device. There is no way for a third party program (for example a custom controller driver) to tell Steam Input that it wants to manage a specific device instead.

This is how I expected it to work:
Before opening a HID device Steam Input tries taking a shared lock. Steam Input doesn't need exclusivity for its purposes so I believe a shared lock makes sense in this situation.
A third party program that wants exclusive ownership of a controller takes an exclusive lock before Steam Input and after launching Steam the lock attempt fails and Steam Input leaves the device alone.

Since exclusive locks can't evict existing shared lock holders, Steam Input could try to periodically check if there are any exclusive locks on the device.

If this isn't a viable approach an equivalent mechanism for allowing third-party applications to take a specific controller out of Steam Input's management would also work.

Steps for reproducing this issue:

  1. Have a Steam Input compatible controller connected.
  2. run sudo flock -x /dev/hidrawX -c 'sleep infinity' to lock the HID device exclusively
  3. Launch Steam
  4. Observe that Steam still opens and manages the same HID device

Nothing extracted yet.