Skip to content

set power_limit AssertionError #12

@LinusChen-yf

Description

@LinusChen-yf

~ sudo throttlestop tdp 1 err | 14:30:42

{
    "MSR_PKG_POWER_LIMIT": 18722037335687528,
    "first": {
        "MSR_PKG_POWER_LIMIT": 18722037335687528,
        "power_limit": 45.0,
        "power_enabled": true,
        "power_clamping_limit": true,
        "power_limit_time_window": 28.0,
        "__types.SimpleNamespace": true
    },
    "second": {
        "MSR_PKG_POWER_LIMIT": 4359064,
        "power_limit": 115.0,
        "power_enabled": true,
        "power_clamping_limit": false,
        "power_limit_time_window": 0.00244140625,
        "__types.SimpleNamespace": true
    },
    "lock": false,
    "__types.SimpleNamespace": true
}

~ sudo throttlestop tdp "{"first": {"power_limit": 65.0}}" ok | 14:30:50

Traceback (most recent call last):
  File "/usr/bin/throttlestop", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/throttlestop/__main__.py", line 53, in main
    result = build_MSR_PKG_POWER_LIMIT(power_limits, units)
  File "/usr/lib/python3.10/site-packages/throttlestop/msr.py", line 96, in build_MSR_PKG_POWER_LIMIT
    result = _build_MSR_PKG_POWER_LIMIT_internal(_obj.first, _units, _max_power_limit)
  File "/usr/lib/python3.10/site-packages/throttlestop/msr.py", line 107, in _build_MSR_PKG_POWER_LIMIT_internal
    assert 0. <= _obj.power_limit <= _max_power_limit, _obj.power_limit
AssertionError: 65.0

I don't quite understand why this assertion fails, my cpu max tdp is 115w.
Hope you can help me look at this problem in your busy schedule, thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions