Dynamix - V6 Plugins


bonienl

3122 posts in this topic Last Reply

Recommended Posts

Just now, TexasUnraid said:

 

Agreed, this and for auto fan to automatically start when the unraid boots / the array is started.

 

I have to manually go into it and make a mundane change to get it to start.

 

Agreed as well!!

 

+1 for the Auto Start Option with Server or Array Start...

I'm using a custom script to check and/or restart like it was suggested here in the forums.

 

Would be great to get rid of this :D

Link to post
  • Replies 3.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

It has been some time since I visited the Unraid forums. Due to health issues I had to take a break, and unfortunately this break took way longer than anticipated. But I am back and will sta

Notice: You must be running unRAID version 6.1 or later to use these plugins The easiest way of installing plugins is thru Community Applications. This is an apps installation manager develope

Today has been a productive day   I have updated several Dynamix plugins, mainly bug fixes. Please check your plugins to get the updates.

Posted Images

20 minutes ago, locutus_lbc said:

 

Agreed as well!!

 

+1 for the Auto Start Option with Server or Array Start...

I'm using a custom script to check and/or restart like it was suggested here in the forums.

 

Would be great to get rid of this :D

 

Got a link to said script?

Link to post
1 hour ago, TexasUnraid said:

 

Got a link to said script?

 

or you might want to add a script like this to your custom script plugin and run it after array has started:

 

#!/bin/bash
/usr/local/emhttp/plugins/dynamix.system.autofan/scripts/rc.autofan 'start'

 

you can test it before in your console

 

kind regards

Edited by locutus_lbc
Link to post
5 minutes ago, locutus_lbc said:

 

or you might want to add something like this to your custom script which runs after array has started:

 


/usr/local/emhttp/plugins/dynamix.system.autofan/scripts/rc.autofan 'start'

 

you can test it before in your console

 

kind regards

 

Perfect, I have a script that runs at array start already, I will toss this in there.

Link to post
1 hour ago, locutus_lbc said:

 

I made something custom for my use case out of this template:

https://gist.github.com/kidpixo/04d61b42221f6bc8489b

 

Hi, thank you for the link.

 

I´m really bad on this, but I did try made some changes and the script put the PWM3 at 150 and show the error below:

"Script location: /tmp/user.scripts/tmpScripts/FanSpeed/script
Note that closing this window will abort the execution of this script
Linear PWM Range is 150 to 255 in 9 increments of 11

hdparm - get/set hard disk parameters - version v9.60, by Mark Lord.

clue=11
Usage: hdparm [options] [device ...]

Options:
-a Get/set fs readahead
-A Get/set the drive look-ahead flag (0/1)
-b Get/set bus state (0 == off, 1 == on, 2 == tristate)
-B Set Advanced Power Management setting (1-255)
-c Get/set IDE 32-bit IO setting
-C Check drive power mode status
-d Get/set using_dma flag
-D Enable/disable drive defect management
-E Set cd/dvd drive speed
-f Flush buffer cache for device on exit
-F Flush drive write cache
-g Display drive geometry
-h Display terse usage information
-H Read temperature from drive (Hitachi only)
-i Display drive identification
-I Detailed/current information directly from drive
-J Get/set Western DIgital "Idle3" timeout for a WDC "Green" drive (DANGEROUS)
-k Get/set keep_settings_over_reset flag (0/1)
-K Set drive keep_features_over_reset flag (0/1)
-L Set drive doorlock (0/1) (removable harddisks only)
-m Get/set multiple sector count
-M Get/set acoustic management (0-254, 128: quiet, 254: fast)
-n Get/set ignore-write-errors flag (0/1)
-N Get/set max visible number of sectors (HPA) (VERY DANGEROUS)
-p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P Set drive prefetch count
-q Change next setting quietly
-Q Get/set DMA queue_depth (if supported)
-r Get/set device readonly flag (DANGEROUS to set)
-R Get/set device write-read-verify flag
-s Set power-up in standby flag (0/1) (DANGEROUS)
-S Set standby (spindown) timeout
-t Perform device read timings
-T Perform cache read timings
-u Get/set unmaskirq flag (0/1)
-U Obsolete
-v Use defaults; same as -acdgkmur for IDE drives
-V Display program version and exit immediately
-w Perform device reset (DANGEROUS)
-W Get/set drive write-caching flag (0/1)
-x Obsolete
-X Set IDE xfer mode (DANGEROUS)
-y Put drive in standby mode
-Y Put drive to sleep
-z Re-read partition table
-Z Disable Seagate auto-powersaving mode
--dco-freeze Freeze/lock current device configuration until next power cycle
--dco-identify Read/dump device configuration identify data
--dco-restore Reset device configuration back to factory defaults
--dco-setmax Use DCO to set maximum addressable sectors
--direct Use O_DIRECT to bypass page cache for timings
--drq-hsm-error Crash system with a "stuck DRQ" error (VERY DANGEROUS)
--fallocate Create a file without writing data to disk
--fibmap Show device extents (and fragmentation) for a file
--fwdownload Download firmware file to drive (EXTREMELY DANGEROUS)
--fwdownload-mode3 Download firmware using min-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode3-max Download firmware using max-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode7 Download firmware using a single segment (EXTREMELY DANGEROUS)
--fwdownload-modee Download firmware using mode E (min-size segments) (EXTREMELY DANGEROUS)
--fwdownload-modee-max Download firmware using mode E (max-size segments) (EXTREMELY DANGEROUS)
--idle-immediate Idle drive immediately
--idle-unload Idle immediately and unload heads
--Iraw filename Write raw binary identify data to the specfied file
--Istdin Read identify data from stdin as ASCII hex
--Istdout Write identify data to stdout as ASCII hex
--make-bad-sector Deliberately corrupt a sector directly on the media (VERY DANGEROUS)
--offset use with -t, to begin timings at given offset (in GiB) from start of drive
--prefer-ata12 Use 12-byte (instead of 16-byte) SAT commands when possible
--read-sector Read and dump (in hex) a sector directly from the media
--repair-sector Alias for the --write-sector option (VERY DANGEROUS)
--sanitize-antifreeze-lock Block sanitize-freeze-lock command until next power cycle
--sanitize-block-erase Start block erase operation
--sanitize-crypto-scramble Change the internal encryption keys that used for used data
--sanitize-freeze-lock Lock drive's sanitize features until next power cycle
--sanitize-overwrite PATTERN Overwrite the internal media with constant PATTERN
--sanitize-status Show sanitize status information
--security-help Display help for ATA security commands
--set-sector-size Change logical sector size of drive
--trim-sector-ranges Tell SSD firmware to discard unneeded data sectors: lba:count ..
--trim-sector-ranges-stdin Same as above, but reads lba:count pairs from stdin
--verbose Display extra diagnostics from some commands
--write-sector Repair/overwrite a (possibly bad) sector directly on the media (VERY DANGEROUS)

/tmp/user.scripts/tmpScripts/FanSpeed/script: line 79: [: : integer expression expected

hdparm - get/set hard disk parameters - version v9.60, by Mark Lord.

clue=11
Usage: hdparm [options] [device ...]

Options:
-a Get/set fs readahead
-A Get/set the drive look-ahead flag (0/1)
-b Get/set bus state (0 == off, 1 == on, 2 == tristate)
-B Set Advanced Power Management setting (1-255)
-c Get/set IDE 32-bit IO setting
-C Check drive power mode status
-d Get/set using_dma flag
-D Enable/disable drive defect management
-E Set cd/dvd drive speed
-f Flush buffer cache for device on exit
-F Flush drive write cache
-g Display drive geometry
-h Display terse usage information
-H Read temperature from drive (Hitachi only)
-i Display drive identification
-I Detailed/current information directly from drive
-J Get/set Western DIgital "Idle3" timeout for a WDC "Green" drive (DANGEROUS)
-k Get/set keep_settings_over_reset flag (0/1)
-K Set drive keep_features_over_reset flag (0/1)
-L Set drive doorlock (0/1) (removable harddisks only)
-m Get/set multiple sector count
-M Get/set acoustic management (0-254, 128: quiet, 254: fast)
-n Get/set ignore-write-errors flag (0/1)
-N Get/set max visible number of sectors (HPA) (VERY DANGEROUS)
-p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P Set drive prefetch count
-q Change next setting quietly
-Q Get/set DMA queue_depth (if supported)
-r Get/set device readonly flag (DANGEROUS to set)
-R Get/set device write-read-verify flag
-s Set power-up in standby flag (0/1) (DANGEROUS)
-S Set standby (spindown) timeout
-t Perform device read timings
-T Perform cache read timings
-u Get/set unmaskirq flag (0/1)
-U Obsolete
-v Use defaults; same as -acdgkmur for IDE drives
-V Display program version and exit immediately
-w Perform device reset (DANGEROUS)
-W Get/set drive write-caching flag (0/1)
-x Obsolete
-X Set IDE xfer mode (DANGEROUS)
-y Put drive in standby mode
-Y Put drive to sleep
-z Re-read partition table
-Z Disable Seagate auto-powersaving mode
--dco-freeze Freeze/lock current device configuration until next power cycle
--dco-identify Read/dump device configuration identify data
--dco-restore Reset device configuration back to factory defaults
--dco-setmax Use DCO to set maximum addressable sectors
--direct Use O_DIRECT to bypass page cache for timings
--drq-hsm-error Crash system with a "stuck DRQ" error (VERY DANGEROUS)
--fallocate Create a file without writing data to disk
--fibmap Show device extents (and fragmentation) for a file
--fwdownload Download firmware file to drive (EXTREMELY DANGEROUS)
--fwdownload-mode3 Download firmware using min-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode3-max Download firmware using max-size segments (EXTREMELY DANGEROUS)
--fwdownload-mode7 Download firmware using a single segment (EXTREMELY DANGEROUS)
--fwdownload-modee Download firmware using mode E (min-size segments) (EXTREMELY DANGEROUS)
--fwdownload-modee-max Download firmware using mode E (max-size segments) (EXTREMELY DANGEROUS)
--idle-immediate Idle drive immediately
--idle-unload Idle immediately and unload heads
--Iraw filename Write raw binary identify data to the specfied file
--Istdin Read identify data from stdin as ASCII hex
--Istdout Write identify data to stdout as ASCII hex
--make-bad-sector Deliberately corrupt a sector directly on the media (VERY DANGEROUS)
--offset use with -t, to begin timings at given offset (in GiB) from start of drive
--prefer-ata12 Use 12-byte (instead of 16-byte) SAT commands when possible
--read-sector Read and dump (in hex) a sector directly from the media
--repair-sector Alias for the --write-sector option (VERY DANGEROUS)
--sanitize-antifreeze-lock Block sanitize-freeze-lock command until next power cycle
--sanitize-block-erase Start block erase operation
--sanitize-crypto-scramble Change the internal encryption keys that used for used data
--sanitize-freeze-lock Lock drive's sanitize features until next power cycle
--sanitize-overwrite PATTERN Overwrite the internal media with constant PATTERN
--sanitize-status Show sanitize status information
--security-help Display help for ATA security commands
--set-sector-size Change logical sector size of drive
--trim-sector-ranges Tell SSD firmware to discard unneeded data sectors: lba:count ..
--trim-sector-ranges-stdin Same as above, but reads lba:count pairs from stdin
--verbose Display extra diagnostics from some commands
--write-sector Repair/overwrite a (possibly bad) sector directly on the media (VERY DANGEROUS)

/tmp/user.scripts/tmpScripts/FanSpeed/script: line 79: [: : integer expression expected
Highest temp is: 0
/tmp/user.scripts/tmpScripts/FanSpeed/script: line 90: /sys/class/hwmon/hwmon3/device/hwmon/hwmon3/pwm3_enable: Permission denied
Setting pwm to: 30"

 

Also in the folder /sys/class/hwmon/hwmon3/device/hwmon/hwmon3, i don´t have any permission and pwm3_enable is not present

 

Screenshot 2021-03-09 at 15.50.50.png

Link to post
 
Agreed, this and for auto fan to automatically start when the unraid boots / the array is started.
 
I have to manually go into it and make a mundane change to get it to start.

Auto fan does start automatically on system boots if the config file is set to enabled. Mine starts every time unraid starts, check the plugin folder for auto fan make sure the config file is correct
Link to post
3 minutes ago, spl147 said:


Auto fan does start automatically on system boots if the config file is set to enabled. Mine starts every time unraid starts, check the plugin folder for auto fan make sure the config file is correct

 

It is set to enabled in the GUI but does not actually take control of the fans until I make a change.

 

I checked the config/plugin folder but just see files listing out the settings for each fan and a .txz file. Where is the config file you are talking about?

Link to post
13 minutes ago, TexasUnraid said:

 

It is set to enabled in the GUI but does not actually take control of the fans until I make a change.

 

I checked the config/plugin folder but just see files listing out the settings for each fan and a .txz file. Where is the config file you are talking about?

/flash/config/plugins/dynamix.system.autofan/dynamix.system.autofan.cfg

 

here is the contents of mine:

 

options="-c /sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm4 -f /sys/devices/platform/nct6775.656/hwmon/hwmon3/fan4_input -l 150 -t 35 -T 45 -m 1"
service="1"
controller="/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm4"
fan="/sys/devices/platform/nct6775.656/hwmon/hwmon3/fan4_input"
pwm="150"
low="35"
high="45"
interval="1"
exclude=""

 

 

Link to post
13 minutes ago, spl147 said:

/flash/config/plugins/dynamix.system.autofan/dynamix.system.autofan.cfg

 

here is the contents of mine:

 


options="-c /sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm4 -f /sys/devices/platform/nct6775.656/hwmon/hwmon3/fan4_input -l 150 -t 35 -T 45 -m 1"
service="1"
controller="/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm4"
fan="/sys/devices/platform/nct6775.656/hwmon/hwmon3/fan4_input"
pwm="150"
low="35"
high="45"
interval="1"
exclude=""

 

 

Odd, I have 6 files, one for each fan controller in my system.

 

Some of them I have disabled as I want the bios to control them (CPU fans) which includes channel 1. The others are enabled and show in the cfg files but it does not autostart.

 

Does it only check the first channel to see if it should autostart the whole service?

Link to post
Odd, I have 6 files, one for each fan controller in my system.
 
Some of them I have disabled as I want the bios to control them (CPU fans) which includes channel 1. The others are enabled and show in the cfg files but it does not autostart.
 
Does it only check the first channel to see if it should autostart the whole service?

Make sure the main config file has service=“1”
Link to post
24 minutes ago, spl147 said:


Make sure the main config file has service=“1”

Yeah, I figured that was the case but if I do that then autofan will try to control PWM1 which I do not want. Same as if I set it to enable in the GUI I am guessing.

 

I have PWM1 set to disabled in the GUI for this reason but have PWM 3-6 set to enabled. This works fine if I manually start the service by making a mundane change but it does not auto-start.

 

I am guessing that it is only checking PWM1 to see if it should be enabled instead of checking all the cfg files.

Link to post
1 minute ago, TexasUnraid said:

Yeah, I figured that was the case but if I do that then autofan will try to control PWM1 which I do not want. Same as if I set it to enable in the GUI I am guessing.

 

I have PWM1 set to disabled in the GUI for this reason but have PWM 3-6 set to enabled. This works fine if I manually start the service by making a mundane change but it does not auto-start.

 

I am guessing that it is only checking PWM1 to see if it should be enabled instead of checking all the cfg files.

so you have dynamix.system.autofan.cfg disabled then dynamix.system.autofan-1.cfg or something like that?

 

delete the ones you don't use and rename the first used one to dynamix.system.autofan.cfg, and set service="1" iand the others to 1,2,3, etc. and reboot

Link to post
5 minutes ago, spl147 said:

so you have dynamix.system.autofan.cfg disabled then dynamix.system.autofan-1.cfg or something like that?

 

delete the ones you don't use and rename the first used one to dynamix.system.autofan.cfg, and set service="1" iand the others to 1,2,3, etc. and reboot

 

Tried that but it just moved the settings up 2 slots, so my PWM 6 settings became PWM 4 settings. etc.

Link to post
 
Tried that but it just moved the settings up 2 slots, so my PWM 6 settings became PWM 4 settings. etc.

I would set plugin to default, delete all configs and start over
Link to post
1 minute ago, spl147 said:


I would set plugin to default, delete all configs and start over

 

I already did that early on when I was trying to figure out why it was not controlling the fans before I figured out making a mundane change would get it working. It didn't change anything.

 

Pretty sure it only checks the first cfg file to see if it should start the service, since I don't want that one enabled, it doesn't start it.

Link to post
10 minutes ago, TexasUnraid said:

 

I already did that early on when I was trying to figure out why it was not controlling the fans before I figured out making a mundane change would get it working. It didn't change anything.

 

Pretty sure it only checks the first cfg file to see if it should start the service, since I don't want that one enabled, it doesn't start it.

open a issue on the github page.

 

i had the same issue a wihle back, deleting everything and starting over fixed it for me, but i only have 1 config file, i use a fan hub and connect to 1 fan header

Link to post

I don't know even know how to find the github page and have never really used github outside of downloading stuff from it. No idea how to properly open an issue. Still very new to linux.

 

If the start script above works, that should be good enough for now.

Link to post
5 minutes ago, TexasUnraid said:

I don't know even know how to find the github page and have never really used github outside of downloading stuff from it. No idea how to properly open an issue. Still very new to linux.

 

If the start script above works, that should be good enough for now.

i opened the issue for you and referenced you here

Link to post
On 3/10/2021 at 12:18 AM, TexasUnraid said:

I don't know even know how to find the github page and have never really used github outside of downloading stuff from it. No idea how to properly open an issue. Still very new to linux.

 

If the start script above works, that should be good enough for now.

 

On 3/10/2021 at 12:24 AM, spl147 said:

i opened the issue for you and referenced you here

 

thx for your help in this case. i can confirm what @TexasUnraid said. same behavior on my side.

i just deleted the files where service=0 and will see if this helps.

 

i just noticed over night that the service again stopped but I was pretty sure that I ran the command before going to bed. In the morning the service said "stopped", after restarting manually again I saw just some minutes ago that the service stopped again from itself.

 

don't know if this relates to @TexasUnraid's assumption that the first file has to have a service=1 in that folder. So I tried your suggestion with deleting all files with service=0... let's see if the service is stable now.

 

do you have an idea how to check via console if the service is running or not and than maybe fire up the 'start' command as cron every 5min? This would also help i guess but bash scripting and me are no good friends :D

 

edit:

 

I also put in the name of my nvme drive in the exclude list (in my case it is 'nvme0n1')... let's see if this prevents the fans from getting info from the wrong drive.

Edited by locutus_lbc
Link to post
3 hours ago, TexasUnraid said:

I can confirm that the bash script line above ran at array start works good for getting autofan running with my existing settings and all fans are controlled as I have them setup in the GUI.

 

And I can confirm that it actually works to exclude NVME devices, when you add them directly to the config file.

 

BUT be careful with the UI... the setting will not be shown if you add a NVME device in the config AND the config file will be overwritten, if you change something in the GUI (so the NVME drive is gone).

 

before changing the file via terminal please be sure that the service has stopped.

to kill all services run:

 

/usr/local/emhttp/plugins/dynamix.system.autofan/scripts/autofan -q

 

maybe you have to run it more than once. for me it just stopped only one instance of the service. I have 2 fan controllers configured.

Check with 'htop' if everything stopped, otherwise kill them in 'htop'.

 

after that change your config file with:

 

nano /flash/config/plugins/dynamix.system.autofan/dynamix.system.autofan*.cfg

 

replace the * with your corresponding config file.

 

In the config file I changed two lines... 

Here is an example of one of my controllers config with a NVME devices excluded. 

 

options="-c /sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm4 -f /sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_input -l 30 -t 30 -T 40 -m 1 -e sdp,nvme0n1"
service="1"
controller="/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm4"
fan="/sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_input"
pwm="30"
low="30"
high="40"
interval="1"
exclude="sdp,nvme0n1"

 

Please notice that I changed it once in the 'exclude' parameter (last line) and once in the 'options' parameter which constructs the service I guess.

 

Restart your service with:

/usr/local/emhttp/plugins/dynamix.system.autofan/scripts/rc.autofan restart

or

/usr/local/emhttp/plugins/dynamix.system.autofan/scripts/rc.autofan start

 

I saw here in the forums that some people had also problems excluding there NVME devices.

 

Hope that the developer will take care of it, but it seems that there is a workaround until then.

 

Kind regards from Berlin

Edited by locutus_lbc
Link to post

Hi, autofan has stopped working after upgrading to 6.9.1 it was working fine in 6.9.0 and all the betas and RC's. Its annoying as finally my drives spin down and now something else is broken. Not sure what info is needed but I have this in syslinux: acpi_enforce_resources=lax and this in my GO file: modprobe it87 force_id=0x8628

Hopefully someone knows what has changed to stop this working?

Cheers, Tim

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.