WARNING: 0.1RC5 displays error about fan speed on DNS-321-rev-A and DNS-323-rev-C

1,763 views
Skip to first unread message

Gary Dobbins

unread,
Jun 25, 2016, 4:11:01 PM6/25/16
to al...@googlegroups.com
[Edited: this is a real issue, not just cosmetic. Read how to fix some posts bellow]

Minor prob, possibly only cosmetic.

After upgrading from RC4.1 to RC5, and the status page includes an error related to retrieving the fan speed:
"cat: can't open '/tmp/sys/fan1_input': No such file or directory expr: syntax error sh: bad number sh: bad number sh: bad number"

I shelled in, and altered the symlink in /tmp/sys to point instead to /sys/class/hwmon/hwmon0/device/fan1_input
And it cures the display problem. (the change was the additional directory, '/device/', in the path.)

Editing /etc/init.d/rcS to correct the creation of the symlink seemed right, but the edit didn't stick (and I don't know where the root filesystem is actually persisted).


João Cardoso

unread,
Jun 25, 2016, 4:52:11 PM6/25/16
to Alt-F


On Saturday, 25 June 2016 21:11:01 UTC+1, Gary Dobbins wrote:
Minor prob, possibly only cosmetic.

After upgrading from RC4.1 to RC5, and the status page includes an error related to retrieving the fan speed:
"cat: can't open '/tmp/sys/fan1_input': No such file or directory expr: syntax error sh: bad number sh: bad number sh: bad number"

I shelled in, and altered the symlink in /tmp/sys to point instead to /sys/class/hwmon/hwmon0/device/fan1_input
And it cures the display problem. (the change was the additional directory, '/device/', in the path.)

Are the other symlinks in /tmp/sys/ valid or broken?
On a DNS-323-rev-B1 (that should be equivalent to the DNS-321) the right links are:

[root@DNS-323]# ls -l /tmp/sys/
total 0
lrwxrwxrwx    1 root     root            34 Jan  1  1970 fan1_input -> /sys/class/hwmon/hwmon0/fan1_input
lrwxrwxrwx    1 root     root            26 Jan  1  1970 left_led -> /sys/class/leds/left:amber
lrwxrwxrwx    1 root     root            26 Jan  1  1970 power_led -> /sys/class/leds/power:blue
lrwxrwxrwx    1 root     root            28 Jan  1  1970 pwm1 -> /sys/class/hwmon/hwmon0/pwm1
lrwxrwxrwx    1 root     root            27 Jan  1  1970 right_led -> /sys/class/leds/right:amber
lrwxrwxrwx    1 root     root            35 Jan  1  1970 temp1_input -> /sys/class/hwmon/hwmon1/temp1_input

The pwm1 and temp1_input links should be correct, or no fan control will be done.


Editing /etc/init.d/rcS to correct the creation of the symlink seemed right, but the edit didn't stick (and I don't know where the root filesystem is actually persisted).

The rootfs is read only, can't be changed, and rcS runs too early, so aufs is not yet available.

 If you can reproduce the issue consistently after a reboot, the only cure is to fix that in the user boot script, Services->User, user, Configure, and to specify a script resident on disk, such as /mnt/sda4/userboot.sh that fixes the issue.
Use the Edit button to have a skeleton script that you can modify, then Submit. Something like:

case "$1" in
start)
echo "Starting $0"
ln -sf  /sys/class/hwmon/hwmon0/device/fan1_input  /tmp/sys/fan1_input # create the correct symlink
rcsysctrl restart # restart sysctrl, in case it has stopped itself because of the missing file.
;;

And don't forget to "save settings"
Thanks.

Gary Dobbins

unread,
Jun 25, 2016, 9:05:30 PM6/25/16
to al...@googlegroups.com
Thanks for your prompt and helpful reply.

It is reproducible. The other symlinks in /tmp/sys appear to be valid (though pwm1 does not appear to be a link - perhaps its a hardlink).

Any reason why I can't just remount as rw and edit (on whatever persistent storage it's kept in) the line in the original /etc/init.d/rcS which seems to be responsible for creating the errant link?

João Cardoso

unread,
Jun 26, 2016, 10:19:49 AM6/26/16
to al...@googlegroups.com


On Sunday, 26 June 2016 02:05:30 UTC+1, Gary Dobbins wrote:
Thanks for your prompt and helpful reply.

It is reproducible. The other symlinks in /tmp/sys appear to be valid (though pwm1 does not appear to be a link - perhaps its a hardlink).

No, it *should* be a softlink. Try the following:

for i in /tmp/sys/*; do realpath $i; done

/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/hwmon/hwmon0/fan1_input
/sys/devices/platform/leds-gpio/leds/left:amber
/sys/devices/platform/leds-gpio/leds/power:blue
/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/hwmon/hwmon0/pwm1
/sys/devices/platform/leds-gpio/leds/right:amber
/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-0048/hwmon/hwmon1/temp1_input

This applies to a DNS-323, and in other boxes they point to different places. The /tmp/sys folder is a way to uniformize access on different boxes.
On the DNS-323/321, the kernel used until RC5 mapped those devices in the same place, but it seems that that is not working that way with the new kernel.
It looks like the DNS-321 has some issues with RC5 regarding devices such as fan/temperature. How about leds and buttons? Are they working?

If the pwm1/temp symlinks are not pointing to the right place, you have no fan/temperature control! 
Please read the rcS code between lines 202 to 238, as you seem to be able to do that, and please post the right links for all devices (using the /sys/class/ hierarchy and not the /sys/devices/platform one).
Only that way I can fix that (I don't have a DNS-321 myself, so I have to rely on users feedback contributions)

Try the following script:

for i in pwm1 temp1_input fan1_input; do
 find
/sys/class/ -follow -maxdepth 4 -name $i
done


On a DNS-323-rev-B1 this results in:

/sys/class/hwmon/hwmon0/pwm1
/sys/class/hwmon/hwmon1/temp1_input
/sys/class/hwmon/hwmon0/fan1_input


Any reason why I can't just remount as rw and edit (on whatever persistent storage it's kept in) the line in the original /etc/init.d/rcS which seems to be responsible for creating the errant link?

It's complicated. The rootfs is a squashfs filesystem, which is read-only by nature; in addition it is in flash memory, meaning that even if not read-only the whole flash would have to be rewritten -- a firmware reflash.

See the /init script: First /dev/mtdblock3 (the flash memory fourth "partition") is loop mounted as /dev/loop0, then to allow changes to it if becomes part of a aufs branch, whose rw branch is on memory and keeps the changes to the ro branch (while power is on)

        losetup -o64 /rootmnt/dev/loop0 /rootmnt/dev/mtdblock3
        mount -r /rootmnt/dev/loop0 /rootmnt/ro
        mount -t aufs -o br:/rootmnt/rw:/rootmnt/ro aufs /newroot
        mount --move /rootmnt /newroot/rootmnt

as a result, the 'mount' command returns:

/rootmnt/dev/loop0 on /rootmnt/ro type squashfs (ro,relatime)

When disks become available, if an Alt-F folder is found in one of its filesystems, it is made part of the aufs "tree", allowing non-volatile changes.
You can see that using the 'aufs.sh -l' command:

[root@DNS-323]# aufs.sh -l
aufs on / type aufs (rw,relatime,si=8a97908e) # /, root, this is how it looks to users
/mnt/sda4/Alt-F=rw # latter modifications go to here, on disk, but latter on the boot process
/rootmnt/rw=rw # early modifications go to here, in memory
/rootmnt/ro=rr # flash memory, read-only at the lower branch

Remember that Alt-F is not resident on disk! It's not like a normal linux distro, it's more like a CD/DVD live distro.

Gary Dobbins

unread,
Jun 26, 2016, 1:39:29 PM6/26/16
to Alt-F
Here's what I have:

[root@dns321]# for i in /tmp/sys/*; do realpath $i; done
/sys/devices/platform/dns323c-fan.0/fan1_input
/sys/devices/platform/leds-gpio/leds/left:amber
/sys/devices/platform/leds-gpio/leds/power:blue
/tmp/sys/pwm1
/sys/devices/platform/leds-gpio/leds/right:amber
/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-0048/hwmon/hwmon1/temp1_input

And here's what the filesystem believes is there:

lrwxrwxrwx    1 root     root            35 Dec 31  1969 temp1_input -> /sys/class/hwmon/hwmon1/temp1_input
lrwxrwxrwx    1 root     root            27 Dec 31  1969 right_led -> /sys/class/leds/right:amber/
lrwxrwxrwx    1 root     root            26 Dec 31  1969 power_led -> /sys/class/leds/power:blue/
lrwxrwxrwx    1 root     root            26 Dec 31  1969 left_led -> /sys/class/leds/left:amber/
lrwxrwxrwx    1 root     root            41 Jun 25 21:15 fan1_input -> /sys/class/hwmon/hwmon0/device/fan1_input
drwxr-xr-x    2 root     root           160 Jun 25 21:15 ./
-rw-r--r--    1 root     root             4 Jun 25 21:15 pwm1
drwxrwxrwt   10 root     root           260 Jun 26 00:02 ../

[root@dns321]# for i in pwm1 temp1_input fan1_input; do
>  find /sys/class/ -follow -maxdepth 4 -name $i
> done
/sys/class/hwmon/hwmon0/device/pwm1
/sys/class/hwmon/hwmon1/temp1_input
/sys/class/hwmon/hwmon0/device/fan1_input

I'm not sure how to properly recognize the correct target items, and do see that one of them currently points through a path named for the 323 model, but that one does seem to contain a valid value (3000).

From rcS it appears that /tmp/sys/pwm1 is being created by the 'touch' (after both if's fail) or by the 'echo 127...' near line 235. I re-created it as a link to /sys/class/hwmon/hwmon0/device/pwm1, but then it behaves as if read-only, so my fan speed never changes.

[root@dns321]# cat /tmp/sys/pwm1
63
[root@dns321]# echo 127 > /tmp/sys/pwm1
[root@dns321]# cat /tmp/sys/pwm1
63

Gary Dobbins

unread,
Jun 26, 2016, 1:48:44 PM6/26/16
to Alt-F
Correction: Echoing various values to /tmp/sys/pwm1 (when it exists as a link to /sys/class/hwmon/hwmon0/device/pwm1) *does* affect the fan speed.

I will add this correction to the patch script.

Gary Dobbins

unread,
Jun 26, 2016, 2:04:26 PM6/26/16
to Alt-F
At this point, the user patch script reads as follows, and all three temp/speed/pwm links seem to work as intended.

#!/bin/sh

# Script to execute as the root user at boot time.
# You can loose your data or make the system inaccessible
# if using the wrong commands. You have been warned!
 
exec >> /var/log/user.log 2>&1

case "$1" in
start)
echo "Starting $0"
ln -sf /sys/class/hwmon/hwmon0/device/fan1_input  /tmp/sys/fan1_input # create the correct symlink
rm /tmp/sys/pwm1
ln -sf /sys/class/hwmon/hwmon0/device/pwm1 /tmp/sys/pwm1
rcsysctrl restart # restart sysctrl, in case it has stopped itself because of the missing file.
;;
stop)
echo "Stopping $0"
;;
esac

João Cardoso

unread,
Jun 26, 2016, 5:14:43 PM6/26/16
to Alt-F
The ones listed just above are the ones to use.
Thanks!
 
and do see that one of them currently points through a path named for the 323 model, but that one does seem to contain a valid value (3000).

From rcS it appears that /tmp/sys/pwm1 is being created by the 'touch' (after both if's fail) or by the 'echo 127...' near line 235. I re-created it as a link to /sys/class/hwmon/hwmon0/device/pwm1, but then it behaves as if read-only, so my fan speed never changes.

That's 'sysctrl' working in the background and overriding your settings. It reads the temperature from temp1_input (in mili Celsius) and adjusts the fan speed writing to pwm1

João Cardoso

unread,
Jun 26, 2016, 5:18:31 PM6/26/16
to Alt-F
All users with a DNS-321-rev-A1 need to do the same.  The final fix needs a new Alt-F release

Thanks.

Wayno

unread,
Jun 28, 2016, 10:31:25 PM6/28/16
to Alt-F
Gary,
I don't meet to hijack your thread but João Cardoso told me to refer to it since he thinks my issue is related.  I also have a 321 but after upgrading to RC5 (from RC4) my status page is blank.  Did you also experience this?  Seems like you were just missing some of the items per your OP.  Also, did you do anything aside from just simply flashing the updated firmware like clearing all settings, etc?  Not sure why my unit would be behaving differently from yours.  Thanks!

Gary Dobbins

unread,
Jun 28, 2016, 11:12:14 PM6/28/16
to al...@googlegroups.com
Mine appeared entirely normal after the upgrade, with the exception of the fan speed (zero) on the status page, and a text warning above it which I quoted in the OP.

Sorry your upgrade didn't fare as well. I'm so grateful for Alt-F, else this box would just be wasting away as landfill.

--
You received this message because you are subscribed to a topic in the Google Groups "Alt-F" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alt-f/EFlFvezbT1w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alt-f+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/alt-f.
For more options, visit https://groups.google.com/d/optout.



--
   Gary Dobbins

First Last

unread,
Jun 30, 2016, 10:59:26 AM6/30/16
to al...@googlegroups.com
Hi, my box is DNS-323 C1

Fan speed only displaying percentage "%"


cat: can't open '/tmp/sys/fan1_input': No such file or directory expr: syntax error sh: bad number sh: bad number sh: bad number

[root@box]# ls -l /tmp/sys/
total 4
lrwxrwxrwx    1 root     root            34 Jan  1  1970 fan1_input -> /sys/class/hwmon/hwmon1/fan1_input
lrwxrwxrwx    1 root     root            26 Jan  1  1970 left_led -> /sys/class/leds/left:amber
lrwxrwxrwx    1 root     root            26 Jan  1  1970 power_led -> /sys/class/leds/power:blue
-rw-r--r--    1 root     root             4 Jun 30 14:45 pwm1
lrwxrwxrwx    1 root     root            27 Jan  1  1970 right_led -> /sys/class/leds/right:amber
lrwxrwxrwx    1 root     root            35 Jan  1  1970 temp1_input -> /sys/class/hwmon/hwmon1/temp1_input
[root@box]# for i in /tmp/sys/*; do realpath $i; done
realpath: /tmp/sys/fan1_input: No such file or directory

/sys/devices/platform/leds-gpio/leds/left:amber
/sys/devices/platform/leds-gpio/leds/power:blue
/tmp/sys/pwm1
/sys/devices/platform/leds-gpio/leds/right:amber
/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-0048/hwmon/hwmon1/temp1_input
[root@box]#

Is there any fix? or should I downgrade to RC4.

Thanks

--
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+un...@googlegroups.com.

Visit this group at https://groups.google.com/group/alt-f.
For more options, visit https://groups.google.com/d/optout.



--
ZerO13th

Gary Dobbins

unread,
Jun 30, 2016, 12:10:57 PM6/30/16
to al...@googlegroups.com
Have you tried the fix provided to me? It seems to work great. Be sure to use the entire revised script (the one that fixed two links) as shown in the previous messages. 
--
Gary Dobbins
(sent from the phone; typos due to fat thumbs and autocorrect)

João Cardoso

unread,
Jun 30, 2016, 2:16:46 PM6/30/16
to Alt-F


On Thursday, 30 June 2016 15:59:26 UTC+1, zero13th wrote:
Hi, my box is DNS-323 C1

Fan speed only displaying percentage "%"

cat: can't open '/tmp/sys/fan1_input': No such file or directory expr: syntax error sh: bad number sh: bad number sh: bad number

[root@box]# ls -l /tmp/sys/
total 4
lrwxrwxrwx    1 root     root            34 Jan  1  1970 fan1_input -> /sys/class/hwmon/hwmon1/fan1_input
lrwxrwxrwx    1 root     root            26 Jan  1  1970 left_led -> /sys/class/leds/left:amber
lrwxrwxrwx    1 root     root            26 Jan  1  1970 power_led -> /sys/class/leds/power:blue
-rw-r--r--    1 root     root             4 Jun 30 14:45 pwm1
lrwxrwxrwx    1 root     root            27 Jan  1  1970 right_led -> /sys/class/leds/right:amber
lrwxrwxrwx    1 root     root            35 Jan  1  1970 temp1_input -> /sys/class/hwmon/hwmon1/temp1_input
[root@box]# for i in /tmp/sys/*; do realpath $i; done
realpath: /tmp/sys/fan1_input: No such file or directory
/sys/devices/platform/leds-gpio/leds/left:amber
/sys/devices/platform/leds-gpio/leds/power:blue
/tmp/sys/pwm1
/sys/devices/platform/leds-gpio/leds/right:amber
/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-0048/hwmon/hwmon1/temp1_input
[root@box]#

Is there any fix? or should I downgrade to RC4.

oSo the 323-rev-C1 seems to suffer from a similar problem (DNS-323-rev-A1/B1 was tested by myself and are OK).
From the output the issue is in the fan1_input and the pwm1 values.

Notice that the fix for each model-rev might be different from other model-rev. You have to find the right values yourself.

The relevant values that should go to the script are (at least) the ones output from

for i in pwm1 temp1_input fan1_input; do
find
/sys/class/ -follow -maxdepth 4 -name $i
done


Please provide feedback, so I can add that it as know bug and point the fix to the right place.
 

Thanks

On Wed, Jun 29, 2016 at 10:11 AM, Gary Dobbins  wrote:
Mine appeared entirely normal after the upgrade, with the exception of the fan speed (zero) on the status page, and a text warning above it which I quoted in the OP.

Sorry your upgrade didn't fare as well. I'm so grateful for Alt-F, else this box would just be wasting away as landfill.
On Tue, Jun 28, 2016 at 10:31 PM, Wayno  wrote:
Gary,
I don't meet to hijack your thread but João Cardoso told me to refer to it since he thinks my issue is related.  I also have a 321 but after upgrading to RC5 (from RC4) my status page is blank.  Did you also experience this?  Seems like you were just missing some of the items per your OP.  Also, did you do anything aside from just simply flashing the updated firmware like clearing all settings, etc?  Not sure why my unit would be behaving differently from yours.  Thanks!

On Sunday, June 26, 2016 at 2:04:26 PM UTC-4, Gary Dobbins wrote:
At this point, the user patch script reads as follows, and all three temp/speed/pwm links seem to work as intended.

#!/bin/sh

# Script to execute as the root user at boot time.
# You can loose your data or make the system inaccessible
# if using the wrong commands. You have been warned!
 
exec >> /var/log/user.log 2>&1

case "$1" in
start)
echo "Starting $0"
ln -sf /sys/class/hwmon/hwmon0/device/fan1_input  /tmp/sys/fan1_input # create the correct symlink
rm /tmp/sys/pwm1
ln -sf /sys/class/hwmon/hwmon0/device/pwm1 /tmp/sys/pwm1
rcsysctrl restart # restart sysctrl, in case it has stopped itself because of the missing file.
;;
stop)
echo "Stopping $0"
;;
esac

--
You received this message because you are subscribed to a topic in the Google Groups "Alt-F" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alt-f/EFlFvezbT1w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alt-f+unsubscribe@googlegroups.com.

Visit this group at https://groups.google.com/group/alt-f.
For more options, visit https://groups.google.com/d/optout.



--
   Gary Dobbins

--
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+unsubscribe@googlegroups.com.

Visit this group at https://groups.google.com/group/alt-f.
For more options, visit https://groups.google.com/d/optout.



--
ZerO13th

First Last

unread,
Jul 2, 2016, 2:24:17 AM7/2/16
to al...@googlegroups.com
Gary's patch did resolved the issue (Thanks Gary), but I need  to run the patch manually after every reboot.

user custom script seems doesn't work.


[root@box]# ls -la /usr/www/cgi-bin/fix-fan
-rwxr--r--    1 root     root           460 Jul  2 06:14 /usr/www/cgi-bin/fix-fan
[root@box]# cat /usr/www/cgi-bin/fix-fan
#!/bin/sh

# Script to execute as the root user at boot time.
# You can loose your data or make the system inaccessible
# if using the wrong commands. You have been warned!

exec >> /var/log/user.log 2>&1

case "$1" in
        start)
                echo "Starting $0"
                ln -sf /sys/class/hwmon/hwmon0/device/fan1_input /tmp/sys/fan1_input
                rm /tmp/sys/pwm1
                ln -sf /sys/class/hwmon/hwmon0/device/pwm1 /tmp/sys/pwm1
                rcsysctrl restart
                ;;
        stop)
                echo "Stopping $0"
                ;;
esac
[root@box]#


Gary Dobbins

unread,
Jul 2, 2016, 9:12:04 AM7/2/16
to al...@googlegroups.com
Did you remember to 'Save Settings' after setting up the patch?

I almost forgot, thinking "this is not a setting" but then I remembered the original note from Joao about it.

--
You received this message because you are subscribed to a topic in the Google Groups "Alt-F" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alt-f/EFlFvezbT1w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alt-f+un...@googlegroups.com.

Visit this group at https://groups.google.com/group/alt-f.
For more options, visit https://groups.google.com/d/optout.



--
   Gary Dobbins

João Cardoso

unread,
Jul 2, 2016, 11:20:23 AM7/2/16
to Alt-F


On Saturday, 2 July 2016 07:24:17 UTC+1, zero13th wrote:
Gary's patch did resolved the issue (Thanks Gary), but I need  to run the patch manually after every reboot.

The right method is using the user boot script, described a few posts above:

If you can reproduce the issue consistently after a reboot, the only cure is to fix that in the user boot script, Services->User, user, Configure, and to specify a script resident on disk, such as /mnt/sda4/userboot.sh that fixes the issue.
Use the Edit button to have a skeleton script that you can modify, then Submit. Something like: 
 
Using the Submit button in the webUI sets the script right permissions. By default, the user init script Services->User, user, is Boot Enabled and  executes your own script.
As Gary says, you have to "save settings", so that the folder path and script name is recorded in flash memory.


user custom script seems doesn't work.


[root@box]# ls -la /usr/www/cgi-bin/fix-fan

That is not a "good" place to save the script, as it is for system usage and you will easily forgot the script existence or path.
My advise is to save it on the root of any filesystem, e.g., the same filesystem where you have the Alt-F folder (not a requirement), or a users home folder, 

Matt Kasdorf

unread,
Jul 2, 2016, 12:47:43 PM7/2/16
to Alt-F
Total noob here...

Haven't read this whole thread, yet; but I have the same issue with a DNS-323 C1.

I'm also getting this error message:

This is a frontend to ipkg. Use it always!
Usage:
    ipkg -install [<mount_point>]
    ipkg -clean
    ipkg -help
    ipkg standard ipkg command

ipkg is not installed, install using the webUI.

but I am using the browser interface.

João Cardoso

unread,
Jul 6, 2016, 2:42:56 PM7/6/16
to Alt-F, zero...@gmail.com


On Saturday, 2 July 2016 07:24:17 UTC+1, zero13th wrote:
Gary's patch did resolved the issue (Thanks Gary), but I need  to run the patch manually after every reboot.

Zero13th, can you please post the output of the following commands on your DNS-323-rev-C box?

for i in fan1_input pwm1 temp1_input; do find /sys/class/ -follow -maxdepth 4 -name $i; done

Thanks

Matt Kasdorf

unread,
Jul 7, 2016, 9:50:05 PM7/7/16
to Alt-F
I can reply with my C1 results:

/sys/class/hwmon/hwmon0/device/fan1_input
/sys/class/hwmon/hwmon0/device/pwm1
/sys/class/hwmon/hwmon1/device/temp1_input

Message has been deleted

João Cardoso

unread,
Jul 8, 2016, 1:19:39 PM7/8/16
to Alt-F
Thanks! 

AvivNet

unread,
Jul 24, 2016, 1:11:37 PM7/24/16
to Alt-F
Hi,
I'm having a problems with the new version 0.1RC5 from 0.1RC4.1. My box is DNS-321 A2
Since the upgrade, status page is blank, Performance issues in streaming videos (picture freeze while sound is ok)..
I tried to go back to previous version but I can't upload the file.. I get error after uploading 5-6%..
Any ideas ?

Thanks, Aviv.

בתאריך יום שבת, 25 ביוני 2016 בשעה 23:11:01 UTC+3, מאת Gary Dobbins:

AvivNet

unread,
Jul 24, 2016, 4:40:36 PM7/24/16
to Alt-F
I managed to fix the problems using some of the ideas I found on this forum..
I used this script:
#!/bin/sh

# Script to execute as the root user at boot time.
# You can loose your data or make the system inaccessible
# if using the wrong commands. You have been warned!
 
exec >> /var/log/user.log 2>&1

case "$1" in
start)
echo "Starting $0"
ln -sf /sys/class/hwmon/hwmon0/device/fan1_input  /tmp/sys/fan1_input # create the correct symlink
rm /tmp/sys/pwm1
ln -sf /sys/class/hwmon/hwmon0/device/pwm1 /tmp/sys/pwm1
rcsysctrl restart # restart sysctrl, in case it has stopped itself because of the missing file.
;;
stop)
echo "Stopping $0"
;;
esac

to make the fan work again also fixed the status page :)
In order to fix the picture freeze while streaming videos issue I installed ethtool 3.7.1 from the Alt-F unstable packages and added the next line:
/Alt-F/usr/sbin/ethtool -K eth0 tso off to the script above.
Then, connected to my box via ssh using the putty.exe tool and typed the next line:
ethtool --show-offload eth0 | grep tcp-segmentation
I got the message:
tcp-segmentation-offload: off
        tx-tcp-segmentation: off
Then checked again the video streaming and it was perfect :)
I managed to fix it thanks to João Cardoso and Gary Dobbins comments.
Hope you make a new fix for the rest of us who aren't expert.. :)

בתאריך יום ראשון, 24 ביולי 2016 בשעה 20:11:37 UTC+3, מאת AvivNet:

James Pike

unread,
Oct 23, 2016, 4:19:52 PM10/23/16
to Alt-F
I too have a DNS-323 (and 325, but that works great with RC5), and am having the issue with the fan speed not working. I tried Gary's startup fix, but it didn't fix it. I still get the following error:

cat: can't open '/tmp/sys/fan1_input': No such file or directory expr: syntax error sh: bad number sh: bad number sh: bad number

What am I doing wrong here?

Thomas FRANCAIS

unread,
Oct 24, 2016, 3:43:39 AM10/24/16
to Alt-F

Dear All,
I'm running RC5 on a 320L and the status page doesn't show anything about fan and temperature.
Referring to João answer I've tried to look at /sys/class/hwmon/ folder but it is empty. How can I fill it or which folder should I use instead ?
Regards,
Thomas
 

João Cardoso

unread,
Oct 24, 2016, 11:39:47 AM10/24/16
to Alt-F


On Monday, 24 October 2016 08:43:39 UTC+1, Thomas FRANCAIS wrote:

Dear All,
I'm running RC5 on a 320L and the status page doesn't show anything about fan and temperature.

Please read the "data corruption on RC5" topic and apply the fix.

João Cardoso

unread,
Oct 24, 2016, 12:03:07 PM10/24/16
to Alt-F


On Sunday, 23 October 2016 21:19:52 UTC+1, James Pike wrote:
I too have a DNS-323

A rev-C box? What does 'cat /tmp/board' says?

Try the following, at the command line, and post its output

rcsysctrl stop
for i in fan1_input temp1_input pwm1; do
 j=$(find /sys/class/ -follow -maxdepth 4 -name $i)
 if test -n "$j"; then
  ln -sf $j /tmp/sys/$i
 else
  echo 0 > /tmp/sys/$i
 fi
done
rcsysctrl start

ls -l /tmp/sys/


That is the code that will be used for the next release, so I would appreciate if users of the DNS-321 experiment it also.

If it works, you can replace what you have added in the user boot script regarding the fan1_input, temp1_input and pwm1 with the above code (excluding the last 'ls -l /tmp/sys' line)

 
(and 325, but that works great with RC5), and am having the issue with the fan speed not working. I tried Gary's startup fix, but it didn't fix it. I still get the following error:

cat: can't open '/tmp/sys/fan1_input': No such file or directory expr: syntax error sh: bad number sh: bad number sh: bad number

 

What am I doing wrong here?

You didn't do anything wrong, I did. But I don't have a 323-rev-C nor a DNS-321 to try with.
 

João Cardoso

unread,
Oct 25, 2016, 2:26:01 PM10/25/16
to Alt-F


On Monday, 24 October 2016 16:39:47 UTC+1, João Cardoso wrote:


On Monday, 24 October 2016 08:43:39 UTC+1, Thomas FRANCAIS wrote:

Dear All,
I'm running RC5 on a 320L and the status page doesn't show anything about fan and temperature.

Please read the "data corruption on RC5" topic and apply the fix.

Sorry, I might have misread your post.
You should nevertheless read the "data corruption on RC5" topic and apply the fix.

Does the Status page shows any information or is it blank? or only the fan and temperature is values are missing? Please attach a screen shot.
 

Referring to João answer I've tried to look at /sys/class/hwmon/ folder but it is empty. How can I fill it or which folder should I use instead ?


The DNS-320L-rev-Ax does not contains anything under /sys/class/hwmon/, but the values at /tmp/sys should be setup ok.
Specifically on the DNS-320L-rev-A (the values are **different** for *other* box model/rev), they should be:

/ # ls -l /tmp/sys/
total 12
-rw-r--r--    1 root     root             5 Oct 25 19:11 fan1_input
lrwxrwxrwx    1 root     root            33 Jan  1  1970 left_led -> /sys/class/leds/dns320l:red:sata0
lrwxrwxrwx    1 root     root            28 Jan  1  1970 power_button -> /sys/class/gpio/gpio29/value
drwxr-xr-x    2 root     root            80 Jan  1  1970 power_led
-rw-r--r--    1 root     root             4 Oct 25 19:10 pwm1
lrwxrwxrwx    1 root     root            33 Jan  1  1970 right_led -> /sys/class/leds/dns320l:red:sata1
-rw-r--r--    1 root     root             6 Oct 25 19:11 temp1_input
lrwxrwxrwx    1 root     root            32 Jan  1  1970 usb2_led -> /sys/class/leds/dns320l:blue:usb
lrwxrwxrwx    1 root     root            34 Jan  1  1970 usb_led -> /sys/class/leds/dns320l:orange:usb


Regards,
Thomas
 
Reply all
Reply to author
Forward
0 new messages