mirror of
https://github.com/erpalma/throttled.git
synced 2026-01-06 00:30:15 +01:00
fix #22
This commit is contained in:
parent
6c38278922
commit
2eca07717a
|
|
@ -38,8 +38,8 @@ power = {'source': None, 'method': 'polling'}
|
|||
|
||||
|
||||
def writemsr(msr, val):
|
||||
n = glob.glob('/dev/cpu/[0-9]*/msr')
|
||||
if not n:
|
||||
n = ['/dev/cpu/{:d}/msr'.format(x) for x in range(cpu_count())]
|
||||
if not os.path.exists(n[0]):
|
||||
try:
|
||||
subprocess.check_call(('modprobe', 'msr'))
|
||||
except subprocess.CalledProcessError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue