Bazzite and Big Picture Mode

I've installed Bazzite and selected game mode. Now I'd like to know how to boot into the desktop first (but still be able to switch into Gaming Mode at will) instead of booting into Gaming Mode first. Is this possible?
23 Replies
harbin
harbinOP•4mo ago
Nevermind -- I am new to atomic OSes. I figured out how to "rebase" it, and I rebased it to "bazzite" rather than "bazzite-deck", and it now works - booting into the Desktop and generally being more "desktoppy". I can still run Steam (although the little icon on the desktop no longer boots to steam, the icon on the taskbar does still). Very cool!
WSSDude
WSSDude•4mo ago
You could have just modified /etc/sddm.conf and comment/uncomment few lines, it tells you what those lines do if you would want to also have gaming mode You kinda dont have that option on desktop iso (so kind of late, but for future reference)
wolfyreload
wolfyreload•4mo ago
I did a mini guide a while back for selecting full game mode or desktop at the login screen rather than booting directly into game mode https://discord.com/channels/1072614816579063828/1334405906246537236/1334551548507852840
harbin
harbinOP•4mo ago
Very cool. I just switched back to bazzite-deck to test this. But can it start up to Desktop, but NOT require any kind of password/login screen?
wolfyreload
wolfyreload•4mo ago
Unfortunately I don't think so, since the password prompt screen is what allows you to switch between environments, if you set it to auto login and you try to switch it will just auto login again.
harbin
harbinOP•4mo ago
Trying an experiment, so rebooting a few times here...
wolfyreload
wolfyreload•4mo ago
I guess you could change the sddm.conf file dynamically with a script. Haven't tried that though good luck
harbin
harbinOP•4mo ago
Hm. No dice so far, but it really does look like there's some kind of option. Digging around in the configuration files, I see zz-steamos-autologin.conf which contains only "[Autologin]" and "Session=plasma-steamos-wayland-oneshot.desktop" Okay, I created a file, "/etc/sddm.conf", and filled it with
DisplayServer=wayland

[Autologin]
Relogin=true
Session=plasma-steamos-wayland-oneshot.desktop
User=bazzite

[X11]
# Janky workaround for wayland sessions not stopping in sddm, kills
# all active sddm-helper sessions on teardown
DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround
DisplayServer=wayland

[Autologin]
Relogin=true
Session=plasma-steamos-wayland-oneshot.desktop
User=bazzite

[X11]
# Janky workaround for wayland sessions not stopping in sddm, kills
# all active sddm-helper sessions on teardown
DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround
This worked as I needed.
wolfyreload
wolfyreload•4mo ago
Can you get to gamemode though?
harbin
harbinOP•4mo ago
In other words, it booted right into Desktop. Now to test to see if I can switch back and forth between Gaming Mode and Desktop at will.
wolfyreload
wolfyreload•4mo ago
You might need to make a script that changes that file to let you into game mode
harbin
harbinOP•4mo ago
testgin you are right, it put me right back at desktop. Okay, will make a script. It should come down to creating and removing /etc/sddm.conf. I can just rename it with a script. But how to trigger the script when coming back from Gaming Mode? I guess I can just create an autostart script to delete /etc/sddm.conf when I am done booting into Desktop. But then I will have to recreate it pre-reboot somehow. or modify an existing boot-up script to create it early in the process
wolfyreload
wolfyreload•4mo ago
auto start script that renames the file back. and go to gamemode renames it to something else You might need a shutdown script that puts it back though not really needed, you'll have the last environment that you booted
harbin
harbinOP•4mo ago
Oh yes that makes sense. The autostart script should run every time the desktop runs. But if I reboot in Game Mode, it will boot back into Game Mode, which maybe the right behavior after all. So basically it's not a "boot into desktop" change, it's a "boot into last used mode" change. Okay you just said that haha
wolfyreload
wolfyreload•4mo ago
once you've ironed it out, probably worth posting the scripts here. having a boot into previously used environment is pretty cool
harbin
harbinOP•4mo ago
Yeah okay that's my project for the day.
wolfyreload
wolfyreload•4mo ago
Cool! Good luck 🙂
harbin
harbinOP•4mo ago
Okay, got the basic framework.
Create ~/.local/bin/switch_to_desktop_mode.bash and put this inside (and chmod +x it)
#!/bin/bash

sudo cp ~/.local/share/sddm.conf /etc/sddm.conf
#!/bin/bash

sudo cp ~/.local/share/sddm.conf /etc/sddm.conf
Create ~/.local/bin/switch_to_gaming_mode.bash and put this inside (and chmod +x it)
#!/bin/bash

sudo rm -rf /etc/sddm.conf
systemctl start return-to-gamemode.service
#!/bin/bash

sudo rm -rf /etc/sddm.conf
systemctl start return-to-gamemode.service
Create ~/.local/share/sddm.conf and put this inside
DisplayServer=wayland

[Autologin]
Relogin=true
Session=plasma-steamos-wayland-oneshot.desktop
User=bazzite

[X11]
# Janky workaround for wayland sessions not stopping in sddm, kills
# all active sddm-helper sessions on teardown
DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround
DisplayServer=wayland

[Autologin]
Relogin=true
Session=plasma-steamos-wayland-oneshot.desktop
User=bazzite

[X11]
# Janky workaround for wayland sessions not stopping in sddm, kills
# all active sddm-helper sessions on teardown
DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround
Modify the "Return to Gaming Mode" icon by pointing it to ~/.local/bin/switch-to-gaming-mode.bash Add an autostart logon script and point it to ~/.local/bin/switch-to-desktop-mode.bash. Still debugging! This creates a new problem. The scripts contain a "sudo" which triggers a password dialog. I tried "remember this password" tickbox, but this doesn't apparently fix the problem. Any ideas? Other than that, it does in fact work. I tested it (by rebooting from the desktop, and rebooting from gaming-mode using the big-picture reboot option under "Power", and in each case it booted back into the mode it was in when it rebooted. So, halfway there?
wolfyreload
wolfyreload•4mo ago
Maybe a systemd service?
harbin
harbinOP•4mo ago
Maybe. I do have a solution in principle which does work. Instead of using ~/.local/bin/ and ~/.local/share/ use /usr/local/bin/ and /usr/local/share/. Then use visudo to grant password-less sudo power to just those two scripts (switchto(desktop/gaming)_mode.bash). This works fine and I've tested it.
wolfyreload
wolfyreload•4mo ago
nice! 🙂
harbin
harbinOP•4mo ago
I would like to propose to the Bazzite team that this behavior (not necessarily my implementation!!), but the general behavior of booting into the last-used mode be the default behavior, even upon installation. It just makes sense to me. Do you guys know how to make an official proposal? I will write up a nice howto for doing my implementation in a few hours. Real life calls for now.
wolfyreload
wolfyreload•4mo ago
You could make a github issue with your proposed solution and see what the devs think https://github.com/ublue-os/bazzite/issues. Or perhaps you could do a PR with your proposed solution. Zelius, Kyle, Hikari etc are good at giving feedback on stuff.

Did you find this page helpful?