Disable suspend on bazzite gnome

so, bazzite automatically suspends whenever you close the lid.

I do not like this.

in 30+ years of using computers, there has never been a time when suspend/sleep was a thing I wanted my computer to do.

I want to permanently disable suspend.

google’s AI summery gives me this:

To permanently disable suspend (sleep mode) on Bazzite, you must adjust the power management settings in the desktop environment. Bazzite comes in different flavors, such as KDE and GNOME, so the exact steps will vary slightly depending on your version.

Method 1: Disable suspend in KDE or GNOME

This method works for the official Bazzite releases using the KDE or GNOME desktop environments.

  1. Switch to Desktop Mode. In Gaming Mode, press the “Steam” button, go to Power, and select Switch to Desktop.

  2. Open Power Settings.

    • For KDE: Click the menu in the bottom-left corner and search for “System Settings”.

    • For GNOME: Go to Settings.

  3. Adjust Power Management.

    • For KDE: Search for “Power Management.” From there, you can disable the “Suspend session” for when the device is idle.

    • For GNOME: Navigate to Power and find the “Power Saving” options. Turn the “Automatic Suspend” feature to “Off”.

  4. Save your changes. Once the settings are configured, they should apply even after you switch back to Gaming Mode.

Method 2: Create a systemd file (Advanced)

For more permanent or system-wide control, you can create a systemd configuration file that overrides the default suspend behavior.

  1. Open a terminal. While in Desktop Mode, open a terminal application such as Konsole.

  2. Disable the read-only filesystem. Bazzite uses an immutable filesystem, so you must disable it to make changes. Type the following command and enter your admin password if prompted:

    sh

    sudo steamos-readonly disable
    
    
  3. Create a systemd override file. Create a new configuration file to specifically disable suspend.

    sh

    sudo touch /etc/systemd/sleep.conf.d/sus-hib-off.conf
    sudo nano /etc/systemd/sleep.conf.d/sus-hib-off.conf
    
    
  4. Add the content. In the text editor (nano), add the following lines:

    [Sleep]
    AllowSuspend=no
    AllowHibernation=no
    AllowSuspendThenHibernate=no
    AllowHybridSleep=no
    
    
  5. Save the file. Press Ctrl+O, then Enter, then Ctrl+X to exit nano.

  6. Reload systemd and re-enable read-only mode.

    sh

    sudo systemctl daemon-reload
    sudo steamos-readonly enable
    
    
  7. Reboot your device to apply the changes.

method 1 does not work, it did at least stop it from suspending after 5 minutes idle, but doesn’t fix the lid close behavior.

how badly am I gonna mess up my system if I try method 2? is there an easier way?

Howdy @Delemus

Your instinct is right that there is an easier way to handle this. You didn’t mention which desktop you’re using but I’ll start with KDE since that’s more user friendly. You should be able to disable suspend on lid close by going into System Settings, then Power Management, then Energy saving. Then you should be able to what what the power button does and what closing the lid does both on power and on battery. If this method fails, the method below also applies to KDE.

If you’re using Gnome, things are somewhat more complicated as they now rely on Systemd config. We’ll need to make a directory then add a config file to be referenced.

First run:

sudo mkdir /etc/systemd/logind.conf.d

Then run:

sudo nano /etc/systemd/logind.conf.d/01-lid-switch.conf

Add the following lines.

[Login]
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

Save and exit with CTRL+O, then Enter, then CTRL+X.

Finally restart the logind service. You can do that without rebooting with:

sudo systemctl restart systemd-logind

Test lid closes and let me know how it goes. The downside to this approach is that it may prevent the internal display from powering off if closed when connected to an external display.

3 Likes

I did actually specify gnome in the title of the thread, but yes.
I’ll probably try KDE when I get my FW16 later this year.
ran the commands you gave me, it worked fine up til the last part, where it sort of bugged out, when I signed back in, it gave me a full screen terminal with strange text and…not much else, I didn’t spend long messing with it, just forced shutdown and turned it back on, it seems to be fine now, and the fix worked

I’d still like to kill suspend forever, but that’s probably mostly windows trauma talking…so many messed up programs…thousand yard stare.

thank you