intel / thermal_daemon

Thermal daemon for IA
GNU General Public License v2.0
540 stars 117 forks source link

Bug in RAPL and config file parsing #314

Closed ioctl-user closed 2 months ago

ioctl-user commented 2 years ago

Please see thd_cdev_rapl.cpp , string 378:

        min_state = pl0_max_pwr;
        max_state = pl0_min_pwr;

What is it ???

ioctl-user commented 2 years ago

This problem break usage of config files, that needed for some buggy devices like Dell Latitude. Obvious fix with these words change leads to other kind of problems. It seems, this bug somewhere complemented and masked by others.

spandruvada commented 2 years ago

The control is applied from min state to max state. So at max state you have lower power that means it can result in lower temperature. min state where where full power is applied. What issue your are trying to solve? Attach your config file.

ioctl-user commented 2 years ago

Here is current configuration file:

<?xml version="1.0"?>
 <!-- BEGIN -->
 <ThermalConfiguration>
 <Platform>
    <Name> Auto generated </Name>
    <ProductName>Latitude 5420</ProductName>
    <Preference>QUIET</Preference>
    <PPCC>
        <PowerLimitIndex>0</PowerLimitIndex>
        <PowerLimitMinimum>12000</PowerLimitMinimum>
        <PowerLimitMaximum>22000</PowerLimitMaximum>
        <TimeWindowMinimum>22000</TimeWindowMinimum>
        <TimeWindowMaximum>28000</TimeWindowMaximum>
        <StepSize>500</StepSize>
    </PPCC>

    <ThermalZones>
        <ThermalZone>
            <Type>thermal_zone_4</Type>
            <TripPoints>
                <TripPoint>
                    <SensorType>TCPU</SensorType>
                    <Temperature>78000</Temperature>
                    <Type>Passive</Type>
                    <CoolingDevice>
                        <Type>rapl_controller_mmio</Type>
                        <SamplingPeriod>1</SamplingPeriod>
                    </CoolingDevice>
                </TripPoint>
            </TripPoints>
        </ThermalZone>
    </ThermalZones>
</Platform>
</ThermalConfiguration>
<!-- END -->

Run with the following options: thermald --ignore-default-control --exclusive-control --workaround-enabled --no-daemon --loglevel=debug

Here is s-tui app screenshot after 5 seconds of high cpu load: s-tui

As you can see, CPU power consumption is about 36 Wt instead of expected maximum 22. Please, note, that CPU frequency on the screenshot in GHz, not in MHz.

spandruvada commented 2 months ago

Try the latest version and reopen if the issue still exists.