Ryochan7 / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
176 stars 23 forks source link

Can this be used on the steam deck? #67

Closed syberphunk closed 1 year ago

syberphunk commented 2 years ago

I've heard of people using this in linux to allow for the steam controller to work with stadia in google chrome, so I'm wondering if this could come to the SteamOS for the steam deck?

So that the 'usb connected steam controller' that is the steam deck could have better control/functionality, and also work with stadia. Though SteamOS mainly installs stuff through https://flatpak.org/ (I'm aware there's an aur package https://aur.archlinux.org/packages/sc-controller-git ) but it'd be better as a flatpak permission wise.

Ryochan7 commented 2 years ago

I don't know much about SteamOS 3.0. I would assume that getting this fork of SC Controller working in Desktop mode (or whatever it is called now) would be possible. Not sure how useful it would be overall especially without Steam Deck controller support. There was some discussion on the Kozec Python 2 version repo with people trying to decode the packet payload for the Deck controller but I don't think anyone has come up with a full breakdown as of yet.

As for Flatpak, I have barely ever worked on packaging apps for it. I think I packaged my old Dreamcast Now QML app for it but I cannot remember how I did it.

This probably won't happen tbh.

syberphunk commented 2 years ago

I was able to compile it by following:

passwd sudo steamos-readonly disable sudo pacman-key --init sudo pacman-key --populate archlinux wget https://aur.archlinux.org/cgit/aur.git/snapshot/sc-controller-git.tar.gz tar -xvf sc-controller-git.tar.gz cd sc-controller-git sudo pacman -S python-setuptools python-cairo python-pylibacl xorg-xinput glibc linux-api-headers zlib makepkg pacman -U sc-controller-git-v0.4.8.7.r0.929b3c4c-1-any.pkg.tar.zst sudo steamos-readonly enable

And then I could run it in desktop mode. The main reason why I was investigating this, is because the steam deck's controller isn't identified by Google Stadia as a controller in Google Chrome, and I found people had used sc-controller as a solution to that.

The steam deck's controller identifies as a "steam controller connected via USB" but obviously its functionally different.

It is also possible to connect steam controllers to the steam deck, either over USB, dongle or bluetooth though.

cyrozap commented 2 years ago

@Ryochan7 As of kozec/sc-controller@4d0e6c7d469bc14119adfbf90ea2bcc45e331b95, the Python 2 version has support for the Steam Deck's controller. Would you be willing to port those changes to your Python 3 version?

bell07 commented 1 year ago

@Ryochan7 , The SteamDeck support is important for Gentoo users, since the Python 2 is not in Gentoo portage anymore. I got the kozec fork working on my SteamDeck, using local Python-2 and pip installation. I am very interested to use your fork on SteamDeck and cleanup all the manual installations, since your fork is used in Gentoo Portage.

Ryochan7 commented 1 year ago

I haven't kept track of the upstream Kozec repo so I did not realize that Steam Deck controller support was incorporated in a main branch. I can look into porting over the changes a bit later. Obviously, I cannot test it since I do not have a Steam Deck.

Ryochan7 commented 1 year ago

Got the changes merged in and fixed a few issues caused by the merge. The updated code works on my end. Going to have to test building an AppImage as some dependencies changed in the upstream appimage-build.sh file. Hopefully I can get something out there in a couple of days.

bell07 commented 1 year ago

Tried the git version python3 branch using live-ebuild (based on portage's one).

Basically it does work on steam deck now, but I have issues.

The OSD menu is hanging if I try to go into "Switch to" or "Autoswitch Options" submenu.

I started with empty ~/config/scc and run the the tool using 'sc-controller' from command line. Do not see any error messages, but need to kill scc-osd-daemon.py. How I can debug the issue?

Ryochan7 commented 1 year ago

Have not had a chance to really use the app. Just made sure the app launched, could detect a Steam Controller, and also changed some app settings. Spent time yesterday tweaking the appimage-build script to build an AppImage that would work properly on Ubuntu and PopOS; the test AppImage has also been tested on Fedora 36 and the latest Manjaro.

Testing out the Autoswitch Options now and the app does hang for me as well. Running the daemon in debug mode shows that a TypeError exception occurs when trying to retrieve an x window property.

Ryochan7 commented 1 year ago

Autoswitch Options has been fixed with commit 8451760bca5f143734ba6d8ddca1b3fb29159404

bell07 commented 1 year ago

Thanks. Confirm the Autoswitch and "Autoswitch Options" OSD submenu is working. The "Switch To" submenu is still broken. Tried another OSD features. All others seems working.

Ryochan7 commented 1 year ago

Pretty much the same problem. Got it fixed.

bell07 commented 1 year ago

Thank you! Now this issue is solved for me. The 0.4.8.9 is fully useable on my Steam Deck with Gentoo for now!

cyrozap commented 1 year ago

This works for me, too, now, on Arch Linux on a Steam Deck. It doesn't really work in Wayland (OSD and systray icon don't appear), but that's a separate issue, and it otherwise works fine with X.

ghost commented 1 year ago

Just tried v0.4.8.9 on my steamdeck with debian bookworm and sway 1.7 and after installing the python dependencies, the basics work (which means that the appimage is missing dependencies, which isn't ideal when used on steamos 3)

what doesn't work is OSD, but that has to do with wayland as it's so far only supported on X see #16

tldr: if possible, add python dependencies to appimage and then this issue can be closed