LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fan control at start up (https://www.linuxquestions.org/questions/linux-newbie-8/fan-control-at-start-up-4175486802/)

tousif 12-04-2013 04:56 AM

Fan control at start up
 
Hey guy's, hope you're doing well,
I've recently configured the pwmconfig for fancontrol,
the problem is all the time i login, i've to turn on the fancontrol manually by typing fancontrol at terminal as root.

how can i arrange the start up of fancontrol while booting system!!? instead of manual !?

druuna 12-04-2013 05:52 AM

Quote:

Originally Posted by tousif (Post 5075156)
I've recently configured the pwmconfig for fancontrol,
the problem is all the time i login, i've to turn on the fancontrol manually by typing fancontrol at terminal as root.

how can i arrange the start up of fancontrol while booting system!!? instead of manual !?

You don't mention which distro you are using, but you might be able to put this command in /etc/rc.local

Here's an example:
Code:

#!/bin/sh -e
#
# rc.local
#

/path/to/fancontrol <options> &

exit 0

Do not forget the & at the end!

tousif 12-04-2013 10:18 PM

Quote:

Originally Posted by druuna (Post 5075183)
You don't mention which distro you are using, but you might be able to put this command in /etc/rc.local

Here's an example:
Code:

#!/bin/sh -e
#
# rc.local
#

/path/to/fancontrol <options> &

exit 0

Do not forget the & at the end!

I'm sorry i'm using debian wheezy 7.2 x64 - KDE environment,
Here is the /etc/rc/local file after editing,

Code:


       
Code:

       

#!/bin/sh -e
#
# rc.local
  /etc/fancontrol &
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0



thanks....lets hope that work.

tousif 12-04-2013 10:38 PM

No buddy, on rebooting this isn't working, I've to start fan control manually. any idea why?

druuna 12-05-2013 01:47 AM

Quote:

Originally Posted by tousif (Post 5075691)
I'm sorry i'm using debian wheezy 7.2 x64 - KDE environment,
Here is the /etc/rc/local file after editing,
Code:

#!/bin/sh -e
#
# rc.local
  /etc/fancontrol &
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0


Is fancontrol run from /etc? I do believe that is the configuration file for fancontrol.

If I look at my Debian 6 box after installing fancontrol, I see these:
Code:

/etc/init.d/fancontrol
/etc/rc2.d/S20fancontrol
/etc/rc3.d/S20fancontrol
/etc/rc4.d/S20fancontrol
/etc/rc5.d/S20fancontrol
/usr/sbin/fancontrol
/usr/sbin/pwmconfig
/usr/share/doc/fancontrol/changelog.Debian.gz
/usr/share/doc/fancontrol/changelog.gz
/usr/share/doc/fancontrol/copyright
/usr/share/doc/fancontrol/fancontrol.txt.gz
/usr/share/man/man8/fancontrol.8.gz
/usr/share/man/man8/pwmconfig.8.gz

I don't use fancontrol so the /etc/fancontrol file is missing from the above.

This tells me that fancontrol is (should be) started automatically from init.d. No need to start it by hand.

Have you checked System -> Administration -> Services? It might be turned off there.

tousif 12-05-2013 02:39 AM

How should i start fan control from "/etc/init.d/fancontrol start"

i've configuration file at "/etc/fancontrol"

but as you said there is no file created at "/etc/init.d" to start it automatically

how to create shell script file automatically at "/etc/init.d" for fan control ?

tousif 12-05-2013 02:45 AM

Terminal out put for "/etc/init.d/fancontrol start" is given below,

Code:

root@debian:/home/neo# /etc/init.d/fancontrol start
bash: /etc/init.d/fancontrol: No such file or directory


tousif 12-05-2013 02:59 AM

Have a look at this output too
 
root@debian:/home/neo# sensors-detect
# sensors-detect revision 6031 (2012-03-07 17:14:01 +0100)
# Board: ASUSTeK Computer INC. M4A88TD-V EVO/USB3

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): Y
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
AMD K8 thermal sensors... No
AMD Family 10h thermal sensors... Success!
(driver `k10temp')
AMD Family 11h thermal sensors... No
AMD Family 12h and 14h thermal sensors... No
AMD Family 15h thermal sensors... No
AMD Family 15h power sensors... No
Intel digital thermal sensor... No
Intel AMB FB-DIMM thermal sensor... No
VIA C7 thermal sensor... No
VIA Nano thermal sensor... No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): Y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... Yes
Found `ITE IT8721F/IT8758E Super IO Sensors' Success!
(address 0x290, driver `it87')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): Y
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... No

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (yes/NO): Y
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): Y
Using driver `i2c-piix4' for device 0000:00:14.0: ATI Technologies Inc SB600/SB700/SB800 SMBus
Module i2c-dev loaded successfully.

Next adapter: SMBus PIIX4 adapter at 0b00 (i2c-0)
Do you want to scan it? (YES/no/selectively): Y
Client found at address 0x51
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Yes
(confidence 8, not a hardware monitoring chip)

Next adapter: NVIDIA i2c adapter 0 at 1:00.0 (i2c-1)
Do you want to scan it? (yes/NO/selectively): Y

Next adapter: NVIDIA i2c adapter 1 at 1:00.0 (i2c-2)
Do you want to scan it? (yes/NO/selectively): Y

Next adapter: NVIDIA i2c adapter 2 at 1:00.0 (i2c-3)
Do you want to scan it? (yes/NO/selectively): Y

Next adapter: NVIDIA i2c adapter 6 at 1:00.0 (i2c-4)
Do you want to scan it? (yes/NO/selectively): Y

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `it87':
* ISA bus, address 0x290
Chip `ITE IT8721F/IT8758E Super IO Sensors' (confidence: 9)

Driver `k10temp' (autoloaded):
* Chip `AMD Family 10h thermal sensors' (confidence: 9)

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
it87
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)Y
Successful!

Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/kmod start'
to load them.

Unloading i2c-dev... OK
Unloading cpuid... OK

root@debian:/home/neo# /etc/init.d/kmod start
[info] Loading kernel module loop.
[info] Loading kernel module it87.
[info] Loading kernel module it87.
root@debian:/home/neo# sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +38.5°C (high = +70.0°C)
(crit = +99.5°C, hyst = +94.5°C)

it8721-isa-0290
Adapter: ISA adapter
in0: +2.86 V (min = +1.10 V, max = +1.31 V) ALARM
in1: +2.82 V (min = +0.01 V, max = +3.05 V)
in2: +1.21 V (min = +0.79 V, max = +0.56 V) ALARM
+3.3V: +3.24 V (min = +5.95 V, max = +1.51 V) ALARM
in4: +1.78 V (min = +0.54 V, max = +0.07 V) ALARM
in5: +2.60 V (min = +1.55 V, max = +0.56 V) ALARM
in6: +1.94 V (min = +1.38 V, max = +1.27 V) ALARM
3VSB: +3.07 V (min = +2.83 V, max = +1.85 V) ALARM
Vbat: +3.38 V
fan1: 3169 RPM (min = 18 RPM)
fan2: 0 RPM (min = 18 RPM) ALARM
fan3: 0 RPM (min = 119 RPM) ALARM
temp1: +46.0°C (low = +76.0°C, high = -54.0°C) ALARM sensor = thermistor
temp2: +43.0°C (low = +50.0°C, high = +47.0°C) sensor = thermistor
temp3: -128.0°C (low = +88.0°C, high = +109.0°C) sensor = disabled
intrusion0: OK

root@debian:/home/neo# apt-get --reinstall install fancontrol
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/43.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
fancontrol
Install these packages without verification [y/N]? y
(Reading database ... 137285 files and directories currently installed.)
Preparing to replace fancontrol 1:3.3.2-2+deb7u1 (using .../fancontrol_1%3a3.3.2-2+deb7u1_all.deb) ...
Unpacking replacement fancontrol ...
Processing triggers for man-db ...
Setting up fancontrol (1:3.3.2-2+deb7u1) ...
root@debian:/home/neo# sudo update-rc.d fancontrol defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: error: unable to read /etc/init.d/fancontrol


root@debian:/home/neo# /etc/init.d/fancontrol
bash: /etc/init.d/fancontrol: No such file or directory

druuna 12-05-2013 03:21 AM

Not sure why fancontrol isn't installed correctly.

Try this (as root):
Code:

# aptitude purge fancontrol
# aptitude install fancontrol

Output, for me, looks like this:
Code:

# aptitude purge fancontrol
The following packages will be REMOVED: 
  fancontrol{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 98.3 kB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 168758 files and directories currently installed.)
Removing fancontrol ...
Stopping fan speed regulator: fancontrol.
Purging configuration files for fancontrol ...
Processing triggers for man-db ...

# aptitude install fancontrol
The following NEW packages will be installed:
  fancontrol
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/41.1 kB of archives. After unpacking 98.3 kB will be used.
Selecting previously deselected package fancontrol.
(Reading database ... 168748 files and directories currently installed.)
Unpacking fancontrol (from .../fancontrol_1%3a3.1.2-6+squeeze1_all.deb) ...
Processing triggers for man-db ...
Setting up fancontrol (1:3.1.2-6+squeeze1) ...
                                       
# updatedb
# locate fancontrol
/etc/init.d/fancontrol
/etc/rc2.d/S20fancontrol
/etc/rc3.d/S20fancontrol
/etc/rc4.d/S20fancontrol
/etc/rc5.d/S20fancontrol
/usr/sbin/fancontrol
/usr/share/doc/fancontrol
/usr/share/doc/fancontrol/changelog.Debian.gz
/usr/share/doc/fancontrol/changelog.gz
/usr/share/doc/fancontrol/copyright
/usr/share/doc/fancontrol/fancontrol.txt.gz
/usr/share/man/man8/fancontrol.8.gz
/var/cache/apt/archives/fancontrol_1%3a3.1.2-6+squeeze1_all.deb
/var/lib/dpkg/info/fancontrol.conffiles
/var/lib/dpkg/info/fancontrol.list
/var/lib/dpkg/info/fancontrol.md5sums
/var/lib/dpkg/info/fancontrol.postinst
/var/lib/dpkg/info/fancontrol.postrm
/var/lib/dpkg/info/fancontrol.prerm
/var/lib/update-rc.d/fancontrol


tousif 12-05-2013 03:34 AM

I've solved the problem. Look how!!
 
It's my mistake, i was editing "/etc/rc.local" in wrong way.
my mistake was to providing path of configuration file instead of path for fancontrol itself.

:banghead::banghead:

Look newly edited "/etc/rc.local" given below, :study:

Code:


#!/bin/sh -e
#
# rc.local

/usr/sbin/fancontrol &
/var/log/fancontrol.log &

# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0

Yes you're right the correct path to fancontrol is,
_______________________________________________________
/usr/sbin/fancontrol &
/var/log/fancontrol.log &
_______________________________________________________
i added both lines mentioned above and rebooted......:scratch:

Viola it's now running like charm.:hattip:
Thanks to Druuna for helping out. cheers buddy :hattip:

Following links are also very help full,
http://ubuntuforums.org/showthread.php?t=42737

http://www.fedoraforum.org/forum/sho...10&postcount=5

druuna 12-05-2013 03:51 AM

This still isn't correct.

fancontrol should be started automatically during boot and there shouldn't be any reason to start it from rc.local.

Besides that: Are you sure that /var/log/fancontrol.log & needs to be in rc.local?

/var/log/fancontrol.log is a log file, not an executable.

tousif 12-05-2013 05:10 AM

Quote:

Originally Posted by druuna (Post 5075820)
This still isn't correct.

fancontrol should be started automatically during boot and there shouldn't be any reason to start it from rc.local.

Besides that: Are you sure that /var/log/fancontrol.log & needs to be in rc.local?

/var/log/fancontrol.log is a log file, not an executable.

you're right it's not executable hence i removed it, and on next reboot fancontrol is yet running fine.

unfortunately there is no fancontrol shell script present at "/etc/init.d/fancontrol"
and yet after reboot fancontrol is automatically loaded.
what do think about this!!!?

druuna 12-05-2013 05:39 AM

Quote:

Originally Posted by tousif (Post 5075879)
unfortunately there is no fancontrol shell script present at "/etc/init.d/fancontrol"
and yet after reboot fancontrol is automatically loaded.
what do think about this!!!?

Did you read post #9? And have you tried my suggestion?

tousif 12-05-2013 06:08 AM

Have a look at this output too
 
Outout for #9

Code:

root@debian:/home/neo# updatedb
root@debian:/home/neo# locate fancontrol
/etc/fancontrol
/etc/init.d/fancontrol
/etc/rc2.d/S16fancontrol
/etc/rc3.d/S16fancontrol
/etc/rc4.d/S16fancontrol
/etc/rc5.d/S16fancontrol
/home/neo/.kde/share/apps/RecentDocuments/fancontrol.desktop
/root/.kde/share/apps/RecentDocuments/fancontrol.sh.desktop
/usr/sbin/fancontrol
/usr/share/doc/fancontrol
/usr/share/doc/fancontrol/changelog.Debian.gz
/usr/share/doc/fancontrol/changelog.gz
/usr/share/doc/fancontrol/copyright
/usr/share/doc/fancontrol/fancontrol.txt.gz
/usr/share/man/man8/fancontrol.8.gz
/var/cache/apt/archives/fancontrol_1%3a3.3.2-2+deb7u1_all.deb
/var/lib/dpkg/info/fancontrol.conffiles
/var/lib/dpkg/info/fancontrol.list
/var/lib/dpkg/info/fancontrol.md5sums
/var/lib/dpkg/info/fancontrol.postinst
/var/lib/dpkg/info/fancontrol.postrm
/var/lib/dpkg/info/fancontrol.prerm

fancontrol is running automatically.

druuna 12-05-2013 06:40 AM

It seems to be installed correctly.

BTW: Don't forget to remove fancontrol from the rc.local script.....


All times are GMT -5. The time now is 05:21 PM.