Talk: GNOME suspends after 15 minutes of user inactivity, even on AC power

I guess this is the point, the variety of the hardware. As a lot of drivers nowadays are included in the kernel we need to keep an eye more on the kernel change-log than on the Fedora Change Sets.

A few changes have been reported just searching for keyword like s0ix in
6.1 & 6.2

#  https://cdn.kernel.org/pub/linux/kernel/v6.x/
# ChangeLog-6.1 & ChangeLog-6.2

$ cat * |grep --color=auto  -i "s0ix" -B 4 -A 4

     "Last set of fixes for final, scattered bunch of fixes, two amdgpu, one
      vmwgfx, and some misc others.
    
      amdgpu:
       - S0ix fix
       - DCN 3.2 array out of bounds fix
    
      shmem:
       - Fixes to shmem-helper error paths
--
    
    amd-drm-fixes-6.1-2022-12-07:
    
    amdgpu:
    - S0ix fix
    - DCN 3.2 array out of bounds fix
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    From: Alex Deucher <alexander.deucher@amd.com>
--
Date:   Thu Dec 1 11:17:31 2022 +0800

    drm/amdgpu/sdma_v4_0: turn off SDMA ring buffer in the s2idle suspend
    
    In the SDMA s0ix save process requires to turn off SDMA ring buffer for
    avoiding the SDMA in-flight request, otherwise will suffer from SDMA page
    fault which causes by page request from in-flight SDMA ring accessing at
    SDMA restore phase.
    
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2248
    Cc: stable@vger.kernel.org # 6.0,5.15+
    Fixes: f8f4e2a51834 ("drm/amdgpu: skipping SDMA hw_init and hw_fini for S0ix.")
    Signed-off-by: Prike Liang <Prike.Liang@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Tested-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
--
    - add -wifitrace argument for tracing all the way to wifi reconnect
    - include more data in ftrace to mark the end of kernel resume
    - add async_synchronize_full to the list of funcs to chart
    - add thermal zone info to the log data
    - include a check for s0ix support (s2idle is the default mem_sleep)
    - if s2idle does not support s0ix, remove the SYS%LPI turbostat var
    - fix -dev crash when kprobe caller is just an address (not a symbol)
    - fix the cpuexec data in -proc to display in resume
    
    sleepgraph.8:
--
    energy when suspended to idle.  If that flag is unset, doing so is
    generally risky.
    
    Accordingly, add a comment to explain the ACPI_FADT_LOW_POWER_S0 check
    in amdgpu_acpi_is_s0ix_active(), the purpose of which is otherwise
    somewhat unclear.
    
    Link: https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#fixed-acpi-description-table-fadt # [1]
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
--

    ata: ahci: Add Tiger Lake UP{3,4} AHCI controller
    
    Mark the Tiger Lake UP{3,4} AHCI controller as "low_power". This enables
    S0ix to work out of the box. Otherwise this isn't working unless the
    user manually sets /sys/class/scsi_host/*/link_power_management_policy.
    
    Intel lists a total of 4 SATA controller IDs in [1] for those mobile
    PCHs. This commit just adds the "AHCI" variant since I only tested
--

    Merge tag 'acpi-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
    
    Pull ACPI fixes from Rafael Wysocki:
     "These are new ACPI IRQ override quirks, low-power S0 idle (S0ix)
      support adjustments and ACPI backlight handling fixes, mostly for
      platforms using AMD chips.
    
      Specifics:
--
         (Mario Limonciello).
    
       - Fix Apple GMUX backlight detection (Hans de Goede).
    
       - Add a low-power S0 idle (S0ix) handling quirk for HP Elitebook 865
         and stop using AMD-specific low-power S0 idle code path for systems
         with Rembrandt chips and newer (Mario Limonciello)"
    
    * tag 'acpi-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
--
       - Reserved VMID handling fixes
       - FRU EEPROM fix
       - BO validation fixes
       - Avoid large variable on the stack
       - S0ix fixes
       - SMU 13.x fixes
       - VCN fix
       - Add missing fence reference
    
--
      drm/amdgpu: enable VCN DPG for GC IP v11.0.4
      drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0
      drm/amd/pm: correct the fan speed retrieving in PWM for some SMU13 asics
      drm/amd/pm: bump SMU13.0.0 driver_if header to version 0x34
      drm/amdgpu: skip MES for S0ix as well since it's part of GFX
      drm/amd/pm: avoid large variable on kernel stack
      drm/amdkfd: Fix double release compute pasid
      drm/amdkfd: Fix kfd_process_device_init_vm error handling
      drm/amd/pm: update SMU13.0.0 reported maximum shader clock
--
    amd-drm-fixes-6.2-2022-12-21:
    
    amdgpu:
    - Avoid large variable on the stack
    - S0ix fixes
    - SMU 13.x fixes
    - VCN fix
    - Add missing fence reference
    
--
    drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0
    
    MES is part of gfxoff and MES suspend and resume are skipped for S0i3.
    But the mes_self_test call path is still in the amdgpu_device_ip_late_init.
    it's should also be skipped for s0ix as no hardware re-initialization
    happened.
    
    Besides, mes_self_test will free the BO that triggers a lot of warning
    messages while in the suspend state.
--
    [   81.689707]  ret_from_fork+0x22/0x30
    [   81.690118]  </TASK>
    [   81.690380] ---[ end trace 0000000000000000 ]---
    
    v2: make the comment clean and use adev->in_s0ix instead of
    adev->suspend
    
    Signed-off-by: Tim Huang <tim.huang@amd.com>
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
--
commit afa6646b1c5d3affd541f76bd7476e4b835a9174
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Fri Dec 16 11:42:20 2022 -0500

    drm/amdgpu: skip MES for S0ix as well since it's part of GFX
    
    It's also part of gfxoff.
    
    Cc: stable@vger.kernel.org # 6.0, 6.1
--
    - VCN RAS fixes
    - APU fix for passthrough
    - PSR fixes
    - GFX preemption support for gfx9
    - SDMA fix for S0ix
    
    amdkfd:
    - Enable KFD support for GC 11.0.4
    - Misc cleanups
--
Date:   Thu Dec 1 11:17:31 2022 +0800

    drm/amdgpu/sdma_v4_0: turn off SDMA ring buffer in the s2idle suspend
    
    In the SDMA s0ix save process requires to turn off SDMA ring buffer for
    avoiding the SDMA in-flight request, otherwise will suffer from SDMA page
    fault which causes by page request from in-flight SDMA ring accessing at
    SDMA restore phase.
    
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2248
    Cc: stable@vger.kernel.org # 6.0,5.15+
    Fixes: f8f4e2a51834 ("drm/amdgpu: skipping SDMA hw_init and hw_fini for S0ix.")
    Signed-off-by: Prike Liang <Prike.Liang@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Tested-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
--
    e1000e: Add e1000e trace module
    
    Add tracepoints to the driver via a new file e1000e_trace.h and some new
    trace calls added in interesting places in the driver. Add some tracing
    for s0ix flows to help in a debug of shared resources with the CSME
    firmware. The idea here is that tracepoints have such low performance cost
    when disabled that we can leave these in the upstream driver.
    
    Performance not affected, and this can be very useful for debugging and
--
    Above essentially unlocks SX+streaming scenarios i.e.: power transitions
    with an ongoing stream.
    
    As some streams are allowed to run in low power state, support is
    provided for S0iX state. The handlers check ACPI capabilities and the
    number of active low-power paths before deciding between SX and S0iX
    flows.
    
    The last portion of the patchset is addition of power/clock gating
    overrides. There is no single set of registers that ensures AudioDSP
--
Date:   Thu Oct 27 14:47:00 2022 +0200

    ASoC: Intel: avs: Standby power-state support
    
    Introduce avs_suspend_standby() and avs_resume_standby() to support S0IX
    streaming. The AudioDSP is not shutdown during such scenario and the PCI
    device is armed for possible wake operation through an audio event.
    
    As capability for a stream to be active during low power S0 is based off
--
Date:   Thu Oct 27 14:46:59 2022 +0200

    ASoC: Intel: avs: Count low power streams
    
    Streaming in S0iX differs from SX scenarios. Store the number of
    so-called low-power streams to be able to differentiate between the two.
    
    Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
    Link: https://lore.kernel.org/r/20221027124702.1761002-7-cezary.rojewski@intel.com
--
    ASoC: Intel: Skylake: simplify S3 resume flows
    
    Commit cce6c149eba3a ("ASoC: Intel: Skylake: add link management")
    added a perfectly logical/symmetrical link handling for
    'suspend_active' aka S0ix
    
    However that commit also added a less obvious part, where during S3
    resume the code will "turn off the links which are off before suspend"
    as well as stop the cmd_io which is not started.

So, the changes not came totally out of nowhere. We could also see them when they got reported.
We just not had a solution how to turn them off independent of the DE. Now we do have a workaround:

# Creating a drop-in to deactivate Suspend and Hybernation

sudo mkdir -p /etc/systemd/sleep.conf.d && sudo tee /etc/systemd/sleep.conf.d/sus-hib-off.conf << "EOF"
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
EOF
1 Like