* fix: Remote Play gets the Steam Deck controller
Steam's Remote Play client reads the controller itself from its own
streaming_client process. The input preload only exposed the virtual
Deck controller (and the DualShock 4 / DualSense pads that share its
code) to the process named steam, so in Steam Deck controller mode
streaming_client was refused /dev/hidraw16 and the stream got no input:
streaming_clien: deck: /dev/hidraw16 refused: not the Steam client
streaming_client now sees the same Deck, DualShock 4 and DualSense pads
as Steam. Each opener gets its own report stream from the read-only
ring, so the two processes do not compete for input. The Steam
Controller paths stay Steam-only: the paired controller's feature and
output slot is serialised only within one process.
Fixes#1860
* fix: Remote Play also gets the Steam Controller and touch controls
streaming_client now opens the Steam Controller pads (the app's
emulated one and a paired controller) and Steam's touch controller,
like the Steam Deck pad.
A paired controller's feature request and output slots, and the touch
controller's state, are shared with the app and written under a
seqlock that expects one writer. Their writers now also take a flock
on a lock file in the hook directory, so Steam and streaming_client
take turns. touch_state() was a template holding its own static mutex,
so each caller had a separate one; it now shares a single mutex.
The pad type and touch plug watchers run in streaming_client too, so
it gets the udev events for mode switches and replugs; those only reach
the process that injects them. Poking /dev watchers and moving event0
on the shared filesystem stay with Steam, so they happen once.
* fix: the shared slot lock fails safe and never waits forever
If the lock file cannot be opened or locked, ProcessSlotLock used to
carry on unlocked. Steam alone is still a single writer then, exactly
as before streaming_client could open these devices, so it carries on;
streaming_client now leaves the paired controller's feature and output
slots and the touch state alone instead (feature reads fail with EIO).
The first failure is logged.
The wait for the lock is now bounded: a session freeze can stop the
process holding it, and writers wait with controller_mutex held, so an
unbounded flock could stall all input in the other process. Feature
reads wait up to their 500 ms reply timeout, outputs 100 ms and touch
state 20 ms. When the deadline passes the lock is held by the other
process, so neither proceeds; the operation is skipped and logged.
* fix: Steam no longer turns motion off under its Remote Play client
Steam and streaming_client both set the Deck pad's IMU mode, and both
wrote the one word Android reads to decide whether to feed the gyro.
Steam keeps toggling its own mode during a stream, so it could switch
motion off while the Remote Play layout needed it, and the client never
re-sent an unchanged mode.
Each process now has its own word. Android reads motion while either
wants it, and ignores the Remote Play word once that process is gone.
* fix: Remote Play decides motion while Steam has set no mode
Until Steam published its IMU mode, Android reported the mode as unknown
without reading the Remote Play client's word, so a Remote Play request
to stop motion had no effect. The word that has been set now decides,
and the mode stays unknown only while neither process has set one.
The rule moves into ImuModes so it can be tested on the JVM.
---------
Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
* fix: x86 Linux games that also ship for Windows run under Proton again
Since #749 the live compatibility helper treated every installed game with
both Windows and x86 Linux builds as a user's native choice, because the
client reports an empty tool for unmapped games. Those games were left on
the Steam Linux Runtime, which cannot start them here (bwrap fails, or FEX
looks for a RootFS that is not shipped), so Valheim, Moonlighter, Half-Life 2,
TF2 and others exited within seconds.
- An unmapped game the helper never managed now gets the default Proton.
Clearing a mapping the helper set is still kept as a native choice.
- Native choices are stored under "native_choices". The old "native" list
also held games nobody picked, so it is dropped.
* feat: Linux builds run under FEX by default, with the runtimes fetched automatically
- Steam fetches Proton, FEX, Steam Linux Runtime 3.0 and 4.0 on the first start and keeps them updated instead of leaving them pending.
- Games that ship a Linux build go to FEX once it can run them; Windows-only games and installed Windows builds keep the Proton default.
- FEX runs games on a combined x86 runtime with the newer glibc and libstdc++ the GL and Vulkan thunks need.
- Vulkan display extensions the driver cannot handle are hidden in front of the thunk, without an audit module.
- Mono's incremental garbage collector is turned off under FEX, which stops Unity games crashing.
- x86 Steamworks finds the x86 steamclient.
- 32-bit games read the virtual controller.
* fix: controllers work in Linux Unity games such as Valheim
Joystick ioctls on an event node now fail with EINVAL like the kernel's evdev, so the SDL2 that Unity embeds reads the pad's real ID instead of ignoring it as 0000:0000.
* test: skip the switch script test without node, and the ring tests without gcc
* fix: games with a Linux build keep the Proton default
The Windows build often runs better, so titles that ship both builds stay on the default Proton again. Users can still pick FEX for one, and that choice is kept. Linux-only titles still go to FEX.
* fix: unmapped dual-platform games get Proton even when config.vdf cannot be read