2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-28 21:07:55 +00:00

139 Commits

Author SHA1 Message Date
Peter Zahemszky
af6bb037ef Improve some more error messages 2020-11-14 13:16:08 +00:00
Peter Zahemszky
1d8f9f18f9 Fix an error message 2020-11-14 13:12:35 +00:00
Ondřej Lysoněk
c31efbbbab Append the "+git" post-release marker to LM_VERSION 2019-10-18 10:14:11 +02:00
Ondřej Lysoněk
1667b850a1 Update LM_VERSION for the 3.6.0 release 2019-10-17 17:43:18 +02:00
Ondřej Lysoněk
f1e1a7607c Rename LM_SENSORS_VER to LM_VERSION
Rename LM_SENSORS_VER to LM_VERSION to match the version constant in
version.h. Also, use the "+git" suffix in the version as we are
between releases.
2019-10-17 16:18:23 +02:00
Ondřej Lysoněk
5c900c7e85 Replace svn keywords with LM_SENSORS_VER constant
The keywords Revision, Date and Id were being expanded by Subversion
way back when the project was being maintained in Subversion. Now when
the project is maintained in git, the keywords are no longer expanded
and appear e.g. in the output of sensors-detect literally.

Drop the keywords, or replace them with LM_SENSORS_VER where
applicable.

The value of the constant will have to be updated manually every time
a new release is made.

Inspired by a similar change in i2c-tools (commit daa430031ffd;
thanks, Jean).
2019-10-17 15:29:58 +02:00
Karol Szklarski
b2039f04e1 Adding AVERAGE option to fancontrol 2019-01-26 22:12:15 +01:00
Ondřej Lysoněk
38220cc2e9 pwmconfig: Fix a sed expression
This fixes commit 3daae37d58cd.
The escaping inside backticks is really kinda crazy.

Fixes #126

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-09-20 21:19:11 +02:00
Ondřej Lysoněk
e0c146763b pwmconfig: Declare TMP1 and TMP2 on a separate line
Declare TMP1 and TMP2 on a separate line to make Coverity Scan happy.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-05-14 08:49:01 -07:00
Ondřej Lysoněk
fb595f55d1 fancontrol: Do command substitution in double quotes
Do command substitution in double quotes to prevent word splitting.
The issue was reported by Coverity Scan.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-05-14 08:49:01 -07:00
jschwender
06a57f6d54 Update vt1211_pwm
the script uses bashisms that work only if sh is bash. if not this will fail. Consequently shebang should be bash, not sh.
2018-03-14 21:08:37 -07:00
jschwender
0e255d895f pwmconfig: fix missing "
introduced in #3daae37

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-03-13 09:18:55 -07:00
jschwender
2d236fbb96 Update vt1211_pwm
replaced deprecated sub shell syntax

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-03-11 09:45:03 -07:00
jschwender
3daae37d58 Update pwmconfig
replaced deprecated sub shell syntax

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-03-11 09:45:03 -07:00
jschwender
33463a1c77 Update fancontrol
replaced deprecated sub shell syntax and replaced deprecated egrep by grep -E

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-03-11 09:45:03 -07:00
jschwender
6842a129c8 Update fancontrol.8
fix incorrect alg description

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-03-11 09:45:03 -07:00
Jakub Wilk
8c2a6ebc22 Fix typos in documentation
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-03-02 11:07:26 -08:00
Roland Ramthun
34627e4666 Update fancontrol to save original pwm values
Update fancontrol script to save the values of pwmN_enable and pwmN
when it starts and restore the values, when it exits.
Closes groeck/lm-sensors#47.

Signed-off-by: Roland Ramthun <bts@roland-ramthun.de>
[groeck: Split description into multiple lines]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-02-04 08:56:58 -08:00
Jean Delvare
096a5fc953 fancontrol: Reduce memory consumption
Construct "wait $!" causes bash to remember the exit status of the
children. This consumes memory. We don't need the status code and we
are only waiting for a single child, so we can simply use "wait". This
will reduce the memory usage.

This partly fixes ticket #2391.
http://www.lm-sensors.org/ticket/2391

The actual leak is in bash 4.3 and should be fixed there.
2015-06-25 10:34:52 +00:00
Jean Delvare
af447db31a fancontrol: Fix shell error when FCFANS is not set
The bug was introduced when I added support for multiple fans
controlled by the same PWM output, in r6000. lm-sensors versions
affected: 3.3.2 to 3.3.5.

This fixes SUSE bug #903520:
https://bugzilla.suse.com/show_bug.cgi?id=903520
2014-11-05 07:28:35 +00:00
Jean Delvare
eb5cf8b2ec Update my e-mail address and copyright years 2014-03-20 10:23:35 +00:00
Jean Delvare
0c0e29f297 fancontrol: Deal with moving hwmon attributes
Several kernel drivers have already moved their attributes from the
hardware device to the hwmon class device, and others will follow.
Teach fancontrol about this possibility and let it adjust the attribute
paths transparently.
2014-01-28 21:40:55 +00:00
Jean Delvare
62ed6f484b Fix handling of absolute paths in config
Reported by Marc Ferland. Make DEVPATH and DEVNAME mandatory only when
using relative paths. Optionally support DEVNAME check when using
absolute paths.
2013-05-23 14:09:22 +00:00
Jean Delvare
7e2b5c3376 pwm: Declare local variables as such 2013-05-01 11:37:47 +00:00
Jean Delvare
e46e4e519f pwmconfig: Properly deal with multiple fan control
When a given PWM output controls more than one fan,
fanactive_min is no longer a space-separated list of numbers, it will
also include items of the form "A+B". The tests in the rest of the
code do not expect that and choke with errors like:

/usr/sbin/pwmconfig: line 926: [: 538+799: integer expression expected
/usr/sbin/pwmconfig: line 952: [: 538+799: integer expression expected

As the only thing we really care about is whether any fan stops
completely when PWM is 0, we can simply record the minimum of the
lowest speed of all affected fans.
2013-05-01 10:31:00 +00:00
Jean Delvare
f2b3e95c59 pwmconfig: Drop a stray comment
fancontrol supports multiple controlled fans for quite some time now.
2013-05-01 10:30:22 +00:00
Jean Delvare
58ec80bf54 pwmconfig: Raise the detection threshold to 3/4
Detection threshold of 2/3 of the maximum speed is too low, some fans
will slow down to about that speed so controlled fans may be missed.
Use 3/4 as the threshold to avoid these false negatives.
2013-05-01 10:29:57 +00:00
Jean Delvare
2096d14c18 pwmconfig: Print the initial PWM values
Print the initial PWM values before letting the user change them. This
should be useful to better understand what happens next, and for user
support in general.
2013-05-01 10:29:00 +00:00
Jean Delvare
2c145550b5 fancontrol: Output error messages to stderr
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6001 7894878c-1315-0410-8ee3-d5d059ff63e0
2011-12-04 16:54:05 +00:00
Jean Delvare
bd21ec1ee4 fancontrol: Support setup where one PWM output controls several fans
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6000 7894878c-1315-0410-8ee3-d5d059ff63e0
2011-12-04 16:53:10 +00:00
Jean Delvare
fffbe666c4 Drop legacy calls to cut. procfs had several values per file, but
sysfs doesn't.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5857 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-08-22 16:17:57 +00:00
Jean Delvare
501499e834 Wait for fans to return to full speed only once per PWM. In the rare
case where a given PWM output controls more than one fan, this makes
the script somewhat faster.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5856 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-08-22 16:09:08 +00:00
Jean Delvare
eb40756d74 When looking for pwm/fan correlations, sample all fans before returning
a given PWM output to full speed. The code used to only sample the first
fan before doing so, so correlation with other fans could be missed.
Problem reported by Charles Pillar. This closes ticket #2380.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5855 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-08-22 16:07:22 +00:00
Jean Delvare
8ddd1d2984 Save hwmon device paths and names in configuration file, and check them
before starting any fan control operation.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5770 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-09-16 15:57:53 +00:00
Jean Delvare
bff5a8dde0 Clean up the code writing the configuration file.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5767 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-09-13 11:19:57 +00:00
Jean Delvare
5ee7d14714 Minor line wrapping fix.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5766 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-09-08 17:24:25 +00:00
Jean Delvare
c76907971e Check that all referenced sysfs files exist before starting. If not,
quilt immediately. Better no fan control than fan control using an
out-of-sync configuration file.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5765 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-09-08 16:52:29 +00:00
Jean Delvare
835eee0a7f Don't assume legacy references to i2c devices, instead explicitly
check for them. This should help spot invalid configuration files.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5764 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-09-08 14:19:22 +00:00
Jean Delvare
6ff7f5e25b Exit immediately if not root.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5749 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-07-03 19:37:22 +00:00
Jean Delvare
dee604c8e9 Add support for absolute path to hwmon devices.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5717 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-05-09 11:43:06 +00:00
Jean Delvare
1141a165ee Create pid file only after successful initialization.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5668 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-28 19:42:51 +00:00
Jean Delvare
45446011ec Exit if configuration file can't be read.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5667 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-28 19:38:22 +00:00
Jean Delvare
b0f50d0788 Drop stray references to procfs interface.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5631 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-29 08:58:36 +00:00
Jean Delvare
ea854deb03 Drop support for kernels 2.4 and earlier.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5630 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-29 08:28:17 +00:00
Jean Delvare
334c9446f5 Don't round temperature values.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5629 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-29 08:13:47 +00:00
Jean Delvare
5f269d0f10 Don't choke on missing name attribute. Drivers shouldn't do that, but
we can live without the name attribute, so there's no point in failing.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5345 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-09-28 15:22:44 +00:00
Jean Delvare
66130a9630 Update pwmconfig manual page.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5344 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-09-28 08:18:29 +00:00
Jean Delvare
f7ccb96a7c Add support for drivers that place the hwmon attributes in the hwmon
class device directory rather than directly in the device directory.
This is what virtual devices have.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5343 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-09-27 15:35:47 +00:00
Jean Delvare
118a102198 Add a script that provides manual control of the vt1211 PWM outputs.
This script puts the vt1211 in automatic PWM mode and fools the chip
into believing that there is a temp change to force the PWM outputs to
specified values. This is necessary since the standard manual mode of
the vt1211 doesn't seem to work.
Patch from Juerg Haeflinger.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5338 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-09-21 15:25:39 +00:00
Jean Delvare
8f9a67f5bd Strip trailing whitespace.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5330 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-09-09 16:18:27 +00:00