Open joakim-tjernlund opened 3 years ago
For now I just hacked:
-- a/lenovo_fix.py 2020-12-15 09:43:38.629180943 +0100
+++ b/lenovo_fix.py 2020-12-15 15:15:03.759219800 +0100
@@ -208,8 +208,9 @@
except:
pass
- warning('No valid power detection methods found. Assuming that the system is running on battery power.')
- return True
+ warning('No valid power detection methods found. Assuming that the system is running on AC power.')
+# return True
+ return False
def get_cpu_platform_info():
@@ -606,7 +607,10 @@
# set cTDP
if 'MSR_CONFIG_TDP_CONTROL' in regs[power['source']]:
write_value = regs[power['source']]['MSR_CONFIG_TDP_CONTROL']
- writemsr(0x64B, write_value)
+ try:
+ writemsr(0x64B, write_value)
+ except IOError:
+ pass
if args.debug:
read_value = readmsr(0x64B, 0, 1, flatten=True)
match = OK if write_value == read_value else ERR
I cannot write the cTDP value either
This can not be optimal I guess ?