After some latest updates, suspend and resume works . What is still a bit weird, I have to sort of close-open quickly the lid, right after waking up from sleep, to get to see the lock screen from which I can unlock and continue working.
Again in trying to explain it correctly: the system suspends, wakes up after opening the lid but the screen is still black at that point. Connecting to an external display, or else, switching to another virtual terminal, ensured that it’s just a matter of the display to power-up. Then, a quick close-open action, or approaching the lid to close but not really closing it, is what power’s up the display correctly. This is the last annoyance I experience.
Some “context”, maybe it’ll be useful for someone.
-
sudo lsinitrd | grep resume
resume -rwxr-xr-x 1 root root 14288 May 7 17:30 usr/lib/systemd/systemd-hibernate-resume -rwxr-xr-x 1 root root 14520 May 7 17:30 usr/lib/systemd/system-generators/systemd-hibernate-resume-generator -rw-r--r-- 1 root root 680 May 7 17:30 usr/lib/systemd/system/systemd-hibernate-resume@.service
-
The standard
logind.conf
[Login] #NAutoVTs=6 #ReserveVT=6 #KillUserProcesses=no #KillOnlyUsers= #KillExcludeUsers=root #InhibitDelayMaxSec=5 #UserStopDelaySec=10 #HandlePowerKey=poweroff #HandlePowerKeyLongPress=ignore #HandleRebootKey=reboot #HandleRebootKeyLongPress=poweroff #HandleSuspendKey=suspend #HandleSuspendKeyLongPress=hibernate #HandleHibernateKey=hibernate #HandleHibernateKeyLongPress=ignore #HandleLidSwitch=suspend #HandleLidSwitchExternalPower=suspend #HandleLidSwitchDocked=ignore #PowerKeyIgnoreInhibited=no #SuspendKeyIgnoreInhibited=no #HibernateKeyIgnoreInhibited=no #LidSwitchIgnoreInhibited=yes #RebootKeyIgnoreInhibited=no #HoldoffTimeoutSec=30s #IdleAction=ignore #IdleActionSec=30min #RuntimeDirectorySize=10% #RuntimeDirectoryInodesMax= #RemoveIPC=yes #InhibitorsMax=8192 #SessionsMax=8192 #StopIdleSessionSec=infinity
-
inxi -Fxxxz
System: Kernel: 6.3.6-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.1.1 Desktop: sway v: 1.8.1 info: waybar vt: 2 dm: SDDM Distro: EndeavourOS base: Arch Linux Machine: Type: Laptop System: LENOVO product: 20S0CTO1WW v: ThinkPad T14 Gen 1 serial: <superuser required> Chassis: type: 10 serial: <superuser required> Mobo: LENOVO model: 20S0CTO1WW serial: <superuser required> UEFI: LENOVO v: N2XET23W (1.13 ) date: 08/26/2020 Battery: ID-1: BAT0 charge: 35.9 Wh (85.1%) condition: 42.2/51.0 Wh (82.8%) volts: 11.9 min: 11.5 model: Celxpert 5B10W13954 type: Li-poly serial: <filter> status: discharging cycles: 845 CPU: Info: quad core model: Intel Core i7-10610U bits: 64 type: MT MCP smt: enabled arch: Comet/Whiskey Lake note: check rev: C cache: L1: 512 KiB L2: 2 MiB L3: 64 MiB Speed (MHz): avg: 1492 high: 2300 min/max: 400/4900 cores: 1: 2300 2: 2300 3: 2300 4: 2300 5: 700 6: 656 7: 687 8: 695 bogomips: 36812 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx Graphics: Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915 v: kernel arch: Gen-9.5 ports: active: HDMI-A-2,eDP-1 empty: DP-1,DP-2,HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:9b41 class-ID: 0300 Device-2: NVIDIA GP108M [GeForce MX330] vendor: Lenovo driver: nvidia v: 530.41.03 arch: Pascal pcie: speed: 2.5 GT/s lanes: 4 bus-ID: 2d:00.0 chip-ID: 10de:1d16 class-ID: 0302 Device-3: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-8:3 chip-ID: 04f2:b6d0 class-ID: fe01 serial: <filter> Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.2 compositor: sway v: 1.8.1 driver: X: loaded: intel,nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa dri: i965 gpu: i915 d-rect: 5760x2160 display-ID: 1 Monitor-1: HDMI-A-2 pos: primary,left model: LG (GoldStar) TV SSCR2 serial: <filter> res: 1920x1080 hz: 60 dpi: 30 scale: 1 size: 1600x900mm (62.99x35.43") diag: 1836mm (72.3") modes: max: 1920x1080 min: 720x400 Monitor-2: eDP-1 pos: right model: BOE Display 0x08ce res: 3840x2160 hz: 60 dpi: 316 scale: 2 size: 309x174mm (12.17x6.85") diag: 355mm (14") modes: 3840x2160 API: OpenGL v: 4.6 Mesa 23.1.2 renderer: Mesa Intel UHD Graphics (CML GT2) direct-render: Yes Audio: Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo driver: sof-audio-pci-intel-cnl bus-ID: 00:1f.3 chip-ID: 8086:02c8 class-ID: 0403 API: ALSA v: k6.3.6-arch1-1 status: kernel-api Server-1: sndiod v: N/A status: off Server-2: PipeWire v: 0.3.71 status: active with: 1: pipewire-pulse status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin Network: Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280 IF: wlan0 state: up mac: <filter> Device-2: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:0d4e class-ID: 0200 IF: enp0s31f6 state: down mac: <filter> IF-ID-1: wwan0 state: down mac: N/A Bluetooth: Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 bus-ID: 1-10:5 chip-ID: 8087:0026 class-ID: e001 Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: disabled rfk-block: hardware: no software: no address: see --recommends Drives: Local Storage: total: 1.82 TiB used: 485.88 GiB (26.1%) ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 2TB size: 1.82 TiB speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: 2B2QEXM7 temp: 40.9 C scheme: GPT Partition: ID-1: / size: 125.43 GiB used: 41.52 GiB (33.1%) fs: ext4 dev: /dev/dm-0 mapped: luks-a9001606-80a3-47d8-bc48-e2a79a3a95be ID-2: /boot/efi size: 1022 MiB used: 472 KiB (0.0%) fs: vfat dev: /dev/nvme0n1p2 ID-3: /home size: 125.43 GiB used: 94.4 GiB (75.3%) fs: ext4 dev: /dev/dm-2 mapped: luks-03e0680d-6510-4bda-a1c2-698e71e0448a Swap: ID-1: swap-1 type: partition size: 93.63 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/dm-1 mapped: luks-0b2e5609-b174-45aa-875c-727ae046ea13 Sensors: System Temperatures: cpu: 47.0 C mobo: N/A Fan Speeds (RPM): N/A Info: Processes: 411 Uptime: 1d 8h 22m wakeups: 944 Memory: available: 46.81 GiB used: 14.26 GiB (30.5%) Init: systemd v: 253 default: graphical Compilers: gcc: 13.1.1 clang: 15.0.7 Packages: 1861 pm: pacman pkgs: 1851 pm: flatpak pkgs: 10 Shell: Bash v: 5.1.16 running-in: terminology inxi: 3.3.27
-
Defaults in
/etc/systemd/sleep.conf
[Sleep] #AllowSuspend=yes #AllowHibernation=yes #AllowSuspendThenHibernate=yes #AllowHybridSleep=yes #SuspendMode= #SuspendState=mem standby freeze #HibernateMode=platform shutdown #HibernateState=disk #HybridSleepMode=suspend platform shutdown #HybridSleepState=disk #HibernateDelaySec= #SuspendEstimationSec=60min
-
Relevant environment variables
WAYBAR_WEATHER_UNITS=metric QT_WAYLAND_DISABLE_WINDOWDECORATION=1 I3SOCK=/run/user/1000/sway-ipc.1000.1493.sock XDG_SESSION_TYPE=wayland WAYBAR_WEATHER_EXCLUDE=minutely,hourly,daily XDG_CURRENT_DESKTOP=sway SWAYSOCK=/run/user/1000/sway-ipc.1000.1493.sock WAYLAND_DISPLAY=wayland-1 WAYBAR_WEATHER_LAT=45.799 QT_QPA_PLATFORM=wayland WAYBAR_WEATHER_APIKEY=5ad143b61b08cba5670f6eb5fcc20a8a MOZ_ENABLE_WAYLAND=1 WAYBAR_WEATHER_LON=8.643 QT_WAYLAND_DISABLE_WINDOWDECORATION=1 QT_AUTO_SCREEN_SCALE_FACTOR=1
-
Under
/etc/dracut.conf.d/
-
calamares-luks.conf
# force installing /etc/crypttab even if hostonly="no", install the keyfile install_items+=" /etc/crypttab /crypto_keyfile.bin " # enable automatic resume from swap add_device+=" /dev/disk/by-uuid/0b2e5609-b174-45aa-875c-727ae046ea13 "
-
eos-defaults.conf
omit_dracutmodules+=" network " compress="zstd"
-
resume.conf
add_dracutmodules+=" resume "
-
nvidia.conf
force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "
-
ostree.conf
add_dracutmodules+=" ostree systemd " reproducible=yes
-
-
swap partition
/dev/mapper/luks-0b2e5609-b174-45aa-875c-727ae046ea13 swap swap defaults 0 0 [..] tmpfs /tmp tmpfs noatime,mode=1777 0 0
-
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES rd.luks.uuid=a9001606-80a3-47d8-bc48-e2a79a3a95be rd.luks.uuid=0b2e5609-b174-45aa-875c-727ae046ea13 resume=/dev/mapper/luks-0b2e5609-b174-45aa-875c-727ae046ea13 loglevel=3 rd.driver.blacklist=nouveau nvidia-drm.modeset=1'
Closing this issue.