[RESPONDED] Framework 13 DIY AMD won't wake from sleep on battery

My laptop won’t wake from sleep. The general steps to reproduce are:

  • Unplug power adapter
  • Close the laptop lid
  • …a few hours later…
  • Open the laptop lid

At this point, the laptop won’t respond to opening the lid or pressing the power button (which is pulsating normally). I’ve noticed that if I leave the laptop like this, it tends to get hot. The only way out of this situation is to hard reset the machine (by pressing and holding the power button until the machine turns off).

Please note that the steps outlined above don’t always trigger the issue, and there might be other pathways to triggering the issue. Unfortunately, this issue occurs randomly, usually at the most inconveninet of times :frowning_face:.

Here’s my hardware & software configuration:

  • Framework 13" DIY Edition, AMD Ryzen 5 7640U w/ Radeon 760M Graphics
  • 64 GB RAM (Mushkin Redline – DDR5 DRAM 5600MHz 64GB (2x32GB) MRA5S560LKKD32GX2)
  • 1 TB WD_BLACK SN850X NVMe
  • Fedora Workstation 39 with Full Disk Encryption enabled at install time

I followed the official installation guide to install Fedora 39, and applied the “graphical artifacts” fix from the “completing setup” section (step 6). None of the other fixes apply to me AFAICT.

Firmware seems up to date:

$ sudo dmidecode | grep -A3 'Vendor:\|Product:' && sudo lshw -C cpu | grep -A3 'product:\|vendor:'
	Vendor: INSYDE Corp.
	Version: 03.03
	Release Date: 10/17/2023
	Address: 0xE0000
       product: AMD Ryzen 5 7640U w/ Radeon 760M Graphics
       vendor: Advanced Micro Devices [AMD]
       physical id: 4
       bus info: cpu@0
       version: 25.116.1

No firmware updates are available either:

% fwupdmgr get-updates                                                                                                                 2 ↵
Devices with no available firmware updates: 
 • Fingerprint Sensor
 • WD BLACK SN850X 1000GB
Devices with the latest available firmware version:
 • System Firmware
 • UEFI dbx
No updates available

As of right now, this is the only issue I’ve encountered; otherwise, everything is working perfectly.

Please help!

I had what sounds like a similar issue, and in my case it wasn’t resolved until I reset the mainboard and updated the firmware of my WD_BLACK SSD.

Note: In my case, the power button also appeared dead so I might have experienced a different issue than you.

In my case, the power button pulsates but the laptop otherwise doesn’t respond. I should probably plug the laptop into a dock the next time this happens to see if the laptop is functional but the screen & keyboard are non-responsive. However, when I restart the laptop, it works normally.

I should clarify that the steps I outlined don’t always reproduce the issue, and there might be other pathways to running into the described issue; it’s random, essentially, which is what makes it really difficult to diagnose.

How did you update the hard drive firmware? Also, how do I find out what firmware version the drive is running currently?? As an FYI, I don’t have access to a Windows machine. Per LFVS, there are no updates available:

% fwupdmgr get-updates
Devices with no available firmware updates: 
 • WD BLACK SN850X 1000GB
 • Fingerprint Sensor
Devices with the latest available firmware version:
 • System Firmware
 • UEFI dbx
No updates available

Here’s more details about my SSD (please note the model in particular):

% sudo lshw -class storage
Place your finger on the fingerprint reader
  *-nvme                    
       description: NVMe device
       product: WD_BLACK SN850X 1000GB
       vendor: Sandisk Corp
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: /dev/nvme0
       version: 620361WD
       serial: ********
       width: 64 bits
       clock: 33MHz
       capabilities: nvme pm msi msix pciexpress nvm_express bus_master cap_list
       configuration: driver=nvme latency=0 nqn=nqn.2018-01.com.wdc:nguid:E8238FA6BF53-0001-001B448B47B4AC58 state=live
       resources: irq:59 memory:90a00000-90a03fff

Try this script (I used it to update my SN850X and added some improvements): wd_ssd_firmware_update/wd_ssd_fw_update.sh at main · not-a-feature/wd_ssd_firmware_update · GitHub

Edit: you are already on the latest firmware :confused:

Yep, I got the latest firmware version: 620361WD.

Is there any chance this could be related to full-disk encryption? Here’s the disk partitioning scheme:

% lsblk 
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
zram0                                         252:0    0     8G  0 disk  [SWAP]
nvme0n1                                       259:0    0 931.5G  0 disk  
├─nvme0n1p1                                   259:1    0   600M  0 part  /boot/efi
├─nvme0n1p2                                   259:2    0     1G  0 part  /boot
└─nvme0n1p3                                   259:3    0 929.9G  0 part  
  └─luks-bf446d96-10ab-465b-b9a8-458e8fe049e8 253:0    0 929.9G  0 crypt /home
                                                                         /

I doubt it, I’m also running luks, and it shouldn’t affect anything. Anything interesting in dmesg? Everything up-to-date?

Have you tried resetting the bios? Fully Resetting the Mainboard State - Framework Guides
Note that this model doesn’t have a cmos battery.

Edit: also make sure your battery connector is fully plugged in!

Ok, good to know LUKS should be fine.

The article you linked seems to be applicable to Intel models only. Should I still follow it but skip any parts directly related to the CMOS battery?

I didn’t remember to check dmesg, only journalctl (nothing interesting there). Next time this happens, I’ll dump dmesg output to a file to review on boot.

I’ll open up the laptop to ensure the keyboard is fully plugged in.

Mmh maybe that won’t work, this should: Reset forgotten BIOS password - #17 by sgilderd

The interesting bits are probably just before sleep, but you can check kernel logs (dmesg) of the previous boot with: journalctl -k -b -1.

Edit: I would also unplug the battery connector for ~2 minutes. I have solved issues (on other systems) doing that in the past. Won’t do any harm (if you’re very careful with the connector :slight_smile: )

The keyboard connector was ok (but I unplugged it and plugged it back in). Now trying to reset BIOS but can’t seem to locate the chassis open switch :sweat:

Press the chassis open switch in the center of the Mainboard 10 times

Ok, found the button :smiling_face_with_tear: and followed the instructions to reset BIOS. I reset the battery as well.

After resetting BIOS, the first boot took quite a bit longer than usual for the display to turn on. But the machine is back up now.

I’ll report back observed behavior in the coming days.

Thanks for the help!

2 Likes

That’s normal! RAM training.

Good luck!

3 Likes

Thanks for the speedy help @Arthur_Bols ,
Nothing to add, just reiterating to get

journalctl -k -b -1 .

if issues still persist :slight_smile:

1 Like

Ok, I have gotten the error again (multiple times) :cry:. Here are some messages from the prev log - sudo journalctl -k -b -1:

sda: detected capacity change from 15695871 to 0
usb 7-1: USB disconnect, device number 2
ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
usb 1-4: reset full-speed USB device number 2 using xhci_hcd
usb 1-4: reset full-speed USB device number 2 using xhci_hcd
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
usb 1-4: reset full-speed USB device number 2 using xhci_hcd
usb 1-4: reset full-speed USB device number 2 using xhci_hcd
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
usb 1-4: reset full-speed USB device number 2 using xhci_hcd
usb 1-4: reset full-speed USB device number 2 using xhci_hcd
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
wlp1s0: deauthenticating from 80:da:13:1c:6f:f4 by local choice (Reason: 3=DEAUTH_LEAVING)
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
PM: suspend entry (s2idle)

Some messages from the current log - sudo journalctl -k -b:

Linux version 6.7.10-200.fc39.x86_64 (mockbuild@ae08434938294146bc90abcf84c6afc4) (gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6), GNU ld versi
Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.7.10-200.fc39.x86_64 root=UUID=8daddb32-144a-4731-8615-babf8e92b328 ro rootflags=subvol=root rd
BIOS-provided physical RAM map:
BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
BIOS-e820: [mem 0x000000000009f000-0x00000000000bffff] reserved
--- xxx ---

Filtered faults from the current log - sudo journalctl -k -b -p 0..4:

ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20230628/tbfadt-615)
Speculative Return Stack Overflow: IBPB-extending microcode not applied!
Speculative Return Stack Overflow: WARNING: See https://kernel.org/doc/html/latest/admin-guide/hw-vuln/srso.html for mitigation options.
pci 0000:00:00.2: can't derive routing for PCI INT A
pci 0000:00:00.2: PCI INT A: not connected
i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
i8042: Warning: Keylock active
device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
integrity: Problem loading X.509 certificate -126
journald[1199]: File /var/log/journal/f52cfc18b87d4b3aa53b48035d04b121/system.journal corrupted or uncleanly shut down, renaming and replacin
cros_ec_lpcs cros_ec_lpcs.0: EC ID not detected
journald[1199]: File /var/log/journal/f52cfc18b87d4b3aa53b48035d04b121/user-1000.journal corrupted or uncleanly shut down, renaming and repla
Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
i2c_designware AMDI0010:00: i2c_dw_handle_tx_abort: lost arbitration
i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)

These shutdowns have been happening with or without power adapter attached, with lid closed or open, and on Fedora and Ubuntu both (officially supported versions with post-install workarounds applied).

The computer gets really hot every time this happens and once I reset it, the fan goes on full blast for a while too (this has been consistent).

OK, it seems the issue is resolved after updating to the latest kernel (released 1-2 days ago). I’m currently running kernel version 6.7.11-200.fc39.x86_64 and the computer is able to recover from sleep normally.

I’ll keep an eye on the system for the next few days and post back here at the end of the observation period.

I’m happy to report that the laptop has consistently been able to wake up since upgrading the kernel from version 6.7.10-200.fc39.x86_64 to 6.7.11-200.fc39.x86_64.

In retrospect, when I was at version 6.7.10-200.fc39.x86_64, had I tried booting the system with the previous version of the kernel, I could have saved myself a lot of pain. @Loell_Framework, perhaps the troubleshooting guide should explicitly mention booting with the previous version of the kernel to see if that helps with an issue (particularly if it’s) introduced by an update.

Thanks everyone who chimed in to help!

1 Like