Coder Social home page Coder Social logo

extest's Introduction

Extest - X11 XTEST Reimplementation for Steam Controller on Wayland

Extest is a drop in replacement for the X11 XTEST extension. It creates a virtual device with the uinput kernel module. It's been primarily developed for allowing the desktop functionality on the Steam Controller to work while Steam is open on Wayland.

Usage

Be sure you have Rust installed. You will also need to install a 32 bit Rust toolchain.

rustup target add i686-unknown-linux-gnu
cargo build --release

This will create a library named libextest.so in target/i686-unknown-linux-gnu/release. Note that this library is 32 bit by default because Steam is a 32 bit application.

You will also need to add your user to the input group if not added already, so that your user can be allowed to actually create fake devices:

sudo usermod -a -G input <your username>

You can then use LD_PRELOAD to override any app that wants to use XTEST functions that have been reimplemented by Extest. Example:

LD_PRELOAD=/path/to/libextest.so steam

The repository also comes with a script to automatically override Steam's desktop file so that whenever you launch Steam from the desktop file (i.e. via desktop icon or application menu) Extest will be automatically preloaded. Just run it like so:

./override_steam_desktop_file.sh

extest's People

Contributors

supreeeme avatar brettalcox avatar drogeek avatar

Stargazers

Dmitry Sandalov avatar Adam Killam avatar Patola avatar  avatar Lenny. avatar  avatar Benedykt Jaworski avatar  avatar Jean Lucas avatar Junjie Wu avatar 3D avatar  avatar  avatar Kris avatar ilme avatar Björn Tantau avatar Bill D. Strong avatar Val Packett avatar Scott O'Mary avatar Shayne Hartford avatar Chenx Dust avatar Richie avatar  avatar fjsevilla avatar  avatar TrainDoctor avatar AAGaming avatar Derek avatar Airradda avatar Tom Bebb avatar Parker Reed avatar Fabio Sussarellu avatar Azalea R. avatar trigg avatar Bayazid B. Halim avatar Morgan Helton avatar  avatar Yossef avatar Bloo Alien avatar Isak Lindbeck avatar Rafał Boniecki avatar Devin Cofer avatar Steve Fan avatar Daimar Stein avatar Marco Rodolfi avatar Diana avatar Lukas Fritsch avatar Brysen Sayre avatar  avatar Enzo avatar Salvatoreny avatar  avatar  avatar Nikki avatar Kyle Gospodnetich avatar Lyle Wilner avatar jerb avatar  avatar  avatar Christopher Crockett avatar LiveLM avatar Krompus avatar Straussn avatar Etienne avatar  avatar Christoph avatar  avatar Nabos avatar Igor Shegolev avatar Nikolaos Bezirgiannis avatar Ari avatar  avatar  avatar mojamuto avatar David Tägt avatar Dennis Zhang avatar ash lea avatar

Watchers

Parker Reed avatar Airradda avatar  avatar Nabos avatar  avatar

extest's Issues

Steam breaks in odd ways on Plasma 6.0.5 and latest Beta when connecting Steam Controller

When I connect a steam controller with this library loaded, the steam controller becomes unresponsive to any commands or button presses (requiring a hard shutoff).
The Steam UI also becomes partially unresponsive and outputs the following some time after connecting the controller

src/clientdll/controller.cpp (5231) : CGetControllerInfoWorkItem::RunFunc: too many read failures. src/clientdll/controller.cpp (5231) : CGetControllerInfoWorkItem::RunFunc: too many read failures. assert_20240626114726_32.dmp[776800]: Uploading dump (out-of-process) /tmp/dumps/assert_20240626114726_32.dmp assert_20240626114726_32.dmp[776800]: Finished uploading minidump (out-of-process): success = yes assert_20240626114726_32.dmp[776800]: response: CrashID=bp-6cb1d894-6e6e-4178-8bba-bbded2240626 assert_20240626114726_32.dmp[776800]: file ''/tmp/dumps/assert_20240626114726_32.dmp'', upload yes: ''CrashID=bp-6cb1d894-6e6e-4178-8bba-bbded2240626'' src/clientdll/steamengine.cpp (2742) : Assertion Failed: CSteamEngine::BMainLoop appears to have stalled > 15 seconds without event signalled src/clientdll/steamengine.cpp (2742) : Assertion Failed: CSteamEngine::BMainLoop appears to have stalled > 15 seconds without event signalled assert_20240626114751_38.dmp[777157]: Uploading dump (out-of-process) /tmp/dumps/assert_20240626114751_38.dmp assert_20240626114751_38.dmp[777157]: Finished uploading minidump (out-of-process): success = yes assert_20240626114751_38.dmp[777157]: response: CrashID=bp-bef388cf-b988-4acd-b773-282e82240626 assert_20240626114751_38.dmp[777157]: file ''/tmp/dumps/assert_20240626114751_38.dmp'', upload yes: ''CrashID=bp-bef388cf-b988-4acd-b773-282e82240626''''

Any Library items currently "cached" will still display, but any games that have not been clicked this session will just perpetually load. All menu items cease to function and games will not launch.
Steam will eventually close on it's own after this occurs.

Disconnecting the Steam Controller will not make steam responsive again and the Steam Controller will not revert to Lizard mode if steam is killed unless the controller is reconnected afterwards.

Starting steam without the library loaded results in previous expected behaviour. Trackpads work, but cursor does not update visually

EDIT: Upon further diagnosing, it seems it's broken both with or without the library running. I will be opening issue in appropriate location.

Mouse Region and Move Cursor bindings

It seems like these are the only two things that doesn't fare well with this as the cursors are still invisible. The rest of the mouse related bindings and input styles seem to work. Tested in both the desktop and Cookie Clicker

Some keys incorrectly mapped

Sadly I still have some keys that seem to make the current field defocus (might be bound now to the tab key), which are: @, #, { and }. If you can make them behave, thanks a lot :)

Cursor does not move locally when using Remote Play.

When streaming a game with Remote Play, mouse cursor motion is sent to the other PC as expected, but the local cursor is not moved. Cursor style changes and hide/reveal happen but the local cursor never moves. The only way to move both remote and local cursors in game is with the guide button chord commands. I'm using the libextest.so bazzite distributes right now, but I'll build it myself and try that just as soon as I get to grips with the whole toolbox thing.

wrong ELF class: ELFCLASS32

Hi,

OS: Fedora Linux 37 (Workstation Edition)

It builds correctly with a 32bit toolchain but when I start steam with this command:

LD_PRELOAD=target/i686-unknown-linux-gnu/release/libextest.so steam

I receive a lot of the following error:

ERROR: ld.so: object '/home/nabos/clones/extest/target/i686-unknown-linux-gnu/release/libextest.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.

What can I do to try to debug this issue ?

To test if it works I configured a desktop configuration for my steam controller, opened wev and tried to press some buttons on the controller. Am I right to think that with extest working wev should receive and display the inputs ?

Thank you for your work

Error compiling

Hello, I am receiving the following error when attempting to compile

linking with `cc` failed: exit status: 1

Would you happen to know what the issue is?

Fedora 38 - KDE Plasma

Allow specifying wayland display

Would be nice to allow specify wayland display with env variable such as EXTEST_WAYLAND_DISPLAY. So you can expose the env variable to the library but not the main process or any child processes.

Create a release?

Would allow me to easily package it up for NixOS with a specific tag to point to.

Permission denied on Arch Linux

User is in the input group. Whenever I launch Steam it runs fine until I try to move the mouse and the entire thing crashes with Rust printing a permission denied.

What file is this trying to access so I can check permissions?

Issues with modifiers

Hi, first I wanted to say thanks for making this, it's incredible that Steam Input can finally just be used on Wayland.

I ran into this issue in testing the Steam keyboard. The Tab key does nothing, and modifiers like caps lock and left shift don't change the output.

Tab is the odd one since it's not a modifier, in my testing it seems as if it doesn't even fire XTestFakeKeyEvent.

Mouse scroll bindings are duplicated

In games configured with mouse scroll bindings, scrolling inputs seem to be duplicated. This can be an issue in navigating hotbars, as only only odd slots can be accessed.

I could replicate the behavior in Terraria(native), non-Steam Minecraft Java launched through PolyMC, and Wolfenstein: The New Order running through the latest Proton-GE. I'm currently running Nobara 39 - which now bundles extest with its Steam package, but the same was true of 38 with a manual installation. Notably, 38 ran GNOME 44 for its shell, and 39 is running 45.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.