DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-10-04 17:21:57

RoganDawes
Member
Registered: 2010-07-01
Posts: 44

Debian on DNS323 loses fan config?

Hi folks,

I've installed debian on my B1 -323, and have generally been quite happy with it. I installed the newer kernel, with sensor support, set up the sensors and pwmconfig, and was happy with everything working.

Then I shut down, rebooted, and it wasn't working.

It seems that the devices are changing order between reboots:

Code:

rogan@nas:~$ diff /etc/fancontrol*
3,9c3,8
< FCTEMPS=hwmon0/device/pwm1=hwmon1/device/temp1_input
< FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input
---
> FCTEMPS= hwmon1/device/pwm1=hwmon0/device/temp1_input
> FCFANS= hwmon1/device/pwm1=hwmon1/device/fan1_input

Any ideas on how to avoid this? My poor nas sent me an email to tell me the disks were at 55C before I realised :-(

Offline

 

#2 2010-10-05 10:31:03

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Debian on DNS323 loses fan config?

I'm glad you posted this. I'd forgotten to look into this (was using dns323d but this looks ideal; I'm not even 100% sure my fan was running before).

I haven't played too much but definitely saw the fatal swap one reboot after configuring this. I can see that by manually unloading and reloading the lm75 and g760a modules. However I'm not sure what's controlling the startup load ordering and why it would swap (or if they race each other). It doesn't look like /etc/modules (modified by sensors-detect) matters much (it didn't add g760a at all and putting that plus lm75 in there seems to have no bearing on the ordering - I'm assuming they're autoloading before /etc/modules is processed?).

For mine the common (natural?) ordering seems to be temp=hwmon0 and fan=hwmon1. That also follows their i2c device number ordering (0-003e versus 0-0048).

Are you sure you've seen swaps other than after initial configuration? I wonder if sensors-detect, etc might have unloaded and reloaded the kernel modules in an unnatural ordering which was then picked up in /etc/fancontrol. But maybe normal boots of the system do have deterministic ordering? Or maybe that's just wishful thinking wink It could obviously be fixed during boot with a script but that seems pretty ugly.

-Jeff

Offline

 

#3 2011-01-18 10:44:14

RoganDawes
Member
Registered: 2010-07-01
Posts: 44

Re: Debian on DNS323 loses fan config?

jdoering wrote:

I haven't played too much but definitely saw the fatal swap one reboot after configuring this. I can see that by manually unloading and reloading the lm75 and g760a modules. However I'm not sure what's controlling the startup load ordering and why it would swap (or if they race each other). It doesn't look like /etc/modules (modified by sensors-detect) matters much (it didn't add g760a at all and putting that plus lm75 in there seems to have no bearing on the ordering - I'm assuming they're autoloading before /etc/modules is processed?).

For mine the common (natural?) ordering seems to be temp=hwmon0 and fan=hwmon1. That also follows their i2c device number ordering (0-003e versus 0-0048).

Are you sure you've seen swaps other than after initial configuration? I wonder if sensors-detect, etc might have unloaded and reloaded the kernel modules in an unnatural ordering which was then picked up in /etc/fancontrol. But maybe normal boots of the system do have deterministic ordering? Or maybe that's just wishful thinking wink It could obviously be fixed during boot with a script but that seems pretty ugly.

-Jeff

Hey Jeff,

Sorry to take so long getting back to this. My NAS has been up all this time, and has not been given the opportunity to screw me around by changing the order of the sensors. That is, until a couple of days ago . . . .

It seems that there IS a race condition with the loading of the lm75 and g760a modules, and as a result, the order of the sensors can change from hwmon0 to hwmon1 and vice versa.

My current attempt to fix this has been to add the following lines to /etc/modules:

Code:

g760a
lm75

I'm hoping that this will make it deterministic, and ensure that the sensors stop changing their order. I chose this order to correspond with my current /etc/fancontrol file, but I think the actual order is not material. Just run pwmconfig afterwards, to use the actual settings.

Regards,

Rogan

Offline

 

#4 2011-01-24 12:37:56

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Debian on DNS323 loses fan config?

this has been reported long time ago, people usually circumvent it by sth like:
if [ -f /sys/class/hwmon/hwmon0/device/temp1_input ]; then
        ln -sf /etc/fancontrol.0 /etc/fancontrol
else
        ln -sf /etc/fancontrol.1 /etc/fancontrol
fi

inside /etc/init.d/fancontrol

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB