pop-os / default-settings

Distribution Default Settings
Other
44 stars 16 forks source link

22.04 suspend issues #159

Closed joopdo closed 2 years ago

joopdo commented 2 years ago

Distribution (run cat /etc/os-release): NAME="Pop!_OS" VERSION="22.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 22.04 LTS" VERSION_ID="22.04" HOME_URL="https://pop.system76.com" SUPPORT_URL="https://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=jammy UBUNTU_CODENAME=jammy LOGO=distributor-logo-pop-os

Issue/Bug Description: In August I upgraded from 20.04 to 22.04. Ever since I am experiencing suspend issues.

uname -a
Linux pop-os 5.19.0-76051900-generic #202207312230~1660780566~22.04~9d60db1 SMP PREEMPT_DYNAMIC Thu A x86_64 x86_64 x86_64 GNU/Linux
○ suspend.target - Suspend
     Loaded: loaded (/lib/systemd/system/suspend.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

 8월 31 09:25:35 pop-os systemd[1]: Dependency failed for Suspend.
 8월 31 09:25:35 pop-os systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
 8월 31 09:25:50 pop-os systemd[1]: Dependency failed for Suspend.
 8월 31 09:25:50 pop-os systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
 8월 31 09:26:03 pop-os systemd[1]: Dependency failed for Suspend.
 8월 31 09:26:03 pop-os systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
 8월 31 09:34:57 pop-os systemd[1]: Dependency failed for Suspend.
 8월 31 09:34:57 pop-os systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
 8월 31 09:37:03 pop-os systemd[1]: Dependency failed for Suspend.
 8월 31 09:37:03 pop-os systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.

journalctl reports:

 8월 31 09:34:57 pop-os systemd[1]: Starting Record successful boot for GRUB...
 8월 31 09:34:57 pop-os systemd[1]: Starting System Suspend...
 8월 31 09:34:57 pop-os systemd[1]: resolvconf-pull-resolved.service: Deactivated successfully.
 8월 31 09:34:57 pop-os systemd[1]: Finished resolvconf-pull-resolved.service.
 8월 31 09:34:57 pop-os systemd-sleep[28729]: Entering sleep state 'suspend'...
 8월 31 09:34:57 pop-os systemd-sleep[28729]: Failed to put system to sleep. System resumed again: Device or resource busy
 8월 31 09:34:57 pop-os kernel: PM: suspend entry (deep)
 8월 31 09:34:57 pop-os kernel: PM: suspend exit
 8월 31 09:34:57 pop-os kernel: PM: suspend entry (s2idle)
 8월 31 09:34:57 pop-os kernel: PM: suspend exit
 8월 31 09:34:57 pop-os systemd[1]: syncthing-resume.service: Deactivated successfully.
 8월 31 09:34:57 pop-os systemd[1]: grub-common.service: Deactivated successfully.
 8월 31 09:34:57 pop-os systemd[1]: Finished Record successful boot for GRUB.
 8월 31 09:34:57 pop-os systemd[1]: Starting GRUB failed boot detection...
 8월 31 09:34:57 pop-os systemd[1]: grub-initrd-fallback.service: Deactivated successfully.
 8월 31 09:34:57 pop-os systemd[1]: Finished GRUB failed boot detection.
 8월 31 09:34:57 pop-os [28742]: /usr/lib/systemd/system-sleep/pop-default-settings_bluetooth-suspend failed with exit status 1.
 8월 31 09:34:57 pop-os systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
 8월 31 09:34:57 pop-os systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
 8월 31 09:34:57 pop-os systemd[1]: Failed to start System Suspend.
 8월 31 09:34:57 pop-os systemd[1]: Dependency failed for Suspend.
 8월 31 09:34:57 pop-os systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
 8월 31 09:34:57 pop-os systemd-logind[987]: Operation 'sleep' finished.
 8월 31 09:34:57 pop-os ModemManager[1026]: <info>  [sleep-monitor] system is resuming
 8월 31 09:34:57 pop-os systemd[1]: Stopped target Sleep.

cat pop-default-settings_bluetooth-suspend as it's failing.

cat /usr/lib/systemd/system-sleep/pop-default-settings_bluetooth-suspend
#!/bin/sh

set -e

BT_BLOCK_PATH=/run/bluetooth.blocked
BT_STATES_PATH=/var/lib/systemd/rfkill/
BT_TMP_PATH=/tmp/

case "$2" in
    suspend | hybrid-sleep)
        case "$1" in
            pre)
                if rfkill -o ID,TYPE,SOFT | grep -q -E 'bluetooth\s+unblocked'; then
                    cp "$BT_STATES_PATH"*bluetooth "$BT_TMP_PATH"
                    rfkill block bluetooth
                 else
                    > "$BT_BLOCK_PATH"
                fi
                ;;
           post)
                cp -f "$BT_TMP_PATH"*bluetooth "$BT_STATES_PATH" 2> /dev/null
                [ ! -f "$BT_BLOCK_PATH" ] && rfkill unblock bluetooth
                rm -f "$BT_BLOCK_PATH" 2> /dev/null
               rm -f "$BT_TMP_PATH"*bluetooth 2> /dev/null
                ;;
        esac
        ;;
esac

Even though it's mentioning bluetooth, I have a feeling it might be the GPU?

lspci -k [VGA section]


07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev ef)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Radeon RX 570
    Kernel driver in use: amdgpu
    Kernel modules: amdgpu

Steps to reproduce (if you know):

Press suspend

Expected behavior: Computer to sleep

Other Notes: Let me know if you need any other info.