Gave up waiting for suspend/resume device ubuntu 22 framework 12 gen

My testing last night. 11 hours suspended. No applications running during suspend. No external monitors attached.

Fedora 37 is 81%, TLP only (Gnome power profile removed), 2 USB C, hdmi, DP. 12th Gen. s2idle deep.

Pop OS 24.04 at 61% system76-power only, USB C, hdmi, s2idle deep.

Ubuntu 22.04 at 89% TLP only (Gnome power profile removed), USB C, hdmi, 12th Gen. s2idle deep.

2 Likes

Just to be clear, the boot issue ONLY happens after proper shutdown or reboot.
As i mentioned in my original post, boot from hibernation/suspence is all working well.

It sounds counterintuitive but that’s what’s happening.

I failed to mention that my swap is setup as a partition and not file.

here is what it looks like

Its root. And its fine. The busybox sees it fine. Verified.

Your suspend/resume device should be the UUID for the swap partition you are using; if that UUID shown is for root that may be why normal shutdowns and/or reboots are giving you the busybox interface after boot.

From my Ubuntu 22.04 install …

 yetiman :~   $   sudo blkid -c /dev/null -o list | grep swap
[sudo] password for yetiman: 
           swap             [SWAP]         4df*****-****-****-****-***********2
 yetiman :~   $   cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=4df*****-****-****-****-***********2

I have masked most of the UUIDs for privacy but left enough to display the resume device listed in /etc/initramfs-tools/conf.d/resume is the same as my swap partition. I have had troubles in the past with the busybox interface after disk layout alterations when these two don’t match.

I’d suggest you run the blkid command in the above code box and get your swap partition UUID. Edit the file /etc/initramfs-tools/conf.d/resume as root in your favourite text editor and add or alter the line “RESUME=UUID=” to match the two up. Once done, in terminal run the command…

sudo update-initramfs -u -k all

Note: This will update all your kernels, if you only want the current kernel updated don’t include the " -k all".

Also one last check is to check your /etc/fstab also uses the same UUID for your swap partition entry.

If in any doubt about this info wait for @Matt_Hartley to check it out and respond. I have had that suspend/resume device error and a busybox interface a few times now after adjusting partition layouts which include changing the swap partition. I really don’t know why it works if you do a hibernation; I could only guess that the hibernation process is retrieving the information from somewhere else and not accessing the normal details as per a reboot or a fresh boot.

Edit: If you can’t get into your install this may need to be done from a live cd or usb boot and using a chroot set up to do the fix. Let us know if you need further help with such. Or if you have other “parallel” linux installs this can be done very easily without a cd or usb live boot.

Good luck and regards, yeti.

2 Likes

thanks Yeti

couple of clarifying points

  • the issue is intermittent so i have no issues getting in
  • the screenshot above is confusing - the listed UUID is indeed for the root partition because sequentially root partition access is the second check the bootloader is performing
    -my fstab and initfram UUIDs for root and swap are all consistent and inline with what you recomended above and they came out that way straight from the original install. I did not mock with the boot or swap setting at all. Just enabled hibernation to swap partition pre-created during install
2 Likes

more screenshots

and another one

My hardware:

SSD

https://www.amazon.com/gp/product/B09QV692XY/ref=ppx_yo_dt_b_asin_image_o03_s00?ie=UTF8&th=1

RAM

https://www.amazon.com/gp/product/B07Q8TNXKP/ref=ppx_yo_dt_b_asin_image_o05_s00?ie=UTF8&psc=1

Can you please check the ALERT!?
It tells you that the disk with UUID cannot be found.
Can you check if your resume= line inside grub is correct?
Please list us the contents of lsblk.

(I don’t really know why we have this issue here, it’s nothing related to framework but a general linux question)

1 Like

resume line and all UUIDs are correct. As i mentioned above its an intermittent (not persistent) problem. It sometimes all boots fine while the other times not.
To me its something with how OS is querying device availability - maybe a timing or something. Certainly something there is very fragile and not tollerant.

I will snapshot lsblk next time the boot hangup happens…

thanks!
m

managed to capture dmesg in busybox - attached

what seems to be relevant is the timeout after 60 sec wait:

[ 2.837535] usb 1-10: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.173847] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input4
[ 62.566076] nvme nvme0: I/O 28 QID 0 timeout, disable controller
[ 62.582491] nvme nvme0: Failed to read smart log (error -4)
[ 62.582502] nvme nvme0: Removing after probe failure status: -4
[ 62.607474] usb-storage 4-3:1.0: USB Mass Storage device detected
[ 62.607630] usb-storage 4-3:1.0: Quirks match for vid 090c pid 3350: 20000

While the successful boot looks like this:

maciek@framework-ubuntu:~$ sudo dmesg |grep nvm
[ 1.712138] nvme 0000:01:00.0: platform quirk: setting simple suspend
[ 1.712326] nvme nvme0: pci function 0000:01:00.0
[ 1.751711] nvme nvme0: allocated 32 MiB host memory buffer.
[ 1.754342] nvme nvme0: 16/0/0 default/read/poll queues
[ 1.757861] nvme0n1: p1 p2 p3 p4 p5 p6 p7
[ 2.858807] EXT4-fs (nvme0n1p5): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 3.141679] EXT4-fs (nvme0n1p5): re-mounted. Opts: errors=remount-ro. Quota mode: none.
[ 3.340863] Adding 37168124k swap on /dev/nvme0n1p7. Priority:-2 extents:1 across:37168124k SSFS
[ 3.363983] EXT4-fs (nvme0n1p6): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.

more of the file here as i seem to be unable to attach log files here:

[ 1.766574] nvme 0000:01:00.0: platform quirk: setting simple suspend
[ 1.766693] nvme nvme0: pci function 0000:01:00.0
[ 1.768878] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[ 1.768882] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.768884] usb usb2: Product: xHCI Host Controller
[ 1.768885] usb usb2: Manufacturer: Linux 5.15.0-56-generic xhci-hcd
[ 1.768886] usb usb2: SerialNumber: 0000:00:14.0
[ 1.769046] hub 2-0:1.0: USB hub found
[ 1.769078] hub 2-0:1.0: 4 ports detected
[ 1.769291] i2c i2c-0: 2/2 memory slots populated (from DMI)
[ 1.769443] usb: port power management may be unreliable
[ 1.769829] i2c i2c-0: Successfully instantiated SPD at 0x50
[ 1.777995] intel-lpss 0000:00:15.0: enabling device (0004 → 0006)
[ 1.778303] idma64 idma64.0: Found Intel integrated DMA 64-bit
[ 1.874364] intel-lpss 0000:00:15.1: enabling device (0004 → 0006)
[ 1.874784] idma64 idma64.1: Found Intel integrated DMA 64-bit
[ 1.897948] intel-lpss 0000:00:15.3: enabling device (0004 → 0006)
[ 1.898443] idma64 idma64.2: Found Intel integrated DMA 64-bit
[ 2.038432] input: FRMW0001:00 32AC:0006 Wireless Radio Control as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-FRMW0001:00/0018:32AC:0006.0001/input/input5
[ 2.038559] input: FRMW0001:00 32AC:0006 Consumer Control as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-FRMW0001:00/0018:32AC:0006.0001/input/input6
[ 2.038688] input: FRMW0001:00 32AC:0006 as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-FRMW0001:00/0018:32AC:0006.0001/input/input7
[ 2.038746] hid-generic 0018:32AC:0006.0001: input,hidraw0: I2C HID v1.00 Device [FRMW0001:00 32AC:0006] on i2c-FRMW0001:00
[ 2.067564] input: PIXA3854:00 093A:0274 Mouse as /devices/pci0000:00/0000:00:15.3/i2c_designware.2/i2c-3/i2c-PIXA3854:00/0018:093A:0274.0002/input/input8
[ 2.068143] input: PIXA3854:00 093A:0274 Touchpad as /devices/pci0000:00/0000:00:15.3/i2c_designware.2/i2c-3/i2c-PIXA3854:00/0018:093A:0274.0002/input/input9
[ 2.068779] hid-generic 0018:093A:0274.0002: input,hidraw1: I2C HID v1.00 Mouse [PIXA3854:00 093A:0274] on i2c-PIXA3854:00
[ 2.073015] xhci_hcd 0000:00:0d.0: xHCI Host Controller
[ 2.073026] xhci_hcd 0000:00:0d.0: new USB bus registered, assigned bus number 3
[ 2.074176] xhci_hcd 0000:00:0d.0: hcc params 0x20007fc1 hci version 0x120 quirks 0x0000000200009810
[ 2.074496] xhci_hcd 0000:00:0d.0: xHCI Host Controller
[ 2.074503] xhci_hcd 0000:00:0d.0: new USB bus registered, assigned bus number 4
[ 2.074509] xhci_hcd 0000:00:0d.0: Host supports USB 3.2 Enhanced SuperSpeed
[ 2.074560] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 2.074565] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.074567] usb usb3: Product: xHCI Host Controller
[ 2.074570] usb usb3: Manufacturer: Linux 5.15.0-56-generic xhci-hcd
[ 2.074572] usb usb3: SerialNumber: 0000:00:0d.0
[ 2.074844] hub 3-0:1.0: USB hub found
[ 2.074856] hub 3-0:1.0: 1 port detected
[ 2.075271] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[ 2.075277] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.075279] usb usb4: Product: xHCI Host Controller
[ 2.075281] usb usb4: Manufacturer: Linux 5.15.0-56-generic xhci-hcd
[ 2.075282] usb usb4: SerialNumber: 0000:00:0d.0
[ 2.075518] hub 4-0:1.0: USB hub found
[ 2.075527] hub 4-0:1.0: 4 ports detected
[ 2.101947] usb 1-7: new high-speed USB device number 2 using xhci_hcd
[ 2.278155] usb 1-7: New USB device found, idVendor=0bda, idProduct=5634, bcdDevice= 0.21
[ 2.278165] usb 1-7: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 2.278169] usb 1-7: Product: Laptop Camera
[ 2.278172] usb 1-7: Manufacturer: Generic
[ 2.278175] usb 1-7: SerialNumber: 200901010001
[ 2.405995] usb 1-9: new full-speed USB device number 3 using xhci_hcd
[ 2.546213] usb 4-3: new SuperSpeed USB device number 2 using xhci_hcd
[ 2.556768] usb 1-9: New USB device found, idVendor=27c6, idProduct=609c, bcdDevice= 1.00
[ 2.556779] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.556782] usb 1-9: Product: Goodix USB2.0 MISC
[ 2.556785] usb 1-9: Manufacturer: Goodix Technology Co., Ltd.
[ 2.556788] usb 1-9: SerialNumber: UID9620E56D_XXXX_MOC_B0
[ 2.567610] usb 4-3: New USB device found, idVendor=090c, idProduct=3350, bcdDevice=11.00
[ 2.567621] usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.567625] usb 4-3: Product: USB DISK
[ 2.567628] usb 4-3: Manufacturer: SMI Corporation
[ 2.567630] usb 4-3: SerialNumber: AA00000000015055
[ 2.685988] usb 1-10: new full-speed USB device number 4 using xhci_hcd
[ 2.837525] usb 1-10: New USB device found, idVendor=8087, idProduct=0032, bcdDevice= 0.00
[ 2.837535] usb 1-10: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.173847] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input4
[ 62.566076] nvme nvme0: I/O 28 QID 0 timeout, disable controller
[ 62.582491] nvme nvme0: Failed to read smart log (error -4)
[ 62.582502] nvme nvme0: Removing after probe failure status: -4
[ 62.607474] usb-storage 4-3:1.0: USB Mass Storage device detected
[ 62.607630] usb-storage 4-3:1.0: Quirks match for vid 090c pid 3350: 20000
[ 62.607661] scsi host0: usb-storage 4-3:1.0
[ 62.607765] usbcore: registered new interface driver usb-storage
[ 62.609249] usbcore: registered new interface driver uas
[ 63.624257] scsi 0:0:0:0: Direct-Access SMI USB DISK 1100 PQ: 0 ANSI: 6
[ 63.625405] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 63.626734] sd 0:0:0:0: [sda] Media removed, stopped polling
[ 63.628534] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 126.682200] usb 4-3: USB disconnect, device number 2
[ 171.802199] usb 4-3: new SuperSpeed USB device number 3 u

It seems to be a known issue with some nvme drives, especially when becoming hot/under load.

There is a possible workaround for some drives using nvme_core.default_ps_max_latency_us=0 but that doesn’t solve the problem that the drive is not responding correctly.

I would check if the drive termals are fine and if you have a spare around check if it happens with that one as well.

1 Like

thanks @Anachron , great catch, i don’t believe i got any heat sinks…

but… how would it explain the fact that when booting into windows or resuming from hibernate on Ubuntu i never experienced the issue what so ever …

i guess hibernation would naturally cool down the system after a while, but windows?

Guide is forth coming for Ubuntu users, but here is a sneak peak at how I personally use hibernate on 11th gen - tested on 22.04.1 as working flawlessly on a vanilla CLEAN installation. I can not make promises for any tweaked/customized setups.

This will be part of a larger Knowledge Base article in the near future.

But this absolutely works, test after test. This guide is not official yet, but it’s coming and yes, it works on:

Ubuntu 22.04 unencrypted, 11th Gen Framework.


Suspend on Linux isn’t going to match Windows. And some modules will draw power even when in a deep suspend state.

There is a solution and it works very well. It’s called “suspend-then-hibernate” and once configured, is wonderful.

Now you’re going to be asked to paste in some things and also look for some things. It’s not difficult, but it will take you a few minutes to get set up.

The advantage is once configured, you can set a time to remain in deep suspend state for say, one hour. Mine is set for half an hour as I know myself if my Framework laptop isn’t used from a suspend state for 30 minutes, I want my laptop to be saved and then turned off (hibernate).

Then if the laptop is still untouched, it will then automatically go into hibernation mode which is powered off…but will remember your exact state it was suspended in. Since it’s saving this to
disk, it’s going to mean you won’t need to worry about draining the battery.

Let’s get started. Remember, you can simply copy and paste these commands into the terminal.

  1. First, let’s clear old swap file, if this is a default Ubuntu installation:

sudo swapoff -v /swapfile

Then:

sudo rm -f /swapfile

  1. Now create a new swapfile that is of this recommended size - yes, it’s large…but it means we know that it will remember to store anything you’re throwing at it.

sudo dd if=/dev/zero of=/swapfile count=37000 bs=1MiB

  1. Now let’s set up our new swapfile.

sudo chmod 600 /swapfile

Then:

sudo mkswap /swapfile

Then:

sudo swapon /swapfile

  1. Now let’s make sure the entry in fstab is correct.

sudo gedit /etc/fstab

If you’re seeing this below inside of your fstab (and you likely are):

/swapfile none swap sw 0 0

…then this file is ready to be saved. If you see no mention of /swapfile or something else referring to swap, please take a screenshot and refer it back to me for help.

Ordinarily on a default installation, it should be all set up like above already.

Now let’s get your boot up sequence ready for your new hibernation abilities.

  1. Let’s find the UUID via command using blkid. This will be the main drive, so look for the
    drive with:

blkid

My results gave me a /dev/ device and then the UUID. We want to copy that UUID as follows:

Your UUID will have different numbers and letters, so just grab what appears in the similar format as above with a copy/paste.

  1. Open a text file, paste in that UUID for later - we’re using it in a second.

  2. Still with me? Great! Now let’s get the offset number.

sudo filefrag -v /swapfile

Scroll all the way back up to the top. See the image below? See the highlight? Your number will differ, but this is the number we want. Mine was 7802880. So look for yours, same location, copy it to that open note file I had you open previously.

Let’s add these changes to your grub boot up sequence.
We’re merely going to append the new details to the existing grub entry. It will not overwrite what was done previously.
Using your touchpad/mouse, simply highlight the bolded areas and replace them with the correct information reflecting your own configuration.

sudo sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT/ s/"$/
resume=UUID=b432a6a4-6663-45e6-9b4f-93eaf69ba9a0 resume_offset=7802880"/'
/etc/default/grub

The bold areas need to be replaced with your UUID and your offset that you pasted into that text
file from earlier.

Now that you’ve updated the above command with your UUID and your offset information, paste the newly changed command into the terminal and press enter.

With that done, you can now update grub.

sudo update-grub

And now reboot!

Awesome, so now after reboot…the nuts and bolts of getting suspend-then-hibernate are all set.

Now to get this working on 11th gen with the lid close, there is a bit more work to do. We’re almost done, though! Good news is the rest of this part is easy. In a terminal again:

sudo gedit /etc/systemd/sleep.conf

Ctrl F and look for:

#HibernateDelaySec=

Make sure to remove any # in front of it so it goes from:

#HibernateDelaySec=

Into:

HibernateDelaySec=

Also this is the cool part where you decide how long you’d like to suspend for. What this means is, how long you’d like the suspended state to run until it automatically goes to hibernation.

I usually recommend 30 minutes, but some people prefer 60 minutes before it slides out of the suspended state and goes to hibernation.

HibernateDelaySec=30min

Great, we’ve made our change. Let’s save the file.

  1. Now let’s make it work with the Framework Lid close.

sudo gedit /etc/systemd/logind.conf

Ctrl F to find HandleLidSwitch=

#HandleLidSwitch=suspend

Into (removing the # again):

HandleLidSwitch=suspend-then-hibernate

And save the file. Reboot.

2 Likes

Thanks for this @Matt_Hartley. This is for an unencrypted setup, correct? You might want to note that in case anyone tries to set it up with an encrypted drive.

I use the a similar setup (suspend then hibernate), but with a twelve hour delay, so it usually won’t hit hibernate overnight. I have it set up with an encrypted drive and encrypted swap partition. My recollection is that it was an involved process, but didn’t involve anything crazy.

1 Like

Noted, and marked accordingly now.

Yeah, there are additional steps. It’ll be part of the Knowledge Base article once it’s ready.

1 Like

Continuing the original topic…

Another incident of hanging boot just occurred on a cold start.
I believe the overheating SSD / NVME drive theory which i am sure is valid, does not apply in my situation as this evidence says.

In fact i experimented more by removing optional extensions (micro sd adapter) and managed to keep a clean boot up track record for a while. So my hunch is that the USB bus is somehow interfering with the device during a non-hibernated boot.

I’ve asked for your ticket @Maciek_Kolesnik I’m out of the office tomorrow, but will be returning Thurs. I will have some steps to try then.

In the meantime, do you have your provided FW charger and are the results the same with it?

thanks. the problem happens without the charger. I typically don’t boot on the charger

i usually don’t use the loaptop on the charger. I charge it up to full then use always on the battery.

so to answer the question, i dont have F/W charger. and never tried booting on my (apple 96W) charger.