Unified LSMONITOR for Debian System in LinkStation LS421DE

You have done replacing Buffalo stock firmware with Debian, the last part is to adjust the hardware behavior to match the new operating system.

This work initially done by Sergej Wildemann for LinkStation Live V2 with my modification for LinkStation LS421DE for both Buffalo kernel and vanilla one.

What's LSMONITOR jobs:

  • Controlling LED according to the current state (booting, power off, etc).
  • Monitor the temperature of HDDs and adjust the fan speed according.
  • Monitor power off switch and initiate shutdown when power switch position is off.

Installation

Do the following commands on your LinkStation LS421DE. If you have installed previous lsmonitor init script just remove it first:

$ update-rc.d lsmonitor stop
$ update-rc.d lsmonitor remove

Get init script and extract:

$ wget https://github.com/tohenk/linkstation-mod/raw/master/lsmonitor/lsmonitor-unified.tar.gz
$ tar -xvf lsmonitor-unified.tar.gz -C /

Install required packages:

$ apt-get install smartmontools hdparm evtest

Enable init script:

$ update-rc.d lsboot defaults
$ update-rc.d lsmonitor defaults

Restart LinkStation LS421DE to take effect.

10 Comments

  1. root@LS421DE:~# wget https://github.com/tohenk/linkstation-mod/raw/master/lsmonitor/lsmonitor-unified.tar.gz
    –2017-09-01 21:13:10– https://github.com/tohenk/linkstation-mod/raw/master/lsmonitor/lsmonitor-unified.tar.gz
    Resolving github.com (github.com)… 192.30.253.113, 192.30.253.112
    Connecting to github.com (github.com)|192.30.253.113|:443… connected.
    ERROR: The certificate of `github.com’ is not trusted.
    ERROR: The certificate of `github.com’ hasn’t got a known issuer.

  2. After install (via serial console)

    82: /etc/init.d/lsmonitor: fan_speed: not found
    82: /etc/init.d/lsmonitor: fan_speed: not found
    82: /etc/init.d/lsmonitor: fan_speed: not found
    82: /etc/init.d/lsmonitor: fan_speed: not found
    82: /etc/init.d/lsmonitor: fan_speed: not found

    and more…. more

  3. LS421 uses Nidec U60R12MHAB-5* fan with max 3800 rpm

  4. Why
    echo 3250 > /sys/devices/platform/gpio-fan/hwmon/hwmon0/fan1_target
    its SLOW speed
    echo 1500 > /sys/devices/platform/gpio-fan/hwmon/hwmon0/fan1_target
    its MIDDLE speed
    echo 5000 > /sys/devices/platform/gpio-fan/hwmon/hwmon0/fan1_target
    Full speed
    echo 0 > /sys/devices/platform/gpio-fan/hwmon/hwmon0/fan1_target
    Stop fan
    kernel 4.9.47 Linaro GCC 7.1-2017.08

  5. in scripts ls-functions and ls-functions-vanilla error
    0)
    FAN_SPEED=$SPEED_STOP
    ;;
    1)
    FAN_SPEED=$SPEED_SLOW
    ;;
    2)
    FAN_SPEED=$SPEED_FAST << FAST
    ;;
    3)
    FAN_SPEED=$SPEED_FULL

    and ls-functions-vanilla

    SPEED_STOP=0
    SPEED_SLOW=1500
    SPEED_HIGH=3250 <<HIGH
    SPEED_FULL=5000

  6. in kernel 4.12.14 too
    echo 3250 > /sys/class/hwmon/hwmon1/fan1_target
    its SLOW speed
    echo 1500 > /sys/class/hwmon/hwmon1/fan1_target
    its MIDDLE speed

  7. in kernel 4.13.3 too
    echo 3250 > /sys/class/hwmon/hwmon1/fan1_target
    its SLOW speed
    echo 1500 > /sys/class/hwmon/hwmon1/fan1_target
    its MIDDLE speed

  8. Viggo Simonsen

    I installed Debian Buzzy on my Buffalo Linkstation LS-GL – and I just cannot see any fan driver kernel modules loaded – so there is nothing this script can control. Also, since the installation, the NAS has started to beep intermittently, followed by a few seconds of full fan speed – but suddenly, it will start beeping incessantly and go into some emergency mode, where it cannot be accessed – but also is not fully powered off.

    My guess is that it is a overheating response, since the fan doesn’t start at all when the NAS is powered on. It does come on once in a while, but most of the time it is off. The box never gets very hot, since I have a SSD installed in it. The CPU itself is fan-less

    Any suggestions ?

    BR
    /Viggo

Leave a Reply