intel / intel-lpmd

GNU General Public License v2.0
108 stars 10 forks source link

util based monitoring always enabled after power_supply change? #69

Open octomike opened 2 weeks ago

octomike commented 2 weeks ago

I'm playing around with intel-lpmd on my new Framework 13 (Core Ultra). I have disable all hints, except WLT hardware hints (on kernel 6.10).

This sort of works (although I only see messages when increasing verbosity). But I am confused as why, after plugging in and removing my power supply, lpmd claims to enter low-power mode because of utl changes. Is that a bug?

Example log:

Nov 06 21:43:09 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:09 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:09 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:09 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:09 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:12 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:13 leslie intel_lpmd[16954]: [4/4]  WLT_BURSTY : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:13 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:13 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:14 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:15 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:15 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:25 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:25 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: ------ Enter Low Power Mode ( utl enter) --- Wed Nov  6 21:43:26 2024
Nov 06 21:43:26 leslie intel_lpmd[16954]: Ignore IRQ migration
Nov 06 21:43:26 leslie intel_lpmd[16954]: Ignore Task migration
Nov 06 21:43:26 leslie intel_lpmd[16954]: ----- Done (1509514 ns) ---
Nov 06 21:43:26 leslie intel_lpmd[16954]: [4/4]  WLT_BURSTY : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   4, itmt  1, interval 2000
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 1
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:26 leslie intel_lpmd[16954]: ------ Exit Low Power Mode (  usr exit) --- Wed Nov  6 21:43:26 2024
Nov 06 21:43:26 leslie intel_lpmd[16954]: Ignore Task migration
Nov 06 21:43:26 leslie intel_lpmd[16954]: Process IRQs ...
Nov 06 21:43:26 leslie intel_lpmd[16954]: ----- Done (1331458 ns) ---
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:26 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:26 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:26 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:27 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:27 leslie intel_lpmd[16954]: [4/4]  WLT_BURSTY : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:27 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:27 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:27 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:27 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:27 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:27 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:27 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:27 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:28 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:28 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:28 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:28 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:28 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:28 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:28 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:29 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:29 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:29 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:29 leslie intel_lpmd[16954]: [2/4]  WLT_BATTERY_LIFE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb   6, itmt  1, interval 2000
Nov 06 21:43:29 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:29 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:29 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:29 leslie intel_lpmd[16954]: upower event: on-battery: 0
Nov 06 21:43:30 leslie intel_lpmd[16954]: ------ Enter Low Power Mode ( utl enter) --- Wed Nov  6 21:43:30 2024
Nov 06 21:43:30 leslie intel_lpmd[16954]: Ignore IRQ migration
Nov 06 21:43:30 leslie intel_lpmd[16954]: Ignore Task migration
Nov 06 21:43:30 leslie intel_lpmd[16954]: ----- Done (2160889 ns) ---
Nov 06 21:43:30 leslie intel_lpmd[16954]: [1/4]    WLT_IDLE : bsys:   0.-1, bcpu:   0.-1, epp              default, epb  15, itmt  1, interval 2000
Nov 06 21:43:30 leslie intel_lpmd[16954]: ------ Enter Low Power Mode ( utl enter) --- Wed Nov  6 21:43:30 2024
zhang-rui commented 2 weeks ago

can you paste the config xml file you're using?

octomike commented 2 weeks ago

of course, sorry...

<?xml version="1.0"?>

<Configuration>
    <lp_mode_cpus></lp_mode_cpus>
    <Mode>1</Mode>
    <PerformanceDef>-1</PerformanceDef>
    <BalancedDef>0</BalancedDef>
    <PowersaverDef>0</PowersaverDef>
    <HfiLpmEnable>0</HfiLpmEnable>
    <WLTHintEnable>1</WLTHintEnable>
    <WLTProxyEnable>0</WLTProxyEnable>
    <HfiSuvEnable>0</HfiSuvEnable>
    <util_entry_threshold></util_entry_threshold>
    <util_exit_threshold></util_exit_threshold>
    <EntryDelayMS>0</EntryDelayMS>
    <ExitDelayMS>0</ExitDelayMS>
    <EntryHystMS>2000</EntryHystMS>
    <ExitHystMS>3000</ExitHystMS>
    <IgnoreITMT>0</IgnoreITMT>

    <States>
        <CPUFamily> 6 </CPUFamily>
        <CPUModel> 170 </CPUModel>
        <CPUConfig> * </CPUConfig>
    <State>
        <ID> 1 </ID> <!-- no significance. number can be anything -->
        <Name> WLT_IDLE </Name>
        <WLTType> 0 </WLTType> <!-- WLTType mapped to Name -->
        <EPP> 255 </EPP>
        <EPB> 15 </EPB>
        <MinPollInterval>2000</MinPollInterval>
        <ITMTState> -1 </ITMTState>
        <IRQMigrate> -1 </IRQMigrate>
    </State>
    <State>
        <ID> 2 </ID>
        <Name> WLT_BATTERY_LIFE </Name>
        <WLTType> 1 </WLTType>
        <EPP> 178 </EPP>
        <EPB> 6 </EPB>
        <MinPollInterval>2000</MinPollInterval>
        <ITMTState> -1 </ITMTState>
        <IRQMigrate> -1 </IRQMigrate>
    </State>
    <State>
        <ID> 3 </ID>
        <Name> WLT_SUSTAINED </Name>
        <WLTType> 2 </WLTType>
        <EPP> 64 </EPP>
        <EPB> 6 </EPB>
        <MinPollInterval>2000</MinPollInterval>
        <ITMTState> -1 </ITMTState>
        <IRQMigrate> -1 </IRQMigrate>
    </State>
    <State>
        <ID> 4 </ID>
        <Name> WLT_BURSTY </Name>
        <WLTType> 3 </WLTType>
        <EPP> 64 </EPP>
        <EPB> 4 </EPB>
        <MinPollInterval>2000</MinPollInterval>
        <ITMTState> -1 </ITMTState>
        <IRQMigrate> -1 </IRQMigrate>
    </State>
</States>

</Configuration>