Welcome to our peer-to-peer forums, where owners help owners. Need help now? Visit eSupport here.

English Community

Linux Operating SystemsOther Linux Discussions
All Forum Topics
Options

4 Posts

07-22-2021

France

3 Signins

25 Page Views

  • Posts: 4
  • Registered: ‎07-22-2021
  • Location: France
  • Views: 25
  • Message 1 of 9

ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-07-22, 14:08 PM

 Hi,

 

I have a X1 carbon gen 5 and a brand fresh & new carbon X1 gen 9 and I am very sad with the power consumption in sleep mode of the Carbon X1 gen 9.

 

It seems this problem is related to the new "Si03" sleep mode introduced in carbon X1 gen 6 and newer models; the workaround seems to configure the "Linux S3 mode" from the BIOS setup. As you probably know, this mode is not quite usable as the touchpad gets mad when getting out of sleep mode until a reboot is done.

 

I found some workarounds involving manually patching the ACPI SDST tables to get back the S3 state, but to be honest... I would prefer avoiding that. I have seen a Bios update in version 1.42 is out too, but not sure to attempt it until I am sure it works fine and fixes my problem.

 

Does someone has any insights on when the touchpad will be working in "linux mode S3" so that I can use this laptop normally ? Or maybe when the Lenovo team will support the new Si03 sleep state  ?

 

Thanks for any hints on having low power working on this laptop !

 

My bios version : 1.39

Linux kernel: 5.13

Distro : Ubuntu 21.10/daily (for WWAN foxconn support)

 

 

Reply
Options

407 Posts

03-06-2021

Germany

227 Signins

2420 Page Views

  • Posts: 407
  • Registered: ‎03-06-2021
  • Location: Germany
  • Views: 2420
  • Message 2 of 9

ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-07-22, 18:23 PM
I have no idea how the BIOS of those machines looks like but usually Si03(S0ix) is configured for Windoze10, and Linux has S3. Lenovo has nothing to do with S0ix support other than implementing it correctly in their firmware, Intel is responsible to make that mode work in Linux. From your post, I have no idea what problem your touchpad may have. Can you explain ( or point to some bug report, post logs etc ?)? Best Regards, Gabriel
Reply
Options

778 Posts

07-22-2019

Canada

505 Signins

6016 Page Views

  • Posts: 778
  • Registered: ‎07-22-2019
  • Location: Canada
  • Views: 6016
  • Message 3 of 9

Re:ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-07-22, 20:05 PM

On the Tigerlake based platforms (which includes the X1C9) modern standby/S0ix is the supported sleep mode and is the one that should be used.

The BIOS team enabled S3 (it's in the BIOS under Sleep State) as some Linux customers were asking for it - but there are issues with it (mainly the touchpad that the driver team are looking at). We tested and certified S0ix. 

 

Can you share details on your sleep power usage issues? I've seen some reports of not getting optimal power performance issues on the X1C9 (and these are being addressed) but nothing on sleep problems

 

Thanks

Mark

Reply
Options

4 Posts

07-22-2021

France

3 Signins

25 Page Views

  • Posts: 4
  • Registered: ‎07-22-2021
  • Location: France
  • Views: 25
  • Message 4 of 9

Re:ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-07-22, 20:37 PM

Hi Mark, osnix,

 

Thank you for your replies.

 

My problem is quite simple: I compare the battery drain of both my laptops (X1C5 and X1C9) with similar kernel (linux 5.11/ubuntu 21.04 for X1C5, linux 5.13/ubuntu 21.10/daily for X1C9) and, if starting at 100%, 3 hours after, my observation is that X1C5 is at 92% and X1C9 at 80% (figures are not this, but the idea is here).

 

A common use case of mine is when I am in holidays for, usually, 1 week : I keep the laptop in sleep mode. With the X1C5, I had the habit to recover the laptop, almost drained, with 15% battery after a week in sleep mode. With the X1C9, it is completely drained after 2 or 3 days, not more. That is the basis of my "observation: there's a problem".

 

I used powertop to chase 'over consuming' apps (such as the awful Teams, or some firefox/chrome pages), but in the end I did not fix my power usage problems. This pushed me to the conclusion that the missing "S3 state" is probably responsible of this battery drain.

 

I can recheck all this and do a clean comparison of both laptops (starting with no applications, powertop --auto-tune, battery at 100%, and wait for several hours and compare). I am quite sure it's not only an impression, that's why I wanted to share this.

 

Mark, what you say, If i understand correctly, is that 1) the S3 "legacy" mode works, except for the touchpad  and Lenovo is aware of the problem : I just need to wait for a driver/firware update; and 2) there are other power problems.

I am only concerned with the problem 1) which is having a working S3 mode, compatible with Linux, that allows the touchpad to work after wake up.

The power problems you mentioned in 2), such as cpu speed throttling probably, do not affect me. I do not expect the I7-11165G7 to be a monster :)

 

I am not sure how the modern standby/SOix mode are supposed to  work under Linux, but I assume it's another story, related to the linux kernel and not Lenovo.

 

Reply
Options

407 Posts

03-06-2021

Germany

227 Signins

2420 Page Views

  • Posts: 407
  • Registered: ‎03-06-2021
  • Location: Germany
  • Views: 2420
  • Message 5 of 9

Re:ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-07-22, 20:54 PM

@ Brian42424 wrote:

Hi Mark, osnix,

 

Thank you for your replies.

 

My problem is quite simple: I compare the battery drain of both my laptops (X1C5 and X1C9) with similar kernel (linux 5.11/ubuntu 21.04 for X1C5, linux 5.13/ubuntu 21.10/daily for X1C9) and, if starting at 100%, 3 hours after, my observation is that X1C5 is at 92% and X1C9 at 80% (figures are not this, but the idea is here).

 

A common use case of mine is when I am in holidays for, usually, 1 week : I keep the laptop in sleep mode. With the X1C5, I had the habit to recover the laptop, almost drained, with 15% battery after a week in sleep mode. With the X1C9, it is completely drained after 2 or 3 days, not more. That is the basis of my "observation: there's a problem".

 

I used powertop to chase 'over consuming' apps (such as the awful Teams, or some firefox/chrome pages), but in the end I did not fix my power usage problems. This pushed me to the conclusion that the missing "S3 state" is probably responsible of this battery drain.

 

I can recheck all this and do a clean comparison of both laptops (starting with no applications, powertop --auto-tune, battery at 100%, and wait for several hours and compare). I am quite sure it's not only an impression, that's why I wanted to share this.

 

Mark, what you say, If i understand correctly, is that 1) the S3 "legacy" mode works, except for the touchpad  and Lenovo is aware of the problem : I just need to wait for a driver/firware update; and 2) there are other power problems.

I am only concerned with the problem 1) which is having a working S3 mode, compatible with Linux, that allows the touchpad to work after wake up.

The power problems you mentioned in 2), such as cpu speed throttling probably, do not affect me. I do not expect the I7-11165G7 to be a monster :)

 

I am not sure how the modern standby/SOix mode are supposed to  work under Linux, but I assume it's another story, related to the linux kernel and not Lenovo.

 

 

Well since Mark & the firmware team seems to be aware, I'm probably not much of a help :)

 

On my very old ACER, which had a somewhat broken touchpad in general in Linux, I used a script to disable the touchpad,

before suspending and re-enable after, not sure if something like this can work for you until Lenovo fixes the problem.

 

However, welcome to Lenovo's battery drain problems party ;)

I thought this was limited to AMD machines but it looks like this is not the case :)

Reply
Options

778 Posts

07-22-2019

Canada

505 Signins

6016 Page Views

  • Posts: 778
  • Registered: ‎07-22-2019
  • Location: Canada
  • Views: 6016
  • Message 6 of 9

Re:ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-07-23, 13:29 PM

I haven't used my X1C9 in a while, checking the logs it was last used on the 16th, and my battery wasn't drained - unfortunately I didn't record the value it was at which was dumb. I'm going to charge it up and leave it over the weekend to check, but I'm definitely not seeing the 20% over 3 hours (or anything close to that) - there is something funky going on with your system.

 

FWIW I'm running Debian sid at the moment on that with BIOS at 1.40 and EC at 1.25

 

Can you provide the kernel logs over a suspend/resume cycle?

I see you've got the WWAN enabled - I wondered if that's the source of the power drain? Is it possible to run some tests with the WWAN removed or disabled? I don't have it to be able to test with myself yet unfortunately.

Out of curiousity - how well is the 5G working? I do want to flag that it's not been officially released as it's still under internal test and certification but I'd love to know what the experience with it is for you - especially reliability and performance.

 

Thanks

Mark

Reply
Options

4 Posts

07-22-2021

France

3 Signins

25 Page Views

  • Posts: 4
  • Registered: ‎07-22-2021
  • Location: France
  • Views: 25
  • Message 7 of 9

Re:ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-07-24, 14:41 PM

Hi Mark,

 

I am doing some experiments in order to sort all this, and I am not able to reproduce the big battery drain I observed in my current usage context. I will follow up next week on that, even if my experiments are not conclusive.

 

Regarding the new foxconn 5G modem, I'll follow up with my feedback on this thread : https://forums.lenovo.com/t5/Other-Linux-Discussions/Finally-X55-5G-modem-works-under-linux/m-p/5082236

 

Kind regards,

Reply
Options

1 Posts

09-14-2021

Netherlands

5 Signins

10 Page Views

  • Posts: 1
  • Registered: ‎09-14-2021
  • Location: Netherlands
  • Views: 10
  • Message 8 of 9

Re:ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-10-10, 16:35 PM

@ MarkRHPearson wrote:

On the Tigerlake based platforms (which includes the X1C9) modern standby/S0ix is the supported sleep mode and is the one that should be used.

The BIOS team enabled S3 (it's in the BIOS under Sleep State) as some Linux customers were asking for it - but there are issues with it (mainly the touchpad that the driver team are looking at). We tested and certified S0ix. 

 

In case it helps:  The touchpad issue is a problem with the configuration of the GPIO pin that is used to route interrupts from the touchpad to the CPU. This pin is configured by the BIOS to reset its configuration when entering S3. When the machine wakes up the BIOS doesn't restore the proper pin configuration. The result is a continuous stream of interrupts that keeps the CPU spinning and interferes with the processing of touchpad events.

 

I added a workaround in the OpenBSD GPIO driver for this and now my X1C9 suspends and resumes fine using S3.

 

https://github.com/openbsd/src/commit/38c04c885403a48f0fc1295fed7761967f52d4d2

 

While Linux could add a similar workaround, I think this should be fixed in the BIOS by restoring the proper pin configuration before handing control over to the OS when coming out of S3 suspend.

 

Cheers,

Mark

Reply
Options

778 Posts

07-22-2019

Canada

505 Signins

6016 Page Views

  • Posts: 778
  • Registered: ‎07-22-2019
  • Location: Canada
  • Views: 6016
  • Message 9 of 9

Re:ACPI S3 support in Linux for X1 carbon gen 9 (X1C9) ?

2021-10-12, 18:07 PM

Thanks @kettenis - that's very cool.

 

I've forwarded on to the team, hopefully we can get a proper FW fix delivered

 

Mark

Reply
Forum Home

Community Guidelines

Please review our Guidelines before posting.

Learn More

Check out current deals!

Go Shop
X

Save

X

Delete

X

No, I don’t want to share ideas Yes, I agree to these terms

Most Liked Authors

(Last 7 days)

View All