Open BeWo123 opened 2 years ago
My first impression is that it is markedly different from the 2019 Fusion 15. I am not sure what could be done, someone would have to reverse engineer how the control center works.
@pobrn actually fan, lightbar, battery, etc. ctl ec addresses, are same as 2019 Fusion 15, with different dmi strings. But how do you get those addresses?
BTW, I want to ask that,
TCC set full fan mode before control fan speed (according to tcc, i.e. write 0x40 to 0x0751), as you do ec_write_byte(FAN_CTRL_ADDR, FAN_CTRL_FAN_BOOST)
also , but why?
int qc71_fan_set_mode(uint8_t mode)
{
int err, oldpwm;
err = mutex_lock_interruptible(&fan_lock);
if (err)
return err;
switch (mode) {
case 0:
err = ec_write_byte(FAN_CTRL_ADDR, FAN_CTRL_FAN_BOOST);
if (err)
goto out;
err = qc71_fan_set_pwm(0, FAN_MAX_PWM);
break;
case 1:
oldpwm = err = qc71_fan_get_pwm(0);
if (err < 0)
goto out;
err = ec_write_byte(FAN_CTRL_ADDR, FAN_CTRL_FAN_BOOST);
if (err < 0)
goto out;
err = qc71_fan_set_pwm(0, oldpwm);
if (err < 0)
(void) ec_write_byte(FAN_CTRL_ADDR, 0x80 | FAN_CTRL_AUTO);
/* try to restore automatic fan control */
break;
case 2:
err = ec_write_byte(FAN_CTRL_ADDR, 0x80 | FAN_CTRL_AUTO);
break;
default:
err = -EINVAL;
break;
}
out:
mutex_unlock(&fan_lock);
return err;
}
But how do you get those addresses?
I don't quite remember... many of them are from the xmg fusion 15 and neo 15 control centers.
BTW, I want to ask that, TCC set full fan mode before control fan speed (according to tcc, i.e. write 0x40 to 0x0751), as you do ec_write_byte(FAN_CTRL_ADDR, FAN_CTRL_FAN_BOOST) also , but why?
If the fan is in automatic mode and its speed is set, then it will start adjusting the speed immediately.
Hi there, got a new XMG Fusion 15 these days. Compile without problems, loading the module says:
There is no /sys/class/leds/qc71_laptop to be found. Is there a chance to get it working?
Additional details, head /sys/devices/virtual/dmi/id/* 2>/dev/null shows
insmod qc71_laptop.ko debugregs=1; head /sys/kernel/debug/qc71_laptop/regs/* gives me: