Skip to content

Commit

Permalink
fix wrong bit for BDPROCHOT in MSR_POWER_CTL and BDPROCHOT config par…
Browse files Browse the repository at this point in the history
…sing error (thanks Andrea)
  • Loading branch information
erpalma committed Apr 30, 2021
1 parent 4c60869 commit dbcef1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lenovo_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def set_disable_bdprochot():

writemsr('MSR_POWER_CTL', new_val)
if args.debug:
read_value = readmsr('MSR_POWER_CTL', from_bit=31, to_bit=31)[0]
read_value = readmsr('MSR_POWER_CTL', from_bit=0, to_bit=0)[0]
match = OK if ~read_value else ERR
log('[D] BDPROCHOT - write "{:#02x}" - read "{:#02x}" - match {}'.format(0, read_value, match))

Expand Down Expand Up @@ -750,7 +750,7 @@ def power_thread(config, regs, exit_event):

# Disable BDPROCHOT
disable_bdprochot = config.getboolean(power['source'], 'Disable_BDPROCHOT', fallback=None)
if disable_bdprochot is not None:
if disable_bdprochot:
set_disable_bdprochot()

wait_t = config.getfloat(power['source'], 'Update_Rate_s')
Expand Down

0 comments on commit dbcef1e

Please sign in to comment.