Announcement

Collapse
No announcement yet.

Lenovo's Platform Profile Support For AMD Systems On Linux Has Been Busted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lenovo's Platform Profile Support For AMD Systems On Linux Has Been Busted

    Phoronix: Lenovo's Platform Profile Support For AMD Systems On Linux Has Been Busted

    ACPI Platform Profile support on Linux has been useful for catering to balancing your power or performance preferences with modern laptops on Linux. It has worked well in general across various devices tested but it turns out to be a dud currently when it comes to AMD Ryzen powered Lenovo systems...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Same old Lenovo - buster, straight buster.

    Comment


    • #3
      They should test these things if they sell with Linux preinstalled.

      Comment


      • #4
        Nice to see this patch was contributed by Lenovo themselves. This means actually maintain their driver.

        Comment


        • #5
          Tested platform_profile some time ago and it was (kind of?) working back then.

          Made a fresh check:


          Code:
          cat /sys/firmware/acpi/platform_profile
          balanced
          
          cat /sys/firmware/acpi/platform_profile_choices
          low-power balanced performance
          Setting platform_profle and reading the values with RyzenAdj:

          Code:
          low-power:
          |        Name         |   Value   |      Paramter      |
          |---------------------|-----------|--------------------|
          | STAPM LIMIT         |    15.000 | stapm-limit        | <---
          | STAPM VALUE         |     4.516 |                    |
          | PPT LIMIT FAST      |    15.000 | fast-limit         | <---
          | PPT VALUE FAST      |     9.349 |                    |
          | PPT LIMIT SLOW      |    15.000 | slow-limit         | <---
          | PPT VALUE SLOW      |     2.822 |                    |
          | StapmTimeConst      |   200.000 | stapm-time         | <---
          | SlowPPTTimeConst    |     5.000 | slow-time          |
          | PPT LIMIT APU       |    54.000 | apu-slow-limit     |
          | PPT VALUE APU       |     2.822 |                    |
          | TDC LIMIT VDD       |    58.000 | vrm-current        |
          | TDC VALUE VDD       |     0.751 |                    |
          | TDC LIMIT SOC       |    15.000 | vrmsoc-current     |
          | TDC VALUE SOC       |     0.839 |                    |
          | EDC LIMIT VDD       |   110.000 | vrmmax-current     |
          | EDC VALUE VDD       |   101.776 |                    |
          | EDC LIMIT SOC       |    20.000 | vrmsocmax-current  |
          | EDC VALUE SOC       |     0.000 |                    |
          | THM LIMIT CORE      |    70.000 | tctl-temp          | <---
          | THM VALUE CORE      |    36.758 |                    |
          | STT LIMIT APU       |     0.000 | apu-skin-temp      |
          | STT VALUE APU       |     0.000 |                    |
          | STT LIMIT dGPU      |     0.000 | dgpu-skin-temp     |
          | STT VALUE dGPU      |     0.000 |                    |
          | CCLK Boost SETPOINT |    50.000 | power-saving /     |
          | CCLK BUSY VALUE     |    20.110 | max-performance    |
          
          balanced:
          |        Name         |   Value   |      Paramter      |
          |---------------------|-----------|--------------------|
          | STAPM LIMIT         |    35.000 | stapm-limit        | <---
          | STAPM VALUE         |     4.348 |                    |
          | PPT LIMIT FAST      |    60.000 | fast-limit         | <---
          | PPT VALUE FAST      |    10.177 |                    |
          | PPT LIMIT SLOW      |    42.000 | slow-limit         | <---
          | PPT VALUE SLOW      |     2.858 |                    |
          | StapmTimeConst      |   150.000 | stapm-time         | <---
          | SlowPPTTimeConst    |     5.000 | slow-time          |
          | PPT LIMIT APU       |    54.000 | apu-slow-limit     |
          | PPT VALUE APU       |     2.858 |                    |
          | TDC LIMIT VDD       |    58.000 | vrm-current        |
          | TDC VALUE VDD       |     0.575 |                    |
          | TDC LIMIT SOC       |    15.000 | vrmsoc-current     |
          | TDC VALUE SOC       |     0.765 |                    |
          | EDC LIMIT VDD       |   110.000 | vrmmax-current     |
          | EDC VALUE VDD       |   107.757 |                    |
          | EDC LIMIT SOC       |    20.000 | vrmsocmax-current  |
          | EDC VALUE SOC       |     0.000 |                    |
          | THM LIMIT CORE      |   100.000 | tctl-temp          | <---
          | THM VALUE CORE      |    37.136 |                    |
          | STT LIMIT APU       |     0.000 | apu-skin-temp      |
          | STT VALUE APU       |     0.000 |                    |
          | STT LIMIT dGPU      |     0.000 | dgpu-skin-temp     |
          | STT VALUE dGPU      |     0.000 |                    |
          | CCLK Boost SETPOINT |    50.000 | power-saving /     |
          | CCLK BUSY VALUE     |    17.244 | max-performance    |
          
          performance:
          |        Name         |   Value   |      Paramter      |
          |---------------------|-----------|--------------------|
          | STAPM LIMIT         |    54.000 | stapm-limit        | <---
          | STAPM VALUE         |     4.300 |                    |
          | PPT LIMIT FAST      |    65.000 | fast-limit         | <---
          | PPT VALUE FAST      |    13.558 |                    |
          | PPT LIMIT SLOW      |    65.000 | slow-limit         | <---
          | PPT VALUE SLOW      |     3.228 |                    |
          | StapmTimeConst      |   400.000 | stapm-time         | <---
          | SlowPPTTimeConst    |     5.000 | slow-time          |
          | PPT LIMIT APU       |    54.000 | apu-slow-limit     |
          | PPT VALUE APU       |     3.228 |                    |
          | TDC LIMIT VDD       |    58.000 | vrm-current        |
          | TDC VALUE VDD       |     0.647 |                    |
          | TDC LIMIT SOC       |    15.000 | vrmsoc-current     |
          | TDC VALUE SOC       |     0.747 |                    |
          | EDC LIMIT VDD       |   110.000 | vrmmax-current     |
          | EDC VALUE VDD       |   101.856 |                    |
          | EDC LIMIT SOC       |    20.000 | vrmsocmax-current  |
          | EDC VALUE SOC       |     0.000 |                    |
          | THM LIMIT CORE      |   100.000 | tctl-temp          | <---
          | THM VALUE CORE      |    40.308 |                    |
          | STT LIMIT APU       |     0.000 | apu-skin-temp      |
          | STT VALUE APU       |     0.000 |                    |
          | STT LIMIT dGPU      |     0.000 | dgpu-skin-temp     |
          | STT VALUE dGPU      |     0.000 |                    |
          | CCLK Boost SETPOINT |    50.000 | power-saving /     |
          | CCLK BUSY VALUE     |    45.875 | max-performance    |
          So setting the platform_profile does indeed change something for this particular Lenovo laptop.
          Now; how to check if these values are just set somewhere or if they in fact change some behaviour?

          Comment


          • #6
            The DYTC functionality actually *kind of* works on AMD laptops as some people on the Lenovo forum found: https://forums.lenovo.com/t5/Other-L...page=3#5496917

            Seems to change power limits and fan speeds. Looks like at least some functionality is there so hopefully it just requires wiring it up

            Comment


            • #7
              Originally posted by reba View Post

              So setting the platform_profile does indeed change something for this particular Lenovo laptop.
              Now; how to check if these values are just set somewhere or if they in fact change some behaviour?
              You could run stress-ng and monitor CPU power usage via turbostat, that's usually how I test it.

              Comment


              • #8
                Strange, I also use the hack with `acpi_call` on Renoir ideapad and it works fine. I have not tried the lenovo profiles driver.

                Tried messing with `/sys/firmware/acpi/platform_profile` but it's strange: if I switch from low-power to performance using the `acpi_call` it does not change the the profile in `/sys/firmware/acpi/platform_profile`. Though if I change it through the `platform_profile` if changes the values I get from the apci_call.

                Last edited by luben; 02 February 2022, 10:42 AM.

                Comment


                • #9
                  People on Reddit ask me why power management is so messed up in the *BSDs when companies literally sell laptops with Linux preinstalled and can't get power management done right!

                  Comment


                  • #10
                    I made some measurements with s-tui+stress and the three different platform_profiles, in case anybody is interested...


                    1.
                    CPU Governor: Performance
                    Platform Profile: Balanced
                    Stress: No (Idle)


                    -> Quite high core clocks (15x 4,7 GHz + 1x 3,3 GHz... eehh...) because of the running AMD P-State CPPC Driver. With CPU Governor Powersafe they idle at 16x 0,4 GHz.


                    2.
                    CPU Governor: Performance
                    Platform Profile: Low-Power
                    Stress: Yes


                    -> With stress active, CPUs go up to 16x 2,1 GHz and stay there


                    3.
                    CPU Governor: Performance
                    Platform Profile: Balanced
                    Stress: Yes


                    -> CPUs go up to 16x 3,8 GHz


                    4.
                    CPU Governor: Performance
                    Platform Profile: Performance
                    Stress: Yes


                    -> CPUs reach 16x 3,9 GHz; although a core could go up to 4,7 GHz as we've seen at the Idle test above


                    5.
                    CPU Governor: Performance
                    Platform Profile: Performance
                    Stress: Yes, running for some time


                    -> CPUs stay at 3,9 GHz but thermal throttling kicks in (see the pits in the graphs) to limit temperatures to around 86 °C


                    I conclude: it has an effect




                    Edit:
                    Notice the shown Power usages in Watt by s-tui and compare them to the RyzenAdj-output from my post above:

                    Code:
                    low-power:
                    | PPT LIMIT FAST      |    15.000 | fast-limit         | <---
                    balanced:
                    | PPT LIMIT FAST      |    60.000 | fast-limit         | <---
                    performance:
                    | PPT LIMIT FAST      |    65.000 | fast-limit         | <---
                    The CPU power usage in each test-case matches the given limit absolutely spot on! Amazing!
                    Last edited by reba; 02 February 2022, 12:32 PM.

                    Comment

                    Working...
                    X