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

389 Posts

03-06-2021

Germany

219 Signins

2345 Page Views

  • Posts: 389
  • Registered: ‎03-06-2021
  • Location: Germany
  • Views: 2345
  • Message 631 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-20, 21:39 PM

@ linuxmad wrote:

you can check your current config if needed, on my system it's on the path:

 

/proc/config.gz

 

On Pop_os I cannot find config.gz under /proc

It is under /boot

and the config for 5.14.0-051400rc2-generic has the following options configured this way:

CONFIG_AMD_PMC=m

CONFIG_I2C_HID_ACPI=m

CONFIG_HSA_AMD=y
CONFIG_HSA_AMD_SVM=y

(see full rc2 config attached)

 

So... not sure where this puts us concerning that some of these configs have different values from patches made by @osnix 

??

 

That isn't going to work.

You need the PMC set to yes, and all HSA disabled.

 

I didn't do the math on your numbers but that seems to be 9h so something around 1.1W/h, which matches what I saw with those options set, more or less.

 

Reply
Options

61 Posts

12-04-2020

Portugal

64 Signins

360 Page Views

  • Posts: 61
  • Registered: ‎12-04-2020
  • Location: Portugal
  • Views: 360
  • Message 632 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-20, 21:47 PM

That isn't going to work.

You need the PMC set to yes, and all HSA disabled.

So my option is to compile the kernel? and add the correct set of parameters to config.

I tought that this would be already set by default on 5.14....

 

 

Reply
Options

389 Posts

03-06-2021

Germany

219 Signins

2345 Page Views

  • Posts: 389
  • Registered: ‎03-06-2021
  • Location: Germany
  • Views: 2345
  • Message 633 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-20, 22:08 PM

@ linuxmad wrote:

That isn't going to work.

You need the PMC set to yes, and all HSA disabled.

So my option is to compile the kernel? and add the correct set of parameters to config.

I tought that this would be already set by default on 5.14....

 

 

 That is a Distribution thing, there is no S0ix config option in Linux.

 

Yes,looks like you have to build your own kernel, but that is not really hard.

If you need help regarding that, let me know.

 

Gabriel

Reply
Options

104 Posts

02-14-2021

Ukraine

139 Signins

665 Page Views

  • Posts: 104
  • Registered: ‎02-14-2021
  • Location: Ukraine
  • Views: 665
  • Message 634 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-21, 8:15 AM

linuxmad pointed me to my own mis-configuration, i actually did not have the expected options osnix suggested :-D

 

i think i might lower my t14 consumption down from 0.8 Wh.

 

seems fine now:

```

zgrep -E 'CONFIG_(AMD_PMC|I2C_HID_ACPI|HSA_AMD)' /proc/config.gz
# CONFIG_HSA_AMD is not set
CONFIG_I2C_HID_ACPI=m
CONFIG_AMD_PMC=y
```

Reply
Options

61 Posts

12-04-2020

Portugal

64 Signins

360 Page Views

  • Posts: 61
  • Registered: ‎12-04-2020
  • Location: Portugal
  • Views: 360
  • Message 635 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-21, 8:46 AM

Not sure if anyone here is also using Pop!_OS... It has been a long time since my last kernel compile.. not sure if it is the same as Ubuntu?? Pop_os uses Systemd-boot..not sure if is the same process as explained on ubuntu wiki?? https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

 

 

Reply
Options

10 Posts

05-18-2021

United States of America

26 Signins

105 Page Views

  • Posts: 10
  • Registered: ‎05-18-2021
  • Location: United States of America
  • Views: 105
  • Message 636 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-21, 13:28 PM

I tried @osnix patches on my X13 (AMD) running nixos

 

 

NixOS config should anyone be interested:

 
 boot = {

    ...
   kernelPackages = pkgs.linuxPackages_5_13;
   kernelPatches = [
     {  
       name="S0ix-AMD";  
       patch= builtins.fetchurl {
         url = "https://crazy.dev.frugalware.org/5.13.1-S0ix-AMD-all-in-one.patch";
       };

       extraConfig = ''
         AMD_PMC y
         I2C_HID_ACPI m
         HSA_AMD n
       ''
     }
   ];
    ...

  }

 

After the rebuild and reboot I see this in my config

$ zgrep -E 'CONFIG_(AMD_PMC|I2C_HID_ACPI|HSA_AMD)' /proc/config.gz
# CONFIG_HSA_AMD is not set
CONFIG_I2C_HID_ACPI=m
CONFIG_AMD_PMC=y

 

I also switched the sleep mode to Windows 10.

 

So far I have only tested it for 1 hour and I still see 1% drop per hour (I'll update this post once I test more).

UPDATE: after 2.5 hrs I see 3% drop

I also experience long wakeup time: it takes about 7 seconds for a computer to turn on the screen (I believe, I saw this mentioned in this thread).

 

---

 

And at a risk of making everyone slightly angrier (Lenovo does deserve this fully): I've been on vacation for a week. For the entire week my T14s (Intel) been on sitting in suspend. Upon returning from vacation I just opened it and started working from where I left. Only after some time (couple of hours) I noticed, that it was not connected to a power source. This is the baseline I'm comparing to. One week in suspend, and up to a couple of hours after that! And seeing this I can confidently call bs on @MarkRHPearson's claim about almost 2 watts in suspend being ok.

 

Lenovo, I've been a loyal customer since x220. But you boldly and knowingly robbed me of 2 grands, and I'm not buying anything from you again. There's a chance only if you do an international recall campaign and replace these faulty machines with equivalent Gen 2 machines. 

Reply
Options

389 Posts

03-06-2021

Germany

219 Signins

2345 Page Views

  • Posts: 389
  • Registered: ‎03-06-2021
  • Location: Germany
  • Views: 2345
  • Message 637 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-21, 13:45 PM

@koiuo ,

 

I don't have any X13 box to test, you may need to disconnect the battery once from BIOS.

Be sure all devices in BIOS are enabled. If you have a TSME option disable it, disable

USB always on. I also have SB disabled.

 

In userspace be sure to disable all power-saving software.

 

For the long wakeup delay boot with iommu=pt ( I guess you see the VI fault too in nvme )

If X13 has the same TSC bug you'll need tsc=nowatchdog, acpi_osi=Linux may help too.

 

My numbers on P14s are still stable even with 5.14rc{1,2}, the average is 0.34W/h.

 

@linuxmad ,

 

5.14rc2 still needs patches, I think the patch I posted for rc1 should still work.

Reply
Options

389 Posts

03-06-2021

Germany

219 Signins

2345 Page Views

  • Posts: 389
  • Registered: ‎03-06-2021
  • Location: Germany
  • Views: 2345
  • Message 638 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-21, 14:01 PM

I re-diffed everything against 5.13.4, so you guys can test the latest stable release.

 

https://crazy.dev.frugalware.org/5.13.4-S0ix-AMD-all-in-one.patch

 

Reply
Options

83 Posts

04-17-2021

Greece

59 Signins

380 Page Views

  • Posts: 83
  • Registered: ‎04-17-2021
  • Location: Greece
  • Views: 380
  • Message 639 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-21, 15:17 PM

Have anyone build this patch set for Arch?

Reply
Options

37 Posts

05-06-2021

India

59 Signins

585 Page Views

  • Posts: 37
  • Registered: ‎05-06-2021
  • Location: India
  • Views: 585
  • Message 640 of 841

Re:T14 AMD battery drain in standby (Linux)

2021-07-21, 16:29 PM
you can make a pkgbuild based on it if you wish to, its simple https://wiki.archlinux.org/title/Kernel/Arch_Build_System, for the patch specify the link to it under the source variable/array
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