Steam Deck

Steam Deck

dos 27. apr. 2022 kl. 21.51
Howto: Desktop Mode within Gaming Mode
Create a script:

#!/bin/sh unset LD_PRELOAD exec startplasma-wayland --xwayland --x11-display $DISPLAY --no-lockscreen --width 1280 --height 800 -- plasma_session

Save it, make executable and add as a non-Steam app. From now on, you can use Desktop Mode as a yet another Gaming Mode app, with Steam overlay, convenient access to Steam Input configuration, being able to have a game running simultaneously and so on :)

It has some quirks, but hey, it's just a quick hack ;)
< >
Viser 115 av 21 kommentarer
darrenphillips666 28. apr. 2022 kl. 4.02 
Nice hack 👍
Lance Uppercut 28. apr. 2022 kl. 6.30 
Love the idea, but when I needed to go back into real Desktop mode to add custom artwork for your script, it would open the Deck mode GUI instead of Desktop Steam. It also made my Desktop config not work so I couldn't use the trackpads and had to rely on touch screen only. This thing would be a godsend if it didn't affect classic Desktop mode.
dos 28. apr. 2022 kl. 12.28 
@Lance Uppercut: you can still access classic Steam by switching to the regular desktop session, and you can configure trackpads in the same way you would for any other game (from the overlay accessed by pressing the Steam button). I made this mostly because it makes using Plasma with built-in controller less annoying, as reconfiguration is fast and easy, unlike in regular desktop session.
Lance Uppercut 28. apr. 2022 kl. 14.05 
Opprinnelig skrevet av dos:
@Lance Uppercut: you can still access classic Steam by switching to the regular desktop session, and you can configure trackpads in the same way you would for any other game (from the overlay accessed by pressing the Steam button). I made this mostly because it makes using Plasma with built-in controller less annoying, as reconfiguration is fast and easy, unlike in regular desktop session.

Going back to regular Desktop and opening Steam makes it open as if it were in Deck mode. Does this not happen for you? Please test it out for yourself.
dos 28. apr. 2022 kl. 15.13 
I just did before writing my last comment and I got a regular desktop version of Steam there. As far as I understand how Steam's gaming mode works, it can't really work the way you describe, unless you've got something misconfigured in your Plasma session (which wouldn't be related to my script).
Lance Uppercut 28. apr. 2022 kl. 15.32 
All I did was paste into gedit, made executable, added to Steam and gave it box artwork, back to Deck mode and launched it and was happy as hell with it, went back to Desktop mode to give it rest of the artwork (logo etc.) but there I encountered the problems in my first post.

I might try again and not do the artwork to see if that somehow was the difference, but I can't see how it would be.

Edit: Just did it again and same thing happened, breaks regular Desktop mode.
Sist redigert av Lance Uppercut; 28. apr. 2022 kl. 15.44
dos 28. apr. 2022 kl. 16.16 
What do you do to unbreak it then?
Lance Uppercut 28. apr. 2022 kl. 19.02 
Removed it as non steam game and rebooted.
dos 28. apr. 2022 kl. 20.21 
How do you quit the "embedded" desktop mode?

I managed to make Steam run in game mode inside desktop mode now, but that required me to switch to real desktop mode while I was still in embedded desktop mode... :D
dos 28. apr. 2022 kl. 20.33 
Oh, I think I see what's going on.

You should close the "embedded" desktop the same way you close the real one - by pressing "Return to Gaming Mode" icon (and then "Abort Game" when controls pop up on the bottom of the screen). I don't see it happening after I close it this way, but I do when I use "Exit game" from the overlay, or don't close it at all.
Sist redigert av dos; 28. apr. 2022 kl. 20.35
LEVERO634 1. okt. 2022 kl. 5.09 
has anybody thought of a way to auto detect resolution to switch between 16;10 and 16;9
Kreatifchk 23. nov. 2022 kl. 10.06 
How to launch games in this mode? They are invisible?
retrogunner 25. nov. 2022 kl. 10.35 
what kind of games you talking? Steam games OR linux games?
To launch games, you should be able to press the Steam button, pick your library and go.

Remember, this HOWTO is on launching an "embedded desktop" within the Gaming Mode without exiting Gaming Mode. It's a just a hack. Maybe this might help:

* GM = Gaming Mode - uses all all 8 "cores", a game-console mode and for verified'ish games.

* DM = Desktop Mode (i.e. Power > Desktop Mode) - CPU in natural state, 4 Cores 2 threads per core. Shuts down Wayland virtual screen and starts X11. Steam games run just like on any PC Desktop. Kind of helpful for the less Deck friendly games.

* nested = nest the Desktop inside Gaming Mode - this is loading X11 Desktop as a session within the Wayland display Gaming mode, much like launching Firefox in Gaming mode. However you can run an Editor, browser, terminals, etc. while running a Game too. You basically are turning DM inside-out. It's a cool hack for power users mostly.
dos 19. des. 2022 kl. 22.39 
3
Here's an updated version that works with newer KDE:

#!/bin/sh unset LD_PRELOAD rm -rf /tmp/desktop-mode mkdir -p /tmp/desktop-mode cat > /tmp/desktop-mode/kwin_wayland_wrapper << EOF #!/bin/sh $(which kwin_wayland_wrapper) --no-lockscreen --width 1280 --height 800 --x11-display $DISPLAY \$@ EOF chmod +x /tmp/desktop-mode/kwin_wayland_wrapper kwriteconfig5 --file startkderc --group General --key systemdBoot false PATH=/tmp/desktop-mode:$PATH startplasma-wayland kwriteconfig5 --file startkderc --group General --key systemdBoot --delete


Just like before - save it, make executable and add as a non-Steam app. Enjoy!

Remember to close the nested session by pressing "Return to Gaming Mode" button, as closing it from Steam overlay may temporarily (until a reboot) break regular desktop mode.
Sist redigert av dos; 19. des. 2022 kl. 22.52
🐭 24. jan. 2023 kl. 14.13 
This is such a clever trick. I wish I thought of it. And it works great, too.

Something I've noticed is desktop mode idles around 10-15% CPU usage, but like 10% of that is just the Steam desktop client. But when launching KDE through Steam itself, all CPU monitors show a mere 4% total idle CPU usage. Presumably including SteamOS? So this actually works better than the default desktop mode?

I'm so glad that's the case. I was worried about what kind of process nightmare I would find myself in if I ran KDE through Steam, and then Steam runs inside of KDE. But I didn't realize I could simply not run Steam a second time.

There's still a few problems though. I can't get the touchscreen to work and SteamOS ignores KDE's settings for screen dimming. So youtube no longer automatically disables screen dimming and I can't figure out how to manually turn it off in SteamOS. I messed with the settings in the Steam overlay but it didn't make a difference. And the screen in general just seems strangely darker, regardless of how active I am or how bright I make it.

But this is overall a pretty great improvement. I hate having to reboot just to switch back and forth between my Linux desktop and an environment that plays games, and this addresses that. (Why are game developers so insistent on making Linux users reboot just to play games, even when they are pushing Linux, too?)

I've never given any Steam awards/points before, mostly cause I've never found a post that was genuinely helpful, but today I did. So please, take mine.

EDIT: Mkay, the touchscreen is working again after a reboot. I don't know what triggered that bug but nevermind. So just the screen dimming thing is still an issue.

EDIT2: Screen dimming seems to be handled entirely by the Steam OS, so disabling it in KDE wouldn't disable it system wide, which I guess makes sense.
Sist redigert av 🐭; 3. mars 2023 kl. 10.04
< >
Viser 115 av 21 kommentarer
Per side: 1530 50

Dato lagt ut: 27. apr. 2022 kl. 21.51
Innlegg: 21