-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Steam Deck Support? #665
Comments
I'd like to, but it will take few months before I can even think about buying one from here. |
Most likely I will receive my deck in May-June. I'm not as experienced as the other devs here so I can test some stuff plus maybe write some code. |
Just glad to hear it's on the radar. |
Would you also look into pushing support for the kernel driver? |
Hello, Steam Deck owner here! Got mine last Friday. The Steam Deck inputs are connected internally via USB, similar to how a wired Steam Controller works. Its vid:pid is @Jack-Sibley was doing some reverse engineering of the HID reports that it sends and at least got the gyro to work. It seems pretty similar to how the Steam Controller sends reports, so hopefully only the modifications that need to be made are minor. I am not familiar with how this project actually obtains a handle for the USB HID, but according to Jack, Steam gets upset when other apps try to access it. As a sort of workaround we were using Anyway, my point is that it's basically a necessity for this to work while Steam is open and actively using the controller, otherwise games launched from the Deck's UI wouldn't be able to utilize this. (There are cases where you would want to use SC Controller instead of the native Steam Input bindings, for e.g. cemuhook. I detailed it more here) @kozec If there is anything I can do to help out, by providing USB pcaps or otherwise, let me know! Would love to see this work with Steam Deck. |
@tjhorner does UINPUT do anything with it if Steam isn't running ? Does it show up as a DirectInput gamepad device when Windows is installed ? |
@offalynne I'm afraid not, without steam it's just a raw hid device. |
Would a non-developer be able to supply any useful info from the deck to give the development for a driver a head start? |
An unofficial mod for adding plugins to the steam deck menu. If devs do make it work alongside steam, may consider a tool which can modify config.py integrated with steam https://github.com/SteamDeckHomebrew/PluginLoader example, calculator app: |
I got my Steam Deck yesterday, but it seemed that no one else had reverse engineered the HID data layout yet, so I decided to give it a try today. Here's what I have so far: Digital inputsA bit set in these locations indicates the following:
Analog inputsNotes
Fields
@kozec, does this help? |
@cyrozap I believe |
Here's the USB descriptor, in case anyone needs it:
|
@tjhorner I did some more testing today, and you're correct--I didn't follow the right-hand rule when labeling the accelerometer and gyroscope axes, so I had X/Y and roll/yaw swapped. I've updated my earlier comment to reflect these changes, as well as to describe the gyroscope axes (since they're different from the accelerometer axes). All this has really started to confuse me, so I'm tempted to mock up a diagram illustrating how the six axes are positioned relative to the controller and how they relate to the values in the HID report. |
Behold--my extremely professional diagrams: Axis names and positive directions correspond to the ones in my earlier post. |
Related issue: kozec#665
@cyrozap have you had any other progress so far? |
Just for the record, if it needs testing I also got a Steam Deck. I wonder if it would be easy to make a flatpak out of it, because that's the standard way to install stuff on the device. |
Is it possible to buy the left and right daughterboards and plug in touchpads and plug that into a generic system? https://www.ifixit.com/Guide/Steam+Deck+Left+Button+Board+Replacement/148931 I think they refer to the cord which plugs into the mobo as a ZIF connector. Having an isolated board could help for development |
@Patola i think that should be possible, but first up is getting it to work ;) Right now im looking at the raw data output of the device. Here is what i've got so far: If you can provide some data, please feel free. Binaries for windows are available here |
Someone published source which utilizes gyro data on GitHub, but I couldn't get it working https://github.com/kmicki/SteamDeckGyroDSU |
@mKenfenheuer I haven't done any more reverse engineering work on this after I figured out the gyroscope stuff, and haven't started adding support to SC-Controller either, so feel free to start on a driver. You might want to use the field definitions I posted earlier so you don't have to reverse engineer the protocol/report format from scratch. I think the only reverse engineering work that remains to be done is to find the commands that enable the gyroscope, switch the device out of lizard mode, etc. @pattontim Rather than physically connecting the Deck's controller to a PC, I've been using USB/IP to present the controller's USB device as a virtual USB device on my laptop over the network. That way, I can do any reverse engineering and development work from the comfort of my laptop instead of directly on the Deck. |
@cyrozap i see, out of what ive got so far i think we are getting the same data format. Is your payload 64bytes too? |
Yes, it's 64 bytes. |
So, good news: i've got the sticks, triggers and most of the buttons working (although they are wrongly mapped). Does anyone know using which HID Report we can disable that? |
Got it, hid request with first byte set to 0x81 disables the mouse and keyboard input temporarily. Needs to be repeated about every 1-2 secs to keep it that way. Once i got all sticks, trackpads etc mapped i will publish another build. |
I couldnt get the mapping to work correctly here, so i decided to rewrite a separate driver specific for the steam deck. My attempt at implementing it with c is pushed to https://github.com/mKenfenheuer/sc-controller. Regarding Lizard mode here is a short snippet on how to enable/disable it: bool sdc_set_lizard_mode(bool enabled)
{
if (!enabled)
{
//Disable mouse emulation
uint8_t data[64] = { 0x87, 0x03, 0x08, 0x07 };
if (hid_request(data, -64) == NULL) {
return false;
}
//Disable keyboard/mouse button emulation
uint8_t data2[64] = { 0x81, 0x00 };
if (hid_request(data2, -64) == NULL) {
return false;
}
}
else
{
//Enable keyboard/mouse button emulation
uint8_t data[64] = { 0x85, 0x00 };
if (hid_request(data, -64) == NULL) {
return false;
}
//Enable mouse emulation
data[0] = 0x8e;
if (hid_request(data, -64) == NULL) {
return false;
}
}
return true;
}
|
Progress. Using the above linked c project and a few edits I can type using both the trackpads. However non kb inputs are doubled On the other hand, building the c branch GUI for windows is very hard because the python2 library is no longer offered. The py3 version doesn't build for windows AFAIK. I'm going to reference steam-deck-windows-usermode-driver to add the correct SD timers and inputs and then perhaps try to backport the drivers to the py3 version |
You will likely have to use the HID Hide driver, at some point, to hide the Steam Deck HID device from Steam. I have to use that driver when using my own mapper for the Steam Controller. |
To answer original question, I've just merged basic support for Steam Deck both to master and c branch. There are two-and-half remaining issues with it:
|
Good work, I pushed some edits which allows it to partially build and run on windows, at least the OSD builds and runs and I can type. May simplify build process by removing GUI and its deps, just kbm to deal with gi not being distributed https://github.com/pattontim/sc-controller-kbm/tree/origin/windows-osd-only |
Not compiling on latest master seemingly due to the Deck commit
|
This pull request is what I used to fix the above build errors. |
For the record, this is my use case (I'm trying to use the Deck's SteamOS without Steam, by bypassing the initial welcome screen without an internet connection). I got it to build and install after manually wrangling with pacman and a truckload of Python2 dependencies. |
I've set up pre-release with appimage of current git master attached here. It may need SteamOS updated to very last version, but I'm still trying to figure out how to verify that theory. |
I just stumbled upon this while trying to figure out how I could access the gyro from the unlocked SteamOS on my Deck to code an auto screen rotate script. I was confused that the Plasma settings show the Steam Deck as a gamepad with all the controls - except the gyro. Looks like sc-controller could be useful for me if it supported the Deck. Let me know if I can do something to support, I have a Steam Deck with an unlocked OS and do not fear to hack it, also I do usually code C# or PHP but I am not scared to look at C or Python. |
@WildRikku you should be able to download that AppImage that is mentioned and try running it. |
Is there already support for the capacitive touch input of the two joysticks? I can't find how to map those yet. Also, is it possible to use both trackpads for typing on linux? (Not steamos) |
I did so. The aforementioned pre-release v0.4.8.9 AppImage runs out of the box on my Steam Deck (SteamOS 3.4.4). It seems to work quite well. The gyro behaviour seems to be odd, though I don't know about calibration, so not sure if that's an issue in sc controller. I used the 6-way action assignment ("Tilt") and often triggered two actions of different axes at the same time, also apparently I always trigger the same direction for each of the three axes. Pretty close to what I was looking for though, so sc controller probably will be of help for me in the future. :) I also somehow could not assign an action to pressing the right stick.
If you want me to report other things I encounter in new issues instead of here, let me know. Also if you want to have something specific tested feel free to ask. I'd be glad to help out. Edit: Sorry, me and WildRikku is the same person, I forgot to change my account. |
Looks like Valve is adding the Deck controls to the hid-steam Linux driver. https://www.phoronix.com/news/Steam-HID-Steam-Deck-Linux-6.3 |
My steam deck analog sticks, dpad, triggers, 3 dots button, and left touchpad stopped working when updating my sd. I'm using sc-controller-git from AUR. I've tried out opensd and there it seems to be working. Could it be an issue with sc-controller in combination with newer kernels? #uname -a |
Sorry if this is off topic. When on the Steam Deck, if you touch the joysticks (The capacitive parts) it disables the trackpad on that side. What I want to know is: Is this a hardware limitation or is this restriction done entirely in software? |
Hi,
Message ID: ***@***.***>
as far as i can remember, thats done entirely in Software. However i cannot think of a way to disable it.
Why would you try to disable it? I had a lot of unwanted inputs due to accidentally touching the trackpads while developing.
|
I wanted to develop a game to use the deck as a split 2 player controller. With a trackpad and joystick for each player. |
Hello, it's been around half a year since this issue has been discussed. Recently got a Steam Deck OLED and I would like to see this software have Deck support implemented, especially with how lackluster the Steam onscreen keyboard actually is. |
Any plans on adding a layout for the new Steam Deck inputs?
The text was updated successfully, but these errors were encountered: