mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-23 13:45:10 +02:00
Fix for unsupported turbo (#89)
* added possible fox for nit supported turbo boost
This commit is contained in:
parent
b6e1cc3a59
commit
d41f7c3f68
@ -42,14 +42,18 @@ def turbo(value: bool = None):
|
|||||||
f = cpufreq
|
f = cpufreq
|
||||||
inverse = False
|
inverse = False
|
||||||
else:
|
else:
|
||||||
print("Error: cpu boost is not available")
|
print("Warning: CPU turbo is not available")
|
||||||
return None
|
return False
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
if inverse:
|
if inverse:
|
||||||
value = not value
|
value = not value
|
||||||
|
|
||||||
f.write_text(str(int(value)) + "\n")
|
try:
|
||||||
|
f.write_text(str(int(value)) + "\n")
|
||||||
|
except PermissionError:
|
||||||
|
print("Warning: Changing CPU turbo is not supported. Skipping.")
|
||||||
|
return False
|
||||||
|
|
||||||
value = bool(int(f.read_text().strip()))
|
value = bool(int(f.read_text().strip()))
|
||||||
if inverse:
|
if inverse:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user