Start a Conversation

Solved!

Go to Solution

60776

November 10th, 2020 02:00

XPS 13 9310, Ubuntu, deep sleep missing

My computer drains a lot of battery when in sleep mode.

I've tried following the steps outlined in this bug report, tried the diagnosis layed out in this question and disabled the "sign of life" options in the BIOS as described here.

I confirmed my system sleeps in the `s2idle` state. Which I suspect is the problem.

$ sudo journalctl | grep "PM: suspend" | tail -2
May 13 18:41:00 mex kernel: PM: suspend entry (s2idle)
May 13 20:52:36 mex kernel: PM: suspend exit

However I have 2 issues when trying to follow the above guides: Firstly my `/sys/power/mem_sleep` file does not contain a `deep` option:

sudo cat /sys/power/mem_sleep
[s2idle]

And secondly I can't seem to edit the file to add a `deep` option:

$ echo deep | sudo tee /sys/power/mem_sleep
deep
tee: /sys/power/mem_sleep: Invalid argument
$ sudo sh -c 'echo deep > /sys/power/mem_sleep'
sh: 1: echo: echo: I/O error

Not being able to close the lid and have the laptop suspend is very annoying. Any help on this would be greatly appreciated.

OS: Ubuntu 20.04, 5.8.0-26-generic / Hardware: Dell XPS 13 9310

24 Posts

November 18th, 2020 07:00

Your last two questions are good ones, @shiftux, which I have no answer for yet. I thought I'd try Dell Tech Support and got this very disturbing answer:

"Now, according with the kind of linux we are not supported Linux at all, because Linux has a such of variants of operation system, so our recommendation for you in the future it is contact Linux support."

Considering they sold be this machine with Ubuntu installed and advertised as "Ubuntu Certified" to say it's not supported at all is unbelievable.

1 Message

November 21st, 2020 02:00

FYI the "Block Sleep" option that mentions S3 and defaults to off (so not disabled) is also present in the default BIOS (v1.0.1). 

I have also requested a statement from Dell support. 

24 Posts

November 24th, 2020 08:00

I followed up on my request last week and got a quick but extremely disappointing reply. This is what he said:

"Well, basically we provide a less support to when customer request system with ubuntu, we more provide services to our hardware (laptop,PC, Server) than the same operation system on this case, now one of the option that we can offer you is reinstall the Linux operation system again to see if that can solved the issue."

Sigh....

December 1st, 2020 09:00

Not a solution but a workaround:
It seems that if I click in the upper right corner and click 'suspend' instead of just closing the laptop there is no battery drain, at least from what I experienced over the last few days. After a day of inactivity I only lose 5~6%, which seems normal to me.

To make that even easier, you can add a keyboard shortcut to suspend the system. In Settings > Keyboard Shortcuts click the '+' button in the bottom. Give it a name and a shortcut and use command: 'systemctl suspend'.

3 Posts

December 5th, 2020 10:00

I have the same issue (9310, Ubuntu 20.10), if I close the lid the laptop does not even go to real sleep (I can still hear a fan!), if I manually click suspend battery drains completely in a few hours.

Not so great for a portable computer. I am wondering if the issue is the same with the version they ship with Ubuntu.

3 Posts

January 1st, 2021 14:00

Hello, if you find any solution i'm also interested I have a xps 13 9310 with ubuntu 20.10 installed and I have the exact same battery drain issue on suspend issue.

1 Message

January 22nd, 2021 11:00

I also have this problem and searching the internet, it appears there is no good solution and Dell is not going to be of any help, so we are on our own

2 Posts

January 30th, 2021 09:00

Hello guys,

after some trials & errors I managed to get the suspend on disk (deep sleep) working on the 9310.

I'm on standard Ubuntu 20.04 (not the dell oem image) with disk encryption (except /boot) . Here are the steps I followed :

1) Partitioning & post-install config (swap must be >= ram size, in my case I use 22GB for 16GB of ram, also does not work with secure boot, disable it in the UEFI and in ubuntu install)

https://wardtalks.com/posts/setting_up_custom_encryption_in_ubuntu_20.04

2) more post-install config "the fix" :

https://gist.github.com/tjvr/f82004565139a5b13031af1ce5a50a02

3) Finally reboot after install and make sure to choose an eom kernel in grub

4) install the hibernate package & run sudo systemctl hibernate

ps: if you have trouble on startup with "vgubuntu" not found have a look there :

https://unix.stackexchange.com/questions/107810/why-my-encrypted-lvm-volume-luks-device-wont-mount-at-boot-time

2 Posts

January 30th, 2021 09:00

can't edit again so posting a new comment :

it might be a good idea to select 'oem' in grub when booting the live usb, as deep sleep only works with oem kernel AFAIK

otherwiser grub-customizer might  help you

1 Message

March 18th, 2021 17:00

berthou, isn't the consensus that deep sleep is not possible at firmware level? That means kernel shouldn't matter. It shouldn't work on Windows either.

10 Posts

March 18th, 2021 20:00

This sounds like hibernation and not s3 deep sleep?

If you run the following do you see just s2idle or deep as well?

 

 $ cat /sys/power/mem_sleep 
 s2idle [deep]

 

3 Posts

March 21st, 2021 16:00

Here is what I get

 $ cat /sys/power/mem_sleep 
 [s2idle]

 

10 Posts

March 21st, 2021 22:00

I thought so, suspend is not using s3 deep sleep. But you instead have setup hibernate, which is a perfectly viable alternative Suspend was typically used due to the faster startup times on old hardware compared with hibernate, but with the instant wake and fast boot times that these and other modern laptops provide, there is probably minimal difference between suspend and hibernate.

I am actually in the same situation, I went for the 9310 despite this and I do not have s3 sleep. I didn't bother with enabling hibernation or anything and just use the s2 sleep, but I do not find it as inefficient as I expected. I loose ~1-2% during 12 hours of sleep overnight and that is acceptable for me.

24 Posts

March 22nd, 2021 08:00

bmd0, the behavior I experience is usually the same as you describe. But about 20% of the time, instead of losing a couple of percent over half a day or more the battery will be completely drained. It's very frustrating. I've tried a couple of experiments to see if it might be related to programs running at the time I close the lid, but so far it appears to be purely random.

1 Rookie

 • 

81 Posts

March 22nd, 2021 21:00

Have you tried adding mem_sleep_default=deep to kernel start up options? It kind of works on my laptop (it's 9300 however) in the sense that it enables proper s3 sleep (with about 50% slower battery drain) but in the process somehow disables power-off, i.e., if I use this kernel option, the laptop restarts instead of powering off when told to...

No Events found!

Top