[qubes-users] suspend on Dell Latitude 3520 (i5, GeForce MX350)

Hi All,

I'm trying out Qubes OS on a new Dell Latitude 3520 laptop. It has a 4-core i5 (cpu family: 6, model: 140) and it came with pre-installed Ubuntu. Qubes installation from a USB drive went smooth using the R4.1.2 image; wifi and sound worked well out of the box. The first showstopper is a problem with suspend support.

Tried so far updating the dom0 kernel to 6.3.2 and setting "mem_sleep_default=deep" within grub.cfg, but neither helped.

The symptom is that, after closing the lid, the system seems to suspend, but it does not resume. The only way out is to hold the power button long enough so that a full reboot is made.

What might be relevant:

     [slayoo@dom0 ~]$ sudo dmesg | grep ACPI | grep supports
     [ 3.798651] ACPI: PM: (supports S0 S5)
     [slayoo@dom0 ~]$ cat /sys/power/mem_sleep
     [s2idle]
     [slayoo@dom0 ~]$ uname -a
     Linux dom0 6.3.2-1.qubes.fc32.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 12 00:18:49 CEST 2023 x86_64 x86_64 x86_64 GNU/Linux

Interestingly, after booting an Ubuntu from USB on the same machine, suspend does work, and analogous commands as above show that ACPI supports "S0 S4 S5" (S4 not featured on Qubes), while /sys/power/mem_sleep contains the same single entry.

HCL report:

     [slayoo@dom0 ~]$ qubes-hcl-report dom0
     Qubes release 4.1.2 (R4.1)

     Brand: Dell Inc.
     Model: Latitude 3520
     BIOS: 1.19.0

     Xen: 4.14.5
     Kernel: 6.3.2-1

     RAM: 32510 Mb

     CPU:
       11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
     Chipset:
       Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14] (rev 01)
     VGA:
       Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) (prog-if 00 [VGA controller])

     Net:
       Intel Corporation Wi-Fi 6 AX201 (rev 20)
       Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

     SCSI:

     HVM: Active
     I/O MMU: Active
     HAP/SLAT: Yes
     TPM: Device not found
     Remapping: yes

Any hints very welcome, thanks,
Sylwester

Do you recognize any hardware activity when trying to resume?
What about journal messages in Dom0?

Regards,
Ulrich

I'm trying out Qubes OS on a new Dell Latitude 3520 laptop. It has a

4-core i5 (cpu family: 6, model: 140) and it came with pre-installed
Ubuntu. Qubes installation from a USB drive went smooth using the R4.1.2
image; wifi and sound worked well out of the box. The first showstopper
is a problem with suspend support.

Try if a "software-suspend" via xfce button works better. That is my
personal workaround.

Do you recognize any hardware activity when trying to resume?

Pressing any keyboard key causes the keyboard backlight to turn on for a few seconds (which does not happen after pressing the power-on button).

What about journal messages in Dom0

This seems to be the relevant part of `journalctl` output:

     Jun 08 11:24:55 dom0 systemd[1]: Starting Qubes suspend hooks...
     Jun 08 11:24:57 dom0 52qubes-pause-vms[4634]: 0
     Jun 08 11:24:57 dom0 systemd[1]: Finished Qubes suspend hooks.
     Jun 08 11:24:57 dom0 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? re>
Jun 08 11:24:57 dom0 kernel: audit: type=1130 audit(1686216297.032:303): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hos>
     Jun 08 11:24:57 dom0 systemd[1]: Reached target Sleep.
     Jun 08 11:24:57 dom0 systemd[1]: Starting Suspend...
     Jun 08 11:24:57 dom0 systemd-sleep[4642]: Suspending system...
     Jun 08 11:24:57 dom0 kernel: PM: suspend entry (s2idle)
     -- Reboot --
     Jun 08 11:28:06 dom0 kernel: Linux version 6.3.2-1.qubes.fc32.x86_64 ...

BTW, reporting on Qubes GitHub issue tracker, I've been pointed to Support for the S0ix sleep state · Issue #6411 · QubesOS/qubes-issues · GitHub where a likely relevant discussion takes place.

Thanks for your reply,
Sylwester

Trying `xfce4-session-logout --suspend` or clicking xfce menu -> suspend results in exactly the same behaviour - the system instantly suspends, but no luck in waking it up.

BTW, reporting on Qubes GitHub issue tracker, I've been pointed to Support for the S0ix sleep state · Issue #6411 · QubesOS/qubes-issues · GitHub where a likely relevant discussion takes place.

Thanks for your reply,
Sylwester

Hi All,

Hi Slayoo :slight_smile:

I'm trying out Qubes OS on a new Dell Latitude 3520 laptop. It has a 4-core
i5 (cpu family: 6, model: 140) and it came with pre-installed Ubuntu. Qubes
installation from a USB drive went smooth using the R4.1.2 image; wifi and
sound worked well out of the box. The first showstopper is a problem with
suspend support.

Tried so far updating the dom0 kernel to 6.3.2 and setting
"mem_sleep_default=deep" within grub.cfg, but neither helped.

The symptom is that, after closing the lid, the system seems to suspend, but
it does not resume. The only way out is to hold the power button long enough
so that a full reboot is made.

What might be relevant:

    [slayoo@dom0 ~]$ sudo dmesg | grep ACPI | grep supports
    [ 3.798651] ACPI: PM: (supports S0 S5)
    [slayoo@dom0 ~]$ cat /sys/power/mem_sleep
    [s2idle]

That is the problem. Qubes currently doesn't support it yet, only S3 is
supported. Look if you have a BIOS option to enable S3 (sometimes called
"Linux S3" or similar). If not, I'm afraid you are out of luck, you can
see progress of s2idle support at (as you already found):

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Hi, marmarek!

Thank for following up!

I'm trying out Qubes OS on a new Dell Latitude 3520 laptop. It has a 4-core
i5 (cpu family: 6, model: 140) and it came with pre-installed Ubuntu. Qubes
installation from a USB drive went smooth using the R4.1.2 image; wifi and
sound worked well out of the box. The first showstopper is a problem with
suspend support.

Tried so far updating the dom0 kernel to 6.3.2 and setting
"mem_sleep_default=deep" within grub.cfg, but neither helped.

The symptom is that, after closing the lid, the system seems to suspend, but
it does not resume. The only way out is to hold the power button long enough
so that a full reboot is made.

What might be relevant:

     [slayoo@dom0 ~]$ sudo dmesg | grep ACPI | grep supports
     [ 3.798651] ACPI: PM: (supports S0 S5)
     [slayoo@dom0 ~]$ cat /sys/power/mem_sleep
     [s2idle]

That is the problem. Qubes currently doesn't support it yet, only S3 is
supported. Look if you have a BIOS option to enable S3 (sometimes called
"Linux S3" or similar). If not, I'm afraid you are out of luck, you can
see progress of s2idle support at (as you already found):
Support for the S0ix sleep state · Issue #6411 · QubesOS/qubes-issues · GitHub

In BIOS, I did find a seemingly relevant "Block Sleep" option. It was set to ON by default. The description reads: "This option lets you to block entering Sleep (S3) mode in the operating system". Changing it to OFF has not changed anything, though. This seems consistent with users' reports at https://www.dell.com/community/Linux-General/Dell-Latitude-5420-5520-S3-Suspend-deep-sleep-not-working-on/td-p/7981601

I have then tried to workaround it by modifying the DSDT table as suggested here: Fix suspend issues on Dell 7405 2-in-1 - DEV Community, but after decompiling the original table with the `iasl` tool, there seem to be no code relevant to S3 present in the .dsl file.

As a next step, I've updated BIOS (from v1.19.0 to 1.29.0 released by Dell this month). There seem to be no new relevant options in BIOS, and waking up from suspended state still does not work (checked again with "Block Sleep" OFF).

I'll be watching developments at the #6411 issue, then.
As of now, that's a genuine showstopper :frowning:

Thanks!
Sylwester