You are not logged in.

#1 2020-06-06 18:25:38

Luis-L
Member
Registered: 2020-06-06
Posts: 4

HP Envy x360 no S states available

Hello Guys,

EDIT: I got Hibernate to work using Kernel 5.7 but Suspend is still not working.

I got my HP Envy x360 (ds-0155ng) a few days ago andinstalled Arch on it. However I noticed that I cant use the suspend or hibernate option in kde plasma. I looked a little bit online but cant find a solution to my problem.
It seems like any other state than S0 is not supported:

dmesg | grep -i acpi | grep supports
[    0.694281] ACPI: (supports S0)
[    0.713391] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3

Seems like a lot of S states are missing:

➜  ~ cat /sys/power/state
freeze mem disk
➜  ~ cat /sys/power/mem_sleep
[s2idle]
➜  ~ 

I found this solution but its for an intel cpu and not for an AMD cpu

Does anyody know a solution to this?
My laptop has an AMD Ryzen 5 3500U
Any help is apprechiated
Thank you all in advance

Last edited by Luis-L (2020-06-09 05:12:41)

Offline

#2 2020-07-03 19:20:13

csab3266
Member
Registered: 2020-07-03
Posts: 4

Re: HP Envy x360 no S states available

Nearly the same for me. Using a HP Envy x360 (13-ay0278ng) with a Ryzen 4700U. No suspend.

dmesg | grep -i acpi | grep supports
[    0.355449] ACPI: (supports S0 S4 S5)
[    0.361710] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]

and

cat /sys/power/state
freeze mem disk

cat /sys/power/mem_sleep
[s2idle]

Seems like some acpi DSDT tables are missing?

Offline

#3 2020-07-06 14:59:50

Luis-L
Member
Registered: 2020-06-06
Posts: 4

Re: HP Envy x360 no S states available

The worst part about this is, that HP doesnt seem to care about this issue. I contacted HP about this issue and their support just said something like contact our "Smart" Friends about this issue (Their smart friends cost money, I am not paying for this). I tried some things that are on the Wiki about DSDT but nothing works. I dont think I am buying an HP again. I had more or less the same issue on a ThinkPad and it was fixed by a BIOS update, this is how it should be... HP also doesnt seem to care to keep their website updated. I bought this laptop a few months ago and it came with BIOS/UEFI version F.19. The "newest" version on HPs website is F.18, I am really disappointed in HP

Offline

#4 2020-07-24 23:12:33

jman6495
Member
Registered: 2011-06-10
Posts: 7

Re: HP Envy x360 no S states available

Sorry for the short bump. I was able to solve this by decompiling, editing and recompiling part of the ACPI tables

run

acpidump -o tables

to create a file with the currently running tables

acpixtract -a tables

to extract the individual tables (we only care about the FACP table)

iasl -d facp.dat

to disassemble the FACP table
edit facp.dsl with your prefered text editor.
set the "Oem Revision" field at the top to a larger number
set the "Hardware Reduced (V5)" field to 0

iasl -sa facp.dsl

to assemble your modified table
Make the following folder structure: payload/kernel/firmware/acpi/
IN the acpi folder add your compiled facp.aml
In the payload folder, run: 

find kernel | cpio -H newc --create > acpi_override.cpio.img

Move the resulting acpi_override.cpio.img to your /boot folder, then update grub so your initrd line looks something like this:
initrd /boot/amd-ucode.img /boot/initramfs-linux.img /boot/acpi_override.cpio.img

Also change your Grub CMDLINE to force deep sleep as default for good measure:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

Hopefully you should then see deep sleep when you run cat /sys/power/mem_sleep.

Offline

#5 2020-07-25 08:01:48

Luis-L
Member
Registered: 2020-06-06
Posts: 4

Re: HP Envy x360 no S states available

Thanks for your reply @jman6495
It sadly doesnt seem to work for me. I did everything as you said but I still cant use suspend or see any other S states. I use systemd-boot instead of grub, here is my config:

title    Arch Linux
linux    /vmlinuz-linux
initrd   /initramfs-linux.img /amd-ucode.img /acpi_override.cpio.img
options  root=UUID=0326b687-33ab-4385-8f0d-6aaf23c79e2d rw mem_sleep_default=deep

Do you see any mistakes there?

Offline

#6 2020-07-25 09:39:06

jman6495
Member
Registered: 2011-06-10
Posts: 7

Re: HP Envy x360 no S states available

Odd... could you send me the dump of your ACPI tables in full, I'll take a look smile

Offline

#7 2020-08-01 13:27:00

johnjohnlys
Member
From: Taiwan
Registered: 2020-04-28
Posts: 9

Re: HP Envy x360 no S states available

Conclusively, I would say that it is not possible solve this problem.

Microsoft introduces the modern standby, which is called s2idle (suspend to idle) under Linux. Their goal is to totally replace S3 (suspend) with by S0ix (modern standby/s2idle). It seems that M$ is forcing more and more OEM to adopt S0ix, and M$ and OEM are preventing you from using S3 suspend in 2020. Therefore, I guess that while it is possible to echo "mem" > /sys/something/something to enter S3 under Linux, it would be a untested configuration by OEMs.

https://www.dell.com/community/Inspiron … -p/7650768

Sadly, modern standby sucks since the power consumption on most machines are the same as merely turning off the monitor, even on Surface. What's worse, someone can only cold reboot their laptops after suspend.

https://www.thomasmaurer.ch/2018/07/tro … n-standby/

Google s0ix power drain or modern standby power drain, and you can find a lot of people has the same problem (under Windows) after 2019.

Offline

#8 2020-08-04 19:15:17

csab3266
Member
Registered: 2020-07-03
Posts: 4

Re: HP Envy x360 no S states available

jman6495 wrote:

set the "Hardware Reduced (V5)" field to 0

"Hardware Reduced (V5)" is 0 after decompiling the acpi tables.

Any suggestion?

Offline

#9 2020-08-05 16:04:32

rhymen
Member
Registered: 2020-08-04
Posts: 5

Re: HP Envy x360 no S states available

Hey guys,

I do have the same laptop and dmesg does give me the same output. I'm a little confused tho, as hibernate and suspend worked out of the box on Ubuntu. Why is it on the manufacturer to solve the problem if it works with ubuntu and windows?
Hibernation works fine for me on Arch as well. Suspend (and closing the lid which is the same?) seem to freeze on resume. First time installing Arch and working with Linux in-depth btw. so sorry if it's a stupid question.

Any Idea on how to debug the crash that occurs when I close the lid? The screen gets distorted and after a couple of seconds I can see my desktop but it's frozen. I already tried the ACPI table part but it didn't seem to help me here.

Offline

#10 2020-08-05 21:15:30

csab3266
Member
Registered: 2020-07-03
Posts: 4

Re: HP Envy x360 no S states available

rhymen wrote:

Hey guys,

I do have the same laptop and dmesg does give me the same output. I'm a little confused tho, as hibernate and suspend worked out of the box on Ubuntu. Why is it on the manufacturer to solve the problem if it works with ubuntu and windows?
Hibernation works fine for me on Arch as well. Suspend (and closing the lid which is the same?) seem to freeze on resume. First time installing Arch and working with Linux in-depth btw. so sorry if it's a stupid question.

Any Idea on how to debug the crash that occurs when I close the lid? The screen gets distorted and after a couple of seconds I can see my desktop but it's frozen. I already tried the ACPI table part but it didn't seem to help me here.

See the posting from johnjohnlys. The laptop does suspend to s2idle, but that is not much more than turning the screen black. But the laptop does not go to "deep" suspend state.
Try

 cat /sys/power/mem_sleep 

Do you get [s2idle][deep] or just [s2idle]?

Offline

#11 2020-08-07 15:39:44

johnjohnlys
Member
From: Taiwan
Registered: 2020-04-28
Posts: 9

Re: HP Envy x360 no S states available

I find a useful post on Reddit, and now S3 is back on my Swift 3 (4700U). Now I am testing whether this solution works. (I was bothered by this bug randomly.)

Last edited by johnjohnlys (2020-08-07 15:41:00)

Offline

#12 2020-08-07 16:15:23

rhymen
Member
Registered: 2020-08-04
Posts: 5

Re: HP Envy x360 no S states available

csab3266 wrote:

Try

 cat /sys/power/mem_sleep 

Do you get [s2idle][deep] or just [s2idle]?

I get

[s2idle]

as well. But now I at least understand the problem a little bit better. Thank you!

For now I set closing the lid to hibernate the laptop instead of supending. This avoids the frozen screens I get from suspending at least. Guess I'm gonna try the reddit link from @johnjohnlys next, but this has to wait until after the weekend.

Offline

#13 2020-08-12 02:19:20

sovanyio
Member
Registered: 2017-05-08
Posts: 3

Re: HP Envy x360 no S states available

rhymen wrote:

I'm a little confused tho, as hibernate and suspend worked out of the box on Ubuntu. Why is it on the manufacturer to solve the problem if it works with ubuntu and windows?

What version of ubuntu is suspend working for you under? Perhaps they are achieving s0ix states somehow?

Edit: booted default (unity?) 20.04.1 and saw mixed behavior on a single test. Unscientifically, I saw the same/similar amdgpu crash that I am seeing on arch, but the journal did show a timestamp gap between enter sleep and exit sleep. The screen stayed on, at a blank tty, and otherwise appeared on.

Otherwise, arch is at least turning the screen off (on mainline kernel) and appearing to be off, but sometimes failing to resume seemingly due to amdgpu crash, or otherwise immediately waking per the journal timestamps.

Last edited by sovanyio (2020-08-12 02:55:25)

Offline

#14 2020-08-12 21:05:19

rhymen
Member
Registered: 2020-08-04
Posts: 5

Re: HP Envy x360 no S states available

sovanyio wrote:

What version of ubuntu is suspend working for you under? Perhaps they are achieving s0ix states somehow?

I did test it with 20.04 but I'm now not sure that suspend did indeed work. Closing the lid worked like 80% of the time so I just assumed that the laptop was suspending successfully.

Offline

#15 2020-08-13 05:07:54

johnjohnlys
Member
From: Taiwan
Registered: 2020-04-28
Posts: 9

Re: HP Envy x360 no S states available

rhymen wrote:
sovanyio wrote:

What version of ubuntu is suspend working for you under? Perhaps they are achieving s0ix states somehow?

I did test it with 20.04 but I'm now not sure that suspend did indeed work. Closing the lid worked like 80% of the time so I just assumed that the laptop was suspending successfully.

I saw the same amdgpu bug until 5.7.8, and suspend (deep sleep) only works at a 20% chance.  Now I am on 5.7.11, and with the ACPI fix I posted above, suspend works 20 times without failure.

I haven't tested whether the kernel update or the ACPI revolves the problem, so I would suggest fix the APCI if possible.

Offline

#16 2020-08-13 08:39:01

csab3266
Member
Registered: 2020-07-03
Posts: 4

Re: HP Envy x360 no S states available

johnjohnlys wrote:

I saw the same amdgpu bug until 5.7.8, and suspend (deep sleep) only works at a 20% chance.  Now I am on 5.7.11, and with the ACPI fix I posted above, suspend works 20 times without failure.

I haven't tested whether the kernel update or the ACPI revolves the problem, so I would suggest fix the APCI if possible.

We have two different problems here which get mixed in the thread:

Problem one: no S state (no S3 deep)
Problem two: Notebook doesn't weak up from (s2idle) suspend (screen stays black)

Problem one:
Tried to adapt the ACPI fix above for my HP envy x360 13. Still no S3 deep.

Any suggestions?

Offline

#17 2020-08-14 12:14:15

sovanyio
Member
Registered: 2017-05-08
Posts: 3

Re: HP Envy x360 no S states available

csab3266 wrote:
johnjohnlys wrote:

I saw the same amdgpu bug until 5.7.8, and suspend (deep sleep) only works at a 20% chance.  Now I am on 5.7.11, and with the ACPI fix I posted above, suspend works 20 times without failure.

I haven't tested whether the kernel update or the ACPI revolves the problem, so I would suggest fix the APCI if possible.

We have two different problems here which get mixed in the thread:

Problem one: no S state (no S3 deep)
Problem two: Notebook doesn't weak up from (s2idle) suspend (screen stays black)

Problem one:
Tried to adapt the ACPI fix above for my HP envy x360 13. Still no S3 deep.

Any suggestions?

I was able to hack the S3 support back via the dsdt mods, but something else appears to be missing. I'm wondering if HP failed to add support for wakeup from S3. I intended to test WOL to see if that would rouse it out of S3, but it has been low on my priority list.

Based on the journal, the system does appear to enter S3, maybe someone who knows dsdt well could hack in wake? /shrug

Edit: WOL did not work to rouse from S3

Last edited by sovanyio (2020-08-17 12:34:05)

Offline

Board footer

Powered by FluxBB