sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.06k stars 70 forks source link

⚠ Steam Deck support #272

Closed Faalagorn closed 10 months ago

Faalagorn commented 2 years ago

Since there's been quite some hype with Valve announcing Steam Deck, how do you think support for Steam Deck and/or controllers especially on Steam Big Picture could work? Are you planning on supporting Steam deck and/or investigating this matter further @frostworx?

frostworx commented 2 years ago

Thanks for bringing this up @Faalagorn! I ordered reserved :) one, so I'm very interested in compatibility. No idea how much time I find, but I consider rebasing the gui (so far yad offers the required functions) for easy (touch) control in smaller resolutions. I thought of some globally configurable beginner/advanced/expert gui option (similar like kodi has) Every possible configuration option will be in one of those, and depending on the selected option it will be either visible or not. The default value could be based on the current screen resolution, so it with a Steam Deck (1280x800) resolution detected it would start in beginner mode.

As usual any further ideas are welcome of course :)

Faalagorn commented 2 years ago

Thanks for bringing this up @Faalagorn! I ordered one, so I'm very interested in compatibility.

I guess you mean reserved as at that point even dev kits aren't there yet, but yeah, it's going to be an interesting device :)

There's also revamp to big picture UI coming, apparently, so we'll see. I imagine having stl on Steam Deck could be even more useful than desktop (since all the optimizations are important there)

frostworx commented 2 years ago

Agreed, for optimizations it is probably more useful than on desktop, but other features are useful on all platforms equally :)

frostworx commented 2 years ago

fyi wip Steam Deck wiki entry (will be committed when most major open issues are ready):

Steam Deck

If nothing fundamentally changes until the Steck Deck is released, I assume that stl will work on it from day one.

There's not much which can be prepared for now:

It might be necessary to restructure the main windows, to be better touch-control friendly on a 1280x800. Ideas/mockups please into above tracker

Faalagorn commented 2 years ago

Steam Deck is said to use wayland, so make sure that all windows work on wayland (already fixed that in 20.11, it probably still works)

Do you have any source for the Wayland part? I was curious about it, seeing how most Linux distros push it nowadays, though I got impression an impression Valve didn't (gamescope was always focused on Xorg and Steam client isn't supporting Wayland natively yet (see https://github.com/ValveSoftware/steam-for-linux/issues/4924 ) plus it has a baggage of old libraries (GTK2 et al) and prior to that, they did contribute fixes for Xorg (though they were mostly VR related IIRC)

frostworx commented 2 years ago

Not directly. Just have seen some wayland related steam deck hype train posts on r/linux_gaming. Haven't read more than the topics though, so it might have just been as well some random click my spam posts. Either way, it might be nice to keep wayland compatibility steam deck independent, as it was pretty much work to rework the menu to make it compatible.

UltraBlackLinux commented 2 years ago

The problem with this is, that - as far as I know - the steam deck is pretty locked up and you can't even really get access to root/sudo

frostworx commented 2 years ago

I doubt that root access is locked. This would force literally every "serious" linux gamer away.

Faalagorn commented 2 years ago

The problem with this is, that - as far as I know - the steam deck is pretty locked up and you can't even really get access to root/sudo

That would be weird, especially as they openly say that you can install whatever you want on it (incl. Windows) Do you have any source for that?.

I genuinely wonder about under the hood software (I only know that it will use KDE Plasma and will be based-off Arch, it's been said so here: https://www.steamdeck.com/en/tech ).

AFAIK the dev kits weren't sent yet, unless I missed something. I know IGN have prototype to test, I'm not up to date with their latest videos, but not sure if they said anything about software running on it yet (if they will at all).

UltraBlackLinux commented 2 years ago

tbh my source was a post from r/linuxmemes

yes yes very genuine source

frostworx commented 2 years ago

won't add any input driver support directly, so renamed the issue accordingly

Velgus commented 2 years ago

If it's possible, it might be nice to have a Flatpak.

SteamOS, by default, has a read-only root filesystem. You do have root access (the default account is an admin account), and it is possible to work around this, but for many users, they won't be interested in having to regularly make the necessary changes to use AUR every time a SteamOS update is released.

Also, if anyone wants to test how things work on SteamOS, and doesn't have a Deck, they have released the Steam OS 3 recovery image.

frostworx commented 2 years ago

Of course everybody is still welcome to contribute flatpak support.

frostworx commented 2 years ago

https://github.com/frostworx/steamtinkerlaunch/issues/431

frostworx commented 2 years ago

WIP SteamDeck Wiki (happy suggesting!):

Steam Deck

So the SteamDeck is more or less available and fortunately my wife was lucky enough to get one early (for me :))

Currently (2022.03) it is possible to install custom packages systemwide (f.e. using the regular Arch Linux package management using pacman), but as any custom changes will be lost after a "firmware" update, installing steamtinkerlaunch and its dependencies systemwide is not sane option.

The alternative idea is, to use a special SteamDeck detect function, which automatically changes several configuration options required for the SteamDeck and also installs missing dependencies into a seperate directory within the home directory. Fortunately most hard-dependencies are already preinstalled in the official steamos installation, so just a few additional packages need to be installed. (of course you're still invited to contribute flatpak support)

How to install on SteamDeck

Simply download the main steamtinkerlaunch script and start it as deck user. (the downloaded script can be removed afterwards, as it creates a new full installation itself - see below)

The script will automatically configure everything required to make using steamtinkerlaunch a seamless experience on the SteamDeck:

For SteamDeck related issues, suggestions, discussions please use this extra Steam Deck issue (for flatpak this one)

frostworx commented 2 years ago

Is there a built-in tool (or alternatively an external one with few to none dependencies) which can map the joypad buttons to keyboard presses programmatically?

zany130 commented 2 years ago

I think you can do that with steam input no? you can even do a desktop profile that applies to everything at least you can in the standard steam client idk in deck

there also these tools which allow you to do that https://github.com/kozec/sc-controller (has python dep though)

there this one which has less dependencies just qt and sdl2 I think https://github.com/AntiMicroX/antimicroX plus it's available as a flatpak and an app image I think?

frostworx commented 2 years ago

yeah, steam input should be possible, but can it be customized programmatically? I need to map the buttons when steamtinkerlaunch is started and revert to the original mapping when it closes/the game starts.

sc-controller unfortunately is no option as it would pull in too many deps, antimicrox might be sufficient, but I wondered if some minimal tool like xdotool/ydotool/xbindkeys is usable too here.

zany130 commented 2 years ago

ahh i see what your trying to do so that the deck can have mapping for when only steamtinkerlaunch is running and then revert it when it exits. yeah don't think you can do that with steam input afaik there no way to set a profile on the fly like that antimicrox definitely would work but a minimal tool like you said might be better. never worked with them I have used antimicrox though.

BTW if flatpak is still not on your todo list I'm reading up on how to work with it and if I can figure it out I wouldn't mind matining a flatpak for steamtinkerlaunch once I finish classes in April

frostworx commented 2 years ago

I only found an ancient tutorial which could be automated easily, but as this would require a steam restart to take effect, it doesn't help anything.

antimicrox might be an option, but I'm not sure yet, if I want to use it. I once even wanted to add it for automatic game detection, but upstream had other plans or did not understand what I wanted ¯\(ツ)

frostworx commented 2 years ago

oh, just read your edit after I answered :) Would be great if you'd contribute flatpak support! Thanks for the offer! 👍 Good luck in April :)

frostworx commented 2 years ago

fyi: https://github.com/frostworx/steamtinkerlaunch/issues/437

frostworx commented 2 years ago

Gamepad mapping:

steam has a steam steam://forceinputappid/$APPID commandline option, which loads game-specific controller mappings. This could be a valid solution, by creating a temp mapping (f.e. for a game/tool, which is installed on every Steam Deck - maybe some Proton or Steam Linux Runtime, or even better "Aperture Desk Job").

Mod Organizer 2:

As already documented, Vortex integration works fine, but Mod Organizer 2 doesn't. Currently the MO2 installer hangs forever with C:\users\steamuser\Temp\is-83B6Q.tmp\Mod.Organizer-2.4.4.tmp /SL5=$1004C,91338841,822272,Z:\home\deck\.config\steamtinkerlaunch\downloads\mo2\Mod.Organizer-2.4.4.exe /VERYSILENT (after the DotNet installation worked successfully)

Edit: seems like at least lib32-freetype2 missing on the rootfs seems to be a problem, but expanding the LD_LIBRARY_PATH to an additonal dir in home with its libs, doesn't fix the issue. The main cause seems to be the global noto-fonts installation, because wine always get stuck with

00c4:fixme:font:find_matching_face Untranslated charset 255
00c4:fixme:font:get_nearest_charset returning DEFAULT_CHARSET face->fs.fsCsb[0] = 00000000 file = L"Z:\\usr\\share\\fonts\\noto\\NotoKufiArabic-Thin.ttf"
[2022-04-02 13:22:54.534 W] Unable to enumerate family ' "Noto Sans Inscriptional Parthian" '

(and a more verbose WINEDEBUG reveals that it is very busy with those fonts already before)

Therefore I'll disable MO2 for Steam Deck fore now.

TypoTami commented 2 years ago

On MO2: The inbuilt MO2 option in stl did not work for me, But I managed to work around this by running MO2's installer with 'other command' and installing it into skyrim:se's prefix. Then changed the 'other command' option to the installed MO2 instance. After wards I copied in SKSE into skyrims folder and SkyUI archive to skyrims's folder, which I was then able to install and run the game with successfully!

skyui

And here it is running in Gamescope/Deck UI! image

(For this I was using Steam Tinker Launch as a compatibility tool and installed stl via the instructions on the wiki!)

frostworx commented 2 years ago

Yeah, I disabled MO2 in current git master on purpose, so you do not even have a chance to test it, when you don't change the code. Did you install any additional packages into your rootfs? If yes, then this is no option unfortunately (unless they are slim enough to be autodownloaded into a custom dir in home) if no, then I'd guess that the installer only has issues to be started in silent mode. Either way, I was able to workaround the installer issue programmatically by using innoextract, but the installation doesn't work here anyway. How did you workaround the dependency for DotNet 4.8? Or is it no longer required? If so which proton version did you try?

TypoTami commented 2 years ago

Previously I did have an earlier version of STL installed via yay, but that got wipped from a steam update so (I would assume) that the rootfs is clean. I did disable read-only and installed only fakeroot for yay, but yay was throwing out build errors so I opted to follow the new guide on the wiki.

The proton version I was using when Installing MO2 was GE-Proton7-10 added with ProtonUP-QT(flatpak). I set up MO2 as a portable install to C:\Modding\ of the prefix for Skyrim se. I did try setting up an API key for nexus but I'd did not seem to work, but could still select local mods inside the prefix and allowed directory's in pressure-vessel.

Interestingly I did not have to deal with any dependencies for DotNET4.8. (Might be worth ensuring I have that dependency not installed for a sanity check)

Additionally I went and ran the MO2 installer again with both GE-Proton7-10 and proton-7.01b and both opened up fine at a glance.

EDIT: Additionaly I found that when running with proton7.01b: MO2 did launch but Skyrim SE launching through MO2 with SKSE did not.

frostworx commented 2 years ago

Thanks for the reply. Good to hear that you did not explicitly install dotnet. Might be worth to recheck if it is no longer required/mono is enough. This could also explain why the installer works at all. For now I used a custom self rolled proton, because almost all other proton versions failed to install dotnet correctly (see wiki) Would be great if that custom proton is no longer required at all. will recheck that soonish

frostworx commented 2 years ago

Yay, I can confirm that MO2 installs perfectly fine automatically using GE-Proton7-10 without installing dotnet! This is great news (need to check if Vortex works the same way now) Thanks for the hint, @UP2010614 - I wouldn't have tested that in the near future for sure! 👍

TypoTami commented 2 years ago

No worries 😁! I got a few more games I want to have a play around with and maybe later I'll brave myaelf and start looking at the source to see if there is anything I can do. It's great to see how quickly STL is becoming smooth on the deck!

frostworx commented 2 years ago

Just pushed the first documented controller support function for steamtinkerlaunch gui controls for testing.

frostworx commented 2 years ago

Haven't touched MO2 for a while (I usually don't mod) and forgot, that MO2 gui always worked fine without dotnet, and dotnet is only required for several mods and other tools to work. fortunately someone reminded me on reddit :) tbh I do not really want to play with testing MO2 behaviour again, so I'd like to ask if you would like to test this please, @UP2010614? If no, this would be fine as well of course and I'd simply comment in the dotnet installation again.

TypoTami commented 2 years ago

I'm pretty busy at the moment but I don't mind helping test anything related to MO2, and I have been meaning to jump back into Skyrim proper for a good while. I'm gonna need a bigger SD card where I'm going. But yeah in short want me to test anything specific just give me a shout!

frostworx commented 2 years ago
frostworx commented 2 years ago

innoextract is automatically downloaded on the steamdeck from the official arch linux repo when not available since some days

frostworx commented 2 years ago

closing here. apparently everything works as expected 🎉

umbrellacorp53 commented 2 years ago

Simply download the main steamtinkerlaunch script and start it as deck user.

Well, as maybe the first Deck owner from the wild to swing by and attempt this... I don't know what install script or where to get it from. There are some various Linux install instructions, but I'll tell you that many Deck owners, such as myself, will have 0 Linux experience and will not know the nuances and differences between the options.

Maybe make that line in the instructions a download link for simpletons like myself.

umbrellacorp53 commented 2 years ago

I figured out that the the same arch console command that's listed on the main page should work on the Deck. Not sure which build to use option 1 or 2. Tried 1 since it's the default. It ran but I don't know what it actually did. There is nothing new in the compatibility tool drop-down and I cannot find an install folder.

Coming from Windows to Linux is like trying to communicate in Spanish using only what I know from pop culture.

sonic2kk commented 2 years ago

@umbrellacorp53 just chipping in here, don't have a Deck yet but wanted to let you know the Steam Deck's SteamOS 3.0 is based on Arch Linux. Commands for Arch Linux will likely work once what I believe SteamOS calls "Dev mode" is enabled.

Coming from Windows to Linux will certainly have a learning curve, but some features of STL might expect you to have some knowledge of Linux and other tools ahead of time. Knowing how to use some shell commands, the basic filesystem structure (including symlinks), and perhaps most importantly knowing the basics of using Wine and Wineprefixes (e.g., for using MO2/Vortex) will make your tinkering experience a lot smoother 😄

STL provides a front-end for various other tools but I think it's better to know a bit about those tools before tinkering too much with them 🙂

umbrellacorp53 commented 2 years ago

I got it working. Or at least I have the compatibility tool in Steam now... but when launching a game there was no gui or stl menu.

frostworx commented 2 years ago

enable steamtinkerlaunch as compatibility tool in steam for your game.

"Simply download the main steamtinkerlaunch script": you're reading that sentence from the wiki directly on the project page. I was assuming that i should be more than clear that the steamtinkerlaunch script is the steamtinkerlaunch script from the project page itself. I could link it in the wiki if it is really that confusing, but for sure won't add instructions on how to download something from github.

@sonic2kk is basically right here, but the Arch Linux installer is not required at all.

Simply download the main `steamtinkerlaunch` script and start it as deck `user` _(ssh is fine, no need to switch to the desktop)_.
_(the downloaded script can be removed afterwards, as it creates a new full installation itself - see below)_

is literally enough to install it on the steamdeck.

There are by the way multiple linux users as well who hate steamtinkerlaunch, because it is too "complicated".

umbrellacorp53 commented 2 years ago

I think it's easy to forget how much we know in our own respective fields. There are presuppositions, like even operating GitHub can be confusing for the uninitiated. I misunderstood what he meant by "download the script". What would make more sense is to "download/clone the main repo as a zip, unzip it and run the installer." It's a repository, not a script.

I was able to get it working by uninstalling the dependencies and lingering files that I installed using the yay command in arch Konsole, then restarting the Deck. Nearly everything is working. I can launch a game, change settings, and was able to pull up the shaders repos but they wouldn't download when I clicked on 'game shaders', but when I launched a different random game it worked and they downloaded.

Now I'm just trying to figure out why the game I'd like to use shaders on isn't allowing me to select them. I click the 'game shaders' button and nothing happens even if I wait several minutes.

frostworx commented 2 years ago

There is no need to download the whole repository. Downloading and starting the script is enough. Else I would have written download/clone the repository and run the script in it... Can't help with your shader problem without details/logs (might be worth to open an separate issue), but it might be possible (wild guess) that all shaders are being downloaded silently in the background (huge download if all are selected). Regularly a notifier is used to notify about the download process, but it doesn't work on steamdeck. This is explicitly mentioned in the Steam Deck wiki btw. edit: as usual everybody is invited to improve the wiki

umbrellacorp53 commented 2 years ago

There is no need to download the whole repository. Downloading and starting the script is enough. Else I would have written download/clone the repository and run the script in it...

The confusion stems from there being Arch terminal instructions on the main readme. Maybe one more line in the Install section that points Deck users to the wiki and away from the Arch script.

So, the script in the repo doesn't rely on anything else in the repo? If that's the case then maybe that file should have an easy to find download link in the Steam Deck install instructions.

Can't help with your shader problem without details/logs

Found in /home/deck/.config/steamtinkerlaunch/logs/steamtinkerlaunch/id/ 288470.log

I have another game where the shaders showed that they were downloading, although as you said, the progress bar was broken. Since the games share the shaders, and since I downloaded all of them, shouldn't the Game Shaders window just pop up when clicked?

edit: The exe was inside a subfolder. I pointed the config file to the right location and now the menu works. Pretty sure I saw someone fix this issue through gui but I saw no way to fix path except manual file edit. To anyone who is following, the path to the steamtinkerlaunch game config files is /home/deck/.config/steamtinkerlaunch/gamecfgs/id/.

I had to change:

## Alternative game exe path (f.e. for ReShade installation and the game launcher is in an extra directory)
ALTEXEPATH="/run/media/mmcblk0p1/steamapps/common/Fable Anniversary/Binaries/Win32/"

This is just an example for my specific game.

umbrellacorp53 commented 2 years ago

I was able to select various shaders but nothing appears to work.

frostworx commented 2 years ago
umbrellacorp53 commented 2 years ago

I'll rephrase that. "None of the shaders appear to work." There is no reshade overlay or text upon bootup, and I'm not sure if there are more ini tweaks or something else that I'm missing. I'll try a different game. If reshade is working for it then I will drop the issue since it maybe a problem with a particular game. If it appears to not be a generic Steam Deck installation issue then I will create another issue specifically for Steam Deck reshade support.

I'm not sure if you're angry or something, but I'm trying to be respectful and offering up what information I have. I read in the wiki to direct Steam Deck issues here which is why I'm here. I am of the "YouTube generation" as you said in a reddit comment, and I will happily make a video once I'm sure I know enough to do so without misleading anyone.

frostworx commented 2 years ago

Thanks for elaboration! ReShade shaders should work fine meanwhile. There were several rewrites and multiple tests and I think it should pretty good - especially as it automated multiple steps, which usually need to be done manually. There are a few games which refuse to work with ReShade (maybe only under Proton(?)), and I think I can remember there was a Fable Anniversary issue already before once. I'll try to reproduce it (both on regular machine and on Steam Deck, but I'm sure it will work on the Steam Deck as well when it does work on the pc). Nah, I'm not angry at all, sorry if it sounds like that.

edit: quick update: I already had Fable Anniversary installed on my machine and shaders were already installed from an older steamtinkerlaunch installation. It worked! After having removed all ReShade/shader files it does no longer work, so I can confirm that something is wrong. Shouldn't be too hard to fix.

edit2: looks like Fable is the perfect candidate to maybe even get rid of the ALTEXEPATH workaround requirement (might take some time to be sure), so I'm glad you have a good game taste :)

frostworx commented 2 years ago

Just pushed a bigger commit, which improves the determination and further usage of the (real) absolute game exe directory a lot. While testing ReShade and selected shaders were correctly installed/enabled for Fable Anniversary ootb in the correct game subdirectory (Binaries/Win32/) I haven't tested on the Steam Deck, but there is no reason why it shouldn't work the same on it Thanks for reporting - this was an important fix (might require some more cosmetics though - we'll see)

Some games start a launcher instead of the actual game exe and in some cases the launcher is in a different directory than the game exe. I think this is the only case left now, where the ALTEXEPATH workaround would be still required, because the automation would setup ReShade/Shaders in the launcher dir and not in the game exe dir.

frostworx commented 2 years ago
umbrellacorp53 commented 2 years ago

Awesome work! I haven't been on git today. I ended up figuring out how to get ReShade to work manually by following a reddit guide for getting proton to work with ReShade. I had to follow it precisely and even had to rename the dll file to d3d9, NOT dxgi (which caused a crash since it's a dx9 game, not dx10 or 11), a couple other files listed on the tutorial, and then used protontricks to point proton to the dll files in the game folder. That's quite a lot of tricks just to get it running, so if it just works now with steamtinkerlaunch then that would be huge. I'll try that tomorrow.

I actually ended up formatting my Deck and reinstalling the game since when I stupidly used sudo and installed the arch distro script it overwrote something or... I don't know exactly what, but it seemed to break proton or at least it's relationship with protontricks. Again, this is all new to me, but I'm getting a hell of a crash course. Rule of thumb though for any Deck users reading. Avoid writing to system files or using sudo commands unless you're a developer and know exactly what you're doing. Many of the system files and third party applications are set up in a very specific custom way. Overwrite anything and you break the relationships.

Oh, and you mentioned Fable Anniversary and my game taste! Lol. You know what's funny is that Fable 1 was one of my first PC games. Remember installing it from discs on my old Gateway. I was really attached to the look of that game, so when I finally booted up Anniversary and saw the redesign of the Hero and traditional UE3 graphical issues I HAD to get ReShade working!

Anyway, thanks again. I'll start fresh again tomorrow. I have a small stack of tutorial videos to make and I'll include steamtinkerlaunch in there and I'll link the resulting video.