1 Rookie
•
9 Posts
1
62542
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
bmd0
10 Posts
0
March 22nd, 2021 22:00
Interesting - I guess you're right in that a process is keeping the OS awake (or waking it up) because it isn't forced into deep sleep.
If I run into that then I will look into setting up hibernation as it will eliminate the problem. Depending on the distro you are on, it should be fairly easy for you to setup, if it isn't already?
bmd0
10 Posts
0
March 22nd, 2021 22:00
If s3 sleep isn't available in the firmware then adding that kernel option does nothing
In the case of the 9310, if you check /sys/power/mem_sleep you will only see s2idle, whereas on the 9300 and most other laptops, you will see s2idle as well as deep. By adding the kernel option, you are changing the default option which the kernel uses (indicated by the [ ] around the option. If you run the below, you should see both options with deep being the default.
blob007
1 Rookie
1 Rookie
•
81 Posts
0
March 23rd, 2021 07:00
That's right. Is that the case for all 9310 and recent kernels? If yes, thread closed: bummer
bmd0
10 Posts
0
March 23rd, 2021 23:00
I'm not sure it is kernel related, my understanding is Dell have removed s3 from the firmware itself.
This seems to stem from Microsoft pushing for S0 "modern standby" which enables the background refresh etc. while the system is in standby so that you get super quick wake from sleep and a mobile like experience from your laptop. Maybe linked to the "evo" certification also, which is the same type of thing.
blob007
1 Rookie
1 Rookie
•
81 Posts
0
March 24th, 2021 08:00
My understanding is that it should be supported both by the firmware and the kernel (being able to communicate with the particular firmware/hardware). So if Dell decided to purge s3 sleep altogether on the firmware level, it's indeed a sad finale. I guess in another ten or so years all laptops will slowly turn into the likes of chromebooks/ipads anyways, we just have to accept the inevitable
blob007
1 Rookie
1 Rookie
•
81 Posts
0
March 24th, 2021 09:00
By the way, talking about kernels and firmware: this discussion stimulated me to enable mem_sleep_default=deep again (when I tried it a few months ago, it somehow messed up poweroff, so I did not use it in the end) Now, a few firmware and kernel versions later, it seems like everything works as intended. This makes me happy! (mine is 9300 laptop, however, not 9310)
I am interested though: for those who don't see the "deep" option in /sys/power/mem_sleep -- are you using a generic kernel (which version), or Dell's kernel? (If such thing exists.)
rjl-csun
24 Posts
0
March 24th, 2021 14:00
I'm using the "certified" Ubuntu that Dell shipped with my 9310.
blob007
1 Rookie
1 Rookie
•
81 Posts
0
March 24th, 2021 21:00
I see, out of curiosity: what does
$uname -rs
produce?
Noots1
3 Posts
0
March 25th, 2021 03:00
In my case I'm getting
rjl-csun
24 Posts
0
March 25th, 2021 07:00
This is mine:
$ uname -rs
Linux 5.6.0-1050-oem
What are you looking for?
blob007
1 Rookie
1 Rookie
•
81 Posts
0
March 25th, 2021 08:00
Yeah... So you have Dell's custom kernel and deep sleep support might have been simply compiled out of it for all we know. (It might also have been disabled entirely on the firmware level, as @bmd0 suggested).
You can try using a different kernel to check if it would help, but to tell the truth, even on a year old 9300 that I have (with generic gorilla 5.8.0-48 kernel) deep sleep is still buggy: I posted just shortly ago that it seemed to start working properly after recent firmware updates, but after additional testing, I discovered that it's not so and after a cycle, the laptop fails to power off properly. So I still disabled it after all... (Maybe I should try the more recent kernel versions, but I don't have enough motivation to experiment with all that right now.)
bmd0
10 Posts
0
March 25th, 2021 09:00
@blob007 it's not a kernel thing, unfortunately.
I have tested Fedora 33 on 5.8 and 5.10/11/12 (I forget which now, sorry) and arch on 5.11 & 12. All stock kernels and its still not available.
blob007
1 Rookie
1 Rookie
•
81 Posts
1
March 25th, 2021 11:00
Then I guess there's not much to do except hope that Dell will at some point release firmware which allows user to initiate deep sleep. I am sure they have an entire team working on that!
davidzuluaga5
1 Message
0
May 6th, 2021 20:00
I experience the same in a dell "certified" laptop with ubuntu oem version. I actually bought it because it would have deep integration with the hardware so I don't have to worry for exacly this kind of very annoying issue. I have to completely turn off my laptop if I have to move around, otherwise it will burn inside my bag.
As the option for "deep" sleep is not in my system either, so there is no other option than to wait?
bmd0
10 Posts
0
May 7th, 2021 02:00
That is pretty much your only option, if Dell ever introduce it at all...
I have the 9310 and S2 sleep isn't causing me any problems. I don't have excessive battery drain when sleeping, so I wouldn't worry too much.