Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
resume after suspend fails (suspend to RAM)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
oxensepp
n00b
n00b


Joined: 01 May 2020
Posts: 42

PostPosted: Sun May 26, 2024 6:48 pm    Post subject: resume after suspend fails (suspend to RAM) Reply with quote

Hello,

I've a strange issue with suspend/hibernate. Suspend to RAM works (computer is all dark and quiet), but resume fails, i.e. the keyboard light switches on, but the screen remains dark and the computer does not respond pings or ssh requests.
This problem came with kernel 6.6.* (now 6.6.30), 6.1.57 was OK, if I remember correctly.

The system is up-to-date.

I am not using systemd, but elongind (loginctl suspend) instead.

I have a laptop GPD win max 2 with 16 GB RAM, similar to https://www.gpd.hk/gpdwinmax2 - but just a slightly older model.
As mentioned, kernel 6.6.30 is running:

Code:

~ > uname -a
Linux mendelssohn 6.6.30-gentoo-x86_64 #1 SMP PREEMPT_DYNAMIC Mon May  6 22:55:27 CEST 2024 x86_64 AMD Ryzen 7 6800U with Radeon Graphics AuthenticAMD GNU/Linux



The disk layout is fully encrypted and boots from an removable USB stick:
Code:

~ > lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme0n1           259:0    0   1.8T  0 disk 
├─nvme0n1p1       259:1    0   100M  0 part 
├─nvme0n1p2       259:2    0   128M  0 part 
├─nvme0n1p3       259:3    0   300G  0 part 
├─nvme0n1p4       259:4    0 161.7G  0 part 
├─nvme0n1p5       259:5    0    15G  0 part 
└─nvme0n1p6       259:6    0   1.4T  0 part 
  └─root          254:0    0   1.4T  0 crypt
    ├─System-swap 254:1    0    40G  0 lvm   [SWAP]
    └─System-root 254:2    0   1.3T  0 lvm   /.snapshots
                                             /home
                                             /


nvme0n1p1 to nvme0n1p5 is for Windows, nvme0n1p6 is holding Gentoo.



I looked into /var/log/messages, but I found nothing special, I think:

Code:

May 26 19:51:05 mendelssohn polkitd[4396]: Registered Authentication Agent for unix-process:5588:10520 (system bus name :1.71 [/usr/bin/pkttyagent --notify-fd 6 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale C.UTF8)
May 26 19:51:05 mendelssohn polkitd[4396]: Unregistered Authentication Agent for unix-process:5588:10520 (system bus name :1.71, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale C.UTF8) (disconnected from bus)
May 26 19:57:51 mendelssohn syslog-ng[4338]: syslog-ng starting up; version='4.6.0'


The polkit-messages are the last items before suspend, and the syslog-ng message is the first one after suspend, unsuccessful resume, hard shutdown and restart.

configuration should follow the wiki:

Code:

~ > grep CONFIG_SUSPEND /usr/src/linux-6.6.30-gentoo/.config
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
~ > grep CONFIG_HIBERNATION /usr/src/linux-6.6.30-gentoo/.config
CONFIG_HIBERNATION=y
CONFIG_HIBERNATION_SNAPSHOT_DEV=y
~ > cat /sys/power/state
freeze mem disk


dmesg looks O.K. for me (but for what I should look?), so I am rather clueless what's going wrong here.
Any hints welcome!





emerge --info is this, if useful:

Code:

:~ > emerge --info
Portage 3.0.63 (python 3.11.9-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.39-r6, 6.6.30-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.6.30-gentoo-x86_64-x86_64-AMD_Ryzen_7_6800U_with_Radeon_Graphics-with-glibc2.39
KiB Mem:    11993036 total,   9076684 free
KiB Swap:   41943036 total,  41943036 free
Timestamp of repository gentoo: Sun, 26 May 2024 10:30:00 +0000
Head commit of repository gentoo: b6a8e63fe31fbba7dc39cdb4061c1fd663a689e0
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.11.9::gentoo, 3.12.3::gentoo
dev-lang/rust-bin:         1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://ftp.agdsn.de/gentoo     https://ftp.agdsn.de/gentoo     rsync://ftp.agdsn.de/gentoo     https://mirror.leaseweb.com/gentoo     http://mirror.leaseweb.com/gentoo     rsync://mirror.leaseweb.com/gentoo     https://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/     http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/     rsync://ftp.spline.inf.fu-berlin.de/gentoo-distfiles/     https://mirror.netzwerge.de/gentoo/     http://mirror.netzwerge.de/gentoo/     rsync://mirror.netzwerge.de/gentoo"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j6"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl amd64 bluetooth bzip2 cli crypt dri elogind fortran gdbm iconv ipv6 libtirpc multilib ncurses nls openmp pam pcre pulseaudio readline seccomp split-usr ssl test-rust udev unicode xattr zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

Back to top
View user's profile Send private message
oxensepp
n00b
n00b


Joined: 01 May 2020
Posts: 42

PostPosted: Thu Jul 11, 2024 9:03 pm    Post subject: Re: resume after suspend fails (suspend to RAM) Reply with quote

Just I updated to kernel 6.6.38 (and also the rest of the system is also up to date), but still having this issue:

resume works, at least it looks like that, but wakeup fails: Keybord light turns on, fan is turning, but screen remains dark and it is not reachable via ethernet/wireless.

I'm rather clueless. Any suggestions how to track down this issue?

TIA!
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 270
Location: Pennsylvania, USA

PostPosted: Fri Jul 12, 2024 2:17 am    Post subject: Reply with quote

Try suspending and resuming from the boot console (CTL-ALT-F1). Or from single-user mode if you have to. May yield more information --or not.

Other than that, there is https://docs.kernel.org/power/basic-pm-debugging.html .
Back to top
View user's profile Send private message
oxensepp
n00b
n00b


Joined: 01 May 2020
Posts: 42

PostPosted: Sun Oct 13, 2024 10:22 pm    Post subject: Reply with quote

Still struggling with this issue, now with the recent stable kernel 6.6.52.

the error is unchanged: I can suspend to ram, i.e., everything gets dark, the fan stops and the computer disappears from the network.
Waking up fails, after pressing the power button, the keyboard light turns on, but the screen remains dark and no network activity is visible. I have to force a power down by pressing the power button for 10 seconds or so.

Details etc. see above, I didn't change anything except the usual updates.


I tried hibernating (suspend to disk), and surprisingly it worked at once!


I tried s2idle by writing "s2idle" to /sys/power/mem_sleep and "mem" to /sys/power/state, but the system just froze, without getting dark etc.


I tried to use as few modules as possible, because a buggy module may cause the error. Therefore, I booted the computer with 'init=/bin/bash' as kernel command line parameter and got this lsmod:
Code:

Module                  Size  Used by
ext4                 1122304  1
mbcache                16384  1 ext4
jbd2                  196608  1 ext4
dm_crypt               61440  2
trusted                36864  1 dm_crypt
asn1_encoder           12288  1 trusted
dm_mod                212992  11 dm_crypt
sd_mod                 86016  1
uas                    32768  0
usb_storage            86016  2 uas
nvme                   57344  1
xhci_pci               24576  0
xhci_pci_renesas       16384  1 xhci_pci
nvme_core             188416  2 nvme
crc32_pclmul           12288  0
t10_pi                 20480  2 sd_mod,nvme_core
xhci_hcd              380928  1 xhci_pci
crc64_rocksoft         16384  1 t10_pi
crc64                  16384  1 crc64_rocksoft
btrfs                2015232  1
blake2b_generic        24576  0
xor                    20480  1 btrfs
raid6_pq              122880  1 btrfs
libcrc32c              12288  1 btrfs
crc32c_intel           16384  3


But the error was the same.


I also noticed https://bugs.gentoo.org/939042, but adding Adding "SuspendMode=deep" did not change anything.Well, I'm having still elogind 252.9-r2.


I also set /sys/power/pm_trace to 1, but I got no more log messages as posted above:
Code:

Oct 14 00:09:33 mendelssohn chronyd[4296]: System clock was stepped by 3600.203174 seconds
Oct 14 00:09:45 mendelssohn kernel: PM: Enabling pm_trace changes system date and time during resume.\x0aPM: Correct system time has to be restored manually after resume.
Jan  1 12:16:07 mendelssohn syslog-ng[4547]: syslog-ng starting up; version='4.6.0'


The last line is the first log message after forcing a reboot by long pressing the power button.


So I am clueless how to investigate that nasty issue further.
Back to top
View user's profile Send private message
anthonyk
n00b
n00b


Joined: 21 Nov 2005
Posts: 47

PostPosted: Wed Oct 23, 2024 9:56 pm    Post subject: Reply with quote

I've been having similar issues, I thought I worked around it based on this issue thread: https://github.com/elogind/elogind/issues/208#issuecomment-2366912746 , but the error has crept back again now. I was using kernel .48? then and am using .52 now, it's possible that with a rollback it might work again. Not sure what the underlying issue is however
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum