Commit 27abbf16 authored by Arjen Hiemstra's avatar Arjen Hiemstra

Remove "memory temperate" and make "core temperature" just "temperature"

Since neither the AMD nor the Nvidia GPUs support reporting memory
temeperature.
parent f0c691d4
......@@ -46,13 +46,10 @@ void GpuDevice::initialize()
m_memoryFrequencyProperty->setPrefix(name());
m_memoryFrequencyProperty->setUnit(KSysGuard::UnitMegaHertz);
m_coreTemperatureProperty->setName(i18nc("@title", "Temperature"));
m_coreTemperatureProperty->setPrefix(name());
m_coreTemperatureProperty->setUnit(KSysGuard::UnitCelsius);
m_temperatureProperty->setName(i18nc("@title", "Temperature"));
m_temperatureProperty->setPrefix(name());
m_temperatureProperty->setUnit(KSysGuard::UnitCelsius);
m_memoryTemperatureProperty->setName(i18nc("@title", "Memory Temperature"));
m_memoryTemperatureProperty->setPrefix(name());
m_memoryTemperatureProperty->setUnit(KSysGuard::UnitCelsius);
}
void GpuDevice::makeSensors()
......@@ -63,6 +60,5 @@ void GpuDevice::makeSensors()
m_usedVramProperty = new SensorProperty(QStringLiteral("usedVram"), this);
m_coreFrequencyProperty = new SensorProperty(QStringLiteral("coreFrequency"), this);
m_memoryFrequencyProperty = new SensorProperty(QStringLiteral("memoryFrequency"), this);
m_coreTemperatureProperty = new SensorProperty(QStringLiteral("coreTemperature"), this);
m_memoryTemperatureProperty = new SensorProperty(QStringLiteral("memoryTemperature"), this);
m_temperatureProperty = new SensorProperty(QStringLiteral("temperature"), this);
}
......@@ -28,8 +28,7 @@ protected:
SensorProperty *m_usageProperty;
SensorProperty *m_totalVramProperty;
SensorProperty *m_usedVramProperty;
SensorProperty *m_coreTemperatureProperty;
SensorProperty *m_memoryTemperatureProperty;
SensorProperty *m_temperatureProperty;
SensorProperty *m_coreFrequencyProperty;
SensorProperty *m_memoryFrequencyProperty;
};
......@@ -79,7 +79,7 @@ void LinuxAmdGpu::initialize()
result = udev_device_get_sysattr_value(m_device, m_coreTemperatureMaxPath.toLocal8Bit());
if (result) {
m_coreTemperatureProperty->setMax(std::atoi(result) / 1000);
m_temperatureProperty->setMax(std::atoi(result) / 1000);
}
}
......@@ -119,13 +119,11 @@ void LinuxAmdGpu::makeSensors()
m_memoryFrequencyProperty = sensor;
m_sysFsSensors << sensor;
sensor = new SysFsSensor(QStringLiteral("coreTemperature"), devicePath % QLatin1Char('/') % m_coreTemperatureCurrentPath, this);
sensor = new SysFsSensor(QStringLiteral("temperature"), devicePath % QLatin1Char('/') % m_coreTemperatureCurrentPath, this);
sensor->setConvertFunction([](const QByteArray &input) {
auto result = std::atoi(input);
return result / 1000;
});
m_coreTemperatureProperty = sensor;
m_temperatureProperty = sensor;
m_sysFsSensors << sensor;
m_memoryTemperatureProperty = new SensorProperty(QStringLiteral("memoryTemperature"), this);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment