My installed system takes a long time to open after sleep

I am pretty new to Manjaro, although I have had some experience with ubuntu. Recently I have installed manjaro on a laptop that previously had windows on it. The installation went smoothly and everything seemingly works, but one thing I have noticed is that when I close the lid, or put the laptop into suspension, it takes a very long time to open back up. I was wondering if it possible to speed up this time, or even disable suspension when closing lid.

Hi! To start, pleas post some info about your system (ex.: inxi -Fxaz).

Secondly, try to suspend your system by issuing systemctl suspend in a terminal and then bring it back. Report if it still takes a long time.

To disable suspend upon closing the lid, go to the power options and search for it.

System:
  Kernel: 5.15.50-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=f866d08c-6303-413e-a1d9-ddb2808b98cc rw quiet splash apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: GNOME v: 42.2 tk: GTK v: 3.24.34 wm: gnome-shell dm: GDM v: 42.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 21EB000GAU v: ThinkPad E14 Gen 4
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 21EB000GAU v: ThinkPad serial: <superuser required>
    UEFI: LENOVO v: R20ET26W (1.06 ) date: 02/18/2022
Battery:
  ID-1: BAT0 charge: 24.6 Wh (54.7%) condition: 45.0/45.0 Wh (100.0%)
    volts: 11.4 min: 11.1 model: LGC LNV-5B10X02603 type: Li-poly
    serial: <filter> status: discharging cycles: 2
CPU:
  Info: model: AMD Ryzen 5 5625U with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 built: 2021-22 process: TSMC n7 (7nm) family: 0x19 (25)
    model-id: 0x50 (80) stepping: 0 microcode: 0xA50000C
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 1413 high: 1577 min/max: 1600/4387 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1397 2: 1397
    3: 1397 4: 1397 5: 1397 6: 1391 7: 1397 8: 1397 9: 1424 10: 1577 11: 1397
    12: 1397 bogomips: 55123
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Barcelo vendor: Lenovo driver: amdgpu v: kernel arch: RDNA 2
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1 empty: DP-1,HDMI-A-1
    bus-ID: 04:00.0 chip-ID: 1002:15e7 class-ID: 0300
  Device-2: Acer Integrated RGB Camera type: USB driver: uvcvideo
    bus-ID: 1-3:2 chip-ID: 5986:2146 class-ID: fe01 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.2
    compositor: gnome-shell driver: gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 model: BOE Display 0x08d7 built: 2019 res: 1920x1080
    dpi: 158 gamma: 1.2 size: 309x174mm (12.17x6.85") diag: 355mm (14")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  OpenGL: renderer: AMD RENOIR (LLVM 13.0.1 DRM 3.42 5.15.50-1-MANJARO)
    v: 4.6 Mesa 22.1.2 direct render: Yes
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: N/A alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x pcie:
    gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s
    bus-ID: 04:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.50-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.52 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 2000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: Lenovo driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s
    lanes: 1 bus-ID: 03:00.0 chip-ID: 14c3:7961 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 12.88 GiB (2.7%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Lenovo
    model: UMIS RPJTJ512MGE1QDQ size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 1.5Q0630 temp: 25.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 476.64 GiB size: 468.09 GiB (98.21%)
    used: 12.88 GiB (2.8%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 54.0 C mobo: N/A gpu: amdgpu temp: 44.0 C
  Fan Speeds (RPM): fan-1: 0
Info:
  Processes: 385 Uptime: 1h 40m wakeups: 8 Memory: 14.47 GiB
  used: 2.59 GiB (17.9%) Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 clang: 13.0.1 Packages: 1269
  pacman: 1265 lib: 314 flatpak: 0 snap: 4 Shell: Zsh v: 5.9
  running-in: gnome-terminal inxi: 3.3.19

I ran the command systemctl suspend and it takes the same amount of time as the other methods.

Also, I have looked into the power option in settings, and there does not seem to be any option that allows me to disable suspend upon closing the lid.

Did you try a newer kernel, does the same happen on X11 or only on Wayland session?

I would consider installing manjaro-pipewire package …

As you use Gnome and I’m not experienced with it, I’ll leave it for someone who knows Gnome better.

Anyway, you can set suspend on lid close to ignore in /etc/systemd/logind.conf
https://wiki.archlinux.org/title/Power_management#Power_management_with_systemd

Or, instead, you can create the file /etc/systemd/logind.conf.d/disable-lid.conf, for example, and write HandleLidSwitch=ignore in it.

As to why it sakes such a long time to wake up after sleep, maybe we can find out why if you paste here the output of journalctl -xe after you wake it up from sleep.

Thanks so much for helping change the action closing the lid.

Jul 08 21:33:51 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
Jul 08 21:33:52 samir-manj gdm-password][37911]: gkr-pam: unlocked login keyring
Jul 08 21:33:52 samir-manj audit[37911]: USER_AUTH pid=37911 uid=0 auid=1000 se>
Jul 08 21:33:52 samir-manj audit[37911]: USER_ACCT pid=37911 uid=0 auid=1000 se>
Jul 08 21:33:52 samir-manj kernel: audit: type=1100 audit(1657281832.465:497): >
Jul 08 21:33:52 samir-manj kernel: audit: type=1101 audit(1657281832.465:498): >
Jul 08 21:33:52 samir-manj gdm-password][37911]: pam_env(gdm-password:setcred):>
Jul 08 21:33:52 samir-manj audit[37911]: CRED_REFR pid=37911 uid=0 auid=1000 se>
Jul 08 21:33:52 samir-manj kernel: audit: type=1110 audit(1657281832.469:499): >
Jul 08 21:33:52 samir-manj NetworkManager[596]: <info>  [1657281832.7183] agent>
Jul 08 21:33:52 samir-manj appindicatorsupport@rgcjonas.gmail.com[1153]: unable>
Jul 08 21:33:56 samir-manj touchegg.desktop[1454]: Error connecting to Touchégg>
Jul 08 21:33:56 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
Jul 08 21:33:59 samir-manj systemd[1]: NetworkManager-dispatcher.service: Deact>
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit NetworkManager-dispatcher.service has successfully entered the 'dea>
Jul 08 21:33:59 samir-manj audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 s>
Jul 08 21:33:59 samir-manj kernel: audit: type=1131 audit(1657281839.282:500): >
Jul 08 21:34:01 samir-manj touchegg.desktop[1454]: Error connecting to Touchégg>
Jul 08 21:34:01 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
lines 1305-1327/1327 (END)
Jul 08 21:33:51 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
Jul 08 21:33:52 samir-manj gdm-password][37911]: gkr-pam: unlocked login keyring
Jul 08 21:33:52 samir-manj audit[37911]: USER_AUTH pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:authentication grantors=pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="samir" exe>
Jul 08 21:33:52 samir-manj audit[37911]: USER_ACCT pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="samir" exe="/usr/lib/gdm-session-worker">
Jul 08 21:33:52 samir-manj kernel: audit: type=1100 audit(1657281832.465:497): pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:authentication grantors=pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gn>
Jul 08 21:33:52 samir-manj kernel: audit: type=1101 audit(1657281832.465:498): pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="samir" exe=">
Jul 08 21:33:52 samir-manj gdm-password][37911]: pam_env(gdm-password:setcred): non-alphanumeric key 'if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then' in /etc/environment', ignoring
Jul 08 21:33:52 samir-manj audit[37911]: CRED_REFR pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="samir" exe="/usr/>
Jul 08 21:33:52 samir-manj kernel: audit: type=1110 audit(1657281832.469:499): pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_key>
Jul 08 21:33:52 samir-manj NetworkManager[596]: <info>  [1657281832.7183] agent-manager: agent[f4bc9619c8099ad6,:1.65/org.gnome.Shell.NetworkAgent/1000]: agent registered
Jul 08 21:33:52 samir-manj appindicatorsupport@rgcjonas.gmail.com[1153]: unable to update icon for Proton VPN Tray
Jul 08 21:33:56 samir-manj touchegg.desktop[1454]: Error connecting to Touchégg daemon: Could not connect: Connection refused
Jul 08 21:33:56 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
Jul 08 21:33:59 samir-manj systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit NetworkManager-dispatcher.service has successfully entered the 'dead' state.
Jul 08 21:33:59 samir-manj audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal>
Jul 08 21:33:59 samir-manj kernel: audit: type=1131 audit(1657281839.282:500): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/system>
Jul 08 21:34:01 samir-manj touchegg.desktop[1454]: Error connecting to Touchégg daemon: Could not connect: Connection refused
Jul 08 21:34:01 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1305-1327/1327 (END)
Jul 08 21:33:51 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
Jul 08 21:33:52 samir-manj gdm-password][37911]: gkr-pam: unlocked login keyring
Jul 08 21:33:52 samir-manj audit[37911]: USER_AUTH pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:authentication grantors=pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="sa>
Jul 08 21:33:52 samir-manj audit[37911]: USER_ACCT pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="samir" exe="/usr/lib/gdm-session>
Jul 08 21:33:52 samir-manj kernel: audit: type=1100 audit(1657281832.465:497): pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:authentication grantors=pam_shells,pam_faillock,pam_permit,pam_failloc>
Jul 08 21:33:52 samir-manj kernel: audit: type=1101 audit(1657281832.465:498): pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="sami>
Jul 08 21:33:52 samir-manj gdm-password][37911]: pam_env(gdm-password:setcred): non-alphanumeric key 'if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then' in /etc/environment', ignoring
Jul 08 21:33:52 samir-manj audit[37911]: CRED_REFR pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="samir" ex>
Jul 08 21:33:52 samir-manj kernel: audit: type=1110 audit(1657281832.469:499): pid=37911 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_permit,pam_faillock,pam_g>
Jul 08 21:33:52 samir-manj NetworkManager[596]: <info>  [1657281832.7183] agent-manager: agent[f4bc9619c8099ad6,:1.65/org.gnome.Shell.NetworkAgent/1000]: agent registered
Jul 08 21:33:52 samir-manj appindicatorsupport@rgcjonas.gmail.com[1153]: unable to update icon for Proton VPN Tray
Jul 08 21:33:56 samir-manj touchegg.desktop[1454]: Error connecting to Touchégg daemon: Could not connect: Connection refused
Jul 08 21:33:56 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...
Jul 08 21:33:59 samir-manj systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit NetworkManager-dispatcher.service has successfully entered the 'dead' state.
Jul 08 21:33:59 samir-manj audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? >
Jul 08 21:33:59 samir-manj kernel: audit: type=1131 audit(1657281839.282:500): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/system>
Jul 08 21:34:01 samir-manj touchegg.desktop[1454]: Error connecting to Touchégg daemon: Could not connect: Connection refused
Jul 08 21:34:01 samir-manj touchegg.desktop[1454]: Reconnecting in 5 seconds...

This is the result of journalctl -xe immediately after waking it from suspension.

It didn’t catch suspend and resume. Maybe it’s better to issue journalctl -fe -b before suspending. Then, after suspending, press CTRL+c and copy the output over here.