From 55313b3dd10c08c0c6dfaf671dd8e7d0ad981fbf Mon Sep 17 00:00:00 2001 From: Alexander Chernoskutov Date: Mon, 26 Aug 2024 19:33:18 +0400 Subject: [PATCH] Fix: restoring default settings --- README.md | 1 + src/GUI/AppGUI.py | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 634bc11..e414f01 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ _Thanks to @Dtwpurple, @WinterholdPrime for the compatibility reports._ - Manual fan contoll is not *really* manual. If you set fan speed too low the BIOS will takeover and raise the fan speed automatically when the GPU/CPU temperature reaches certain point to prevent overheating. - **"Autorun on startup" feature may not work for you.** The autorun adds a task to the Windows Task Scheduler that should start the app on first sign-in after a reboot, but it may fail to run the app due to the system's security policy. You can try other approaches to make the app to autostart on your system. [Checkout this issue.](https://github.com/AlexIII/tcc-g15/issues/7) - On rare occasions, the driver may report bogus GPU temperature. [See this issue.](https://github.com/AlexIII/tcc-g15/issues/9) +- Switching the thermal mode to "G-mode" and back **may result in second-long system-wide freeze** (in the exact moment when the switch is happening). This is a known issue with the Dell's thermal control interface. Cannot be fixed. Make sure to disable fail-safe feature if you don't want the app to switch the thermal mode automatically. ## Why AWCC is BAD diff --git a/src/GUI/AppGUI.py b/src/GUI/AppGUI.py index d390421..7f98c57 100644 --- a/src/GUI/AppGUI.py +++ b/src/GUI/AppGUI.py @@ -197,10 +197,10 @@ def updFailsafeIndicator() -> None: # Fail-safe temp limits self._limitTempGPU = QtWidgets.QComboBox() - self._limitTempGPU.addItems(list(map(lambda v: str(v), range(30, 91)))) + self._limitTempGPU.addItems(list(map(lambda v: str(v), range(50, 91)))) self._limitTempGPU.setToolTip("Threshold GPU temp") self._limitTempCPU = QtWidgets.QComboBox() - self._limitTempCPU.addItems(list(map(lambda v: str(v), range(30, 101)))) + self._limitTempCPU.addItems(list(map(lambda v: str(v), range(50, 101)))) self._limitTempCPU.setToolTip("Threshold CPU temp") def onLimitGPUChange(): val = self._limitTempGPU.currentText() @@ -373,23 +373,24 @@ def _saveAppSettings(self): self.settings.setValue(SettingsKey.FailSafeIsOnFlag.value, self._failsafeOn) def _loadAppSettings(self): - savedMode = self.settings.value(SettingsKey.Mode.value) - if savedMode is not None: self._modeSwitch.setChecked(savedMode) + savedMode = self.settings.value(SettingsKey.Mode.value) or ThermalMode.Balanced.value + self._modeSwitch.setChecked(savedMode) savedSpeed = self.settings.value(SettingsKey.CPUFanSpeed.value) self._thermalCPU.setSpeedSlider(savedSpeed) savedSpeed = self.settings.value(SettingsKey.GPUFanSpeed.value) self._thermalGPU.setSpeedSlider(savedSpeed) - savedTemp = self.settings.value(SettingsKey.CPUThresholdTemp.value) - if savedTemp is not None: self._limitTempCPU.setCurrentText(str(savedTemp)) - savedTemp = self.settings.value(SettingsKey.GPUThresholdTemp.value) - if savedTemp is not None: self._limitTempGPU.setCurrentText(str(savedTemp)) - savedFailsafe = self.settings.value(SettingsKey.FailSafeIsOnFlag.value) - if savedFailsafe is not None: self._failsafeCB.setChecked(not (savedFailsafe == 'False')) + savedTemp = self.settings.value(SettingsKey.CPUThresholdTemp.value) or 95 + self._limitTempCPU.setCurrentText(str(savedTemp)) + savedTemp = self.settings.value(SettingsKey.GPUThresholdTemp.value) or 85 + self._limitTempGPU.setCurrentText(str(savedTemp)) + savedFailsafe = self.settings.value(SettingsKey.FailSafeIsOnFlag.value) or 'True' + self._failsafeCB.setChecked(not (savedFailsafe == 'False')) def clearAppSettings(self): (isYes, _) = confirm("Reset to Default", "Do you want to reset all settings to default?", ("Reset", "Cancel")) - if isYes: - self.settings.clear() + if not isYes: return + self.settings.clear() + self._loadAppSettings() def runApp(startMinimized = False) -> int: