Skip to content

Commit

Permalink
Fix: restoring default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIII committed Aug 26, 2024
1 parent 7b63e53 commit 55313b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 13 additions & 12 deletions src/GUI/AppGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 55313b3

Please sign in to comment.