> Date: Fri, 15 Apr 2016 20:41:53 +0200 > From: Marcus Glocker <mar...@nazgul.ch> > > Yesterday I've installed macppc -current on a G5. > Since OF_getprop() for the 'unmanage-value' parameter fails on it, > smu(4) sets the fan speed to 'max-value' instead, which is 3200RPM > in my case. This makes the G5 sound louder than my vacuum cleaner. > > First I thought 'unmanage-value' is a typo and it should be > 'unmanaged-value' like in the FreeBSD driver, but unfortunately it > still did fail. I saw that the FreeBSD driver doesn't set the fan > speed at all initially in their driver. When I do the same on the > G5, the fan speed goes to a decent of ~1000RPM: > > hw.sensors.smu0.fan0=999 RPM (Rear Fan 0) > hw.sensors.smu0.fan1=999 RPM (Rear fan 1) > hw.sensors.smu0.fan2=999 RPM (Front Fan) > > I don't know what the right way is to fix this, but skipping to set > the fan speed when the 'unmanage-value' isn't available seems to work > fine in this case.
On what hardware are you running this? Can you send us the output of eeprom -p for this machine? > Index: sys/arch/macppc/dev/smu.c > =================================================================== > RCS file: /cvs/src/sys/arch/macppc/dev/smu.c,v > retrieving revision 1.27 > diff -u -p -u -p -r1.27 smu.c > --- sys/arch/macppc/dev/smu.c 4 Jun 2015 18:01:44 -0000 1.27 > +++ sys/arch/macppc/dev/smu.c 15 Apr 2016 18:17:12 -0000 > @@ -281,15 +281,17 @@ smu_attach(struct device *parent, struct > val = 0xffff; > fan->max_rpm = val; > if (OF_getprop(node, "unmanage-value", &val, sizeof val) <= 0) > - val = fan->max_rpm; > + val = 0; > fan->unmanaged_rpm = val; > > if (OF_getprop(node, "location", loc, sizeof loc) <= 0) > strlcpy(loc, "Unknown", sizeof loc); > strlcpy(fan->sensor.desc, loc, sizeof sensor->sensor.desc); > > - /* Start running fans at their "unmanaged" speed. */ > - smu_fan_set_rpm(sc, fan, fan->unmanaged_rpm); > + if (fan->unmanaged_rpm) { > + /* Start running fans at their "unmanaged" speed. */ > + smu_fan_set_rpm(sc, fan, fan->unmanaged_rpm); > + } > > #ifndef SMALL_KERNEL > sensor_attach(&sc->sc_sensordev, &fan->sensor); > >