PWM values randomly interpreted invertedly

Clash Royale CLAN TAG#URR8PPP up vote
2
down vote
favorite
Ubuntu 18.04 LTS
Linux 4.15.0
Mainboard: Gigabyte z97x Gaming 7 (kernel module: it87)
I am using the endpoints at /sys/class/hwmon/hwmon2 to set my case fans PWM values.
Sample script to set my fan speed via script (using argv):
#!/bin/bash
echo 1 > /sys/class/hwmon/hwmon2/pwm3_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm4_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm5_enable
echo $1 > /sys/class/hwmon/hwmon2/pwm3
echo $2 > /sys/class/hwmon/hwmon2/pwm4
echo $3 > /sys/class/hwmon/hwmon2/pwm5
This script works about 70% of times while the other 30% of times the value for pwm4 and pwm5 are interpreted in an inverted way:
pwm(255) = 0 rpm
pwm( 0 ) = max rpm
The behavior is random and varies through reboots.
What causes PWM values being interpreted in an inverted way? Is there any way I can permanently set the way the PWM values are interpreted?
command-line fan fancontrol lm-sensors
 |Â
show 1 more comment
up vote
2
down vote
favorite
Ubuntu 18.04 LTS
Linux 4.15.0
Mainboard: Gigabyte z97x Gaming 7 (kernel module: it87)
I am using the endpoints at /sys/class/hwmon/hwmon2 to set my case fans PWM values.
Sample script to set my fan speed via script (using argv):
#!/bin/bash
echo 1 > /sys/class/hwmon/hwmon2/pwm3_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm4_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm5_enable
echo $1 > /sys/class/hwmon/hwmon2/pwm3
echo $2 > /sys/class/hwmon/hwmon2/pwm4
echo $3 > /sys/class/hwmon/hwmon2/pwm5
This script works about 70% of times while the other 30% of times the value for pwm4 and pwm5 are interpreted in an inverted way:
pwm(255) = 0 rpm
pwm( 0 ) = max rpm
The behavior is random and varies through reboots.
What causes PWM values being interpreted in an inverted way? Is there any way I can permanently set the way the PWM values are interpreted?
command-line fan fancontrol lm-sensors
have you tried using 1 instead of 0? 1 is so small that most fan won't even run with such a low value. I have seen pwm controlled fans that completely stop at a low pwm value and restart spinning at zero, this is probably a security feature (system crashed -> let spin the fan).
â pim
May 29 at 9:43
my script is being run on boot and sets all pwm values to82. This is the value that I found out to be slow, nearly silent but still effective. The issue is that in 30% of all cases inputting82results in my fans actually getting173(255-82) due to the invert bug.
â Flatron
May 29 at 11:30
OK, reading your post I assumed only zero was a problem... What is your kernel version? it seems that this patch is related to your problem : patchwork.kernel.org/patch/9615835, should be fixed in 4.10.2 and later
â pim
May 29 at 11:40
And your kernel is far after that, nothing more to say...
â pim
May 29 at 11:55
1
Seems clearly a bug, the maintainer is Jean Delvare <jdelvare@suse.com>, and the report should go to the linux-hwmon@vger.kernel.org mailing list.
â pim
May 30 at 4:40
 |Â
show 1 more comment
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Ubuntu 18.04 LTS
Linux 4.15.0
Mainboard: Gigabyte z97x Gaming 7 (kernel module: it87)
I am using the endpoints at /sys/class/hwmon/hwmon2 to set my case fans PWM values.
Sample script to set my fan speed via script (using argv):
#!/bin/bash
echo 1 > /sys/class/hwmon/hwmon2/pwm3_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm4_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm5_enable
echo $1 > /sys/class/hwmon/hwmon2/pwm3
echo $2 > /sys/class/hwmon/hwmon2/pwm4
echo $3 > /sys/class/hwmon/hwmon2/pwm5
This script works about 70% of times while the other 30% of times the value for pwm4 and pwm5 are interpreted in an inverted way:
pwm(255) = 0 rpm
pwm( 0 ) = max rpm
The behavior is random and varies through reboots.
What causes PWM values being interpreted in an inverted way? Is there any way I can permanently set the way the PWM values are interpreted?
command-line fan fancontrol lm-sensors
Ubuntu 18.04 LTS
Linux 4.15.0
Mainboard: Gigabyte z97x Gaming 7 (kernel module: it87)
I am using the endpoints at /sys/class/hwmon/hwmon2 to set my case fans PWM values.
Sample script to set my fan speed via script (using argv):
#!/bin/bash
echo 1 > /sys/class/hwmon/hwmon2/pwm3_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm4_enable
echo 1 > /sys/class/hwmon/hwmon2/pwm5_enable
echo $1 > /sys/class/hwmon/hwmon2/pwm3
echo $2 > /sys/class/hwmon/hwmon2/pwm4
echo $3 > /sys/class/hwmon/hwmon2/pwm5
This script works about 70% of times while the other 30% of times the value for pwm4 and pwm5 are interpreted in an inverted way:
pwm(255) = 0 rpm
pwm( 0 ) = max rpm
The behavior is random and varies through reboots.
What causes PWM values being interpreted in an inverted way? Is there any way I can permanently set the way the PWM values are interpreted?
command-line fan fancontrol lm-sensors
edited May 29 at 9:56
muru
128k19270460
128k19270460
asked May 29 at 9:18
Flatron
607619
607619
have you tried using 1 instead of 0? 1 is so small that most fan won't even run with such a low value. I have seen pwm controlled fans that completely stop at a low pwm value and restart spinning at zero, this is probably a security feature (system crashed -> let spin the fan).
â pim
May 29 at 9:43
my script is being run on boot and sets all pwm values to82. This is the value that I found out to be slow, nearly silent but still effective. The issue is that in 30% of all cases inputting82results in my fans actually getting173(255-82) due to the invert bug.
â Flatron
May 29 at 11:30
OK, reading your post I assumed only zero was a problem... What is your kernel version? it seems that this patch is related to your problem : patchwork.kernel.org/patch/9615835, should be fixed in 4.10.2 and later
â pim
May 29 at 11:40
And your kernel is far after that, nothing more to say...
â pim
May 29 at 11:55
1
Seems clearly a bug, the maintainer is Jean Delvare <jdelvare@suse.com>, and the report should go to the linux-hwmon@vger.kernel.org mailing list.
â pim
May 30 at 4:40
 |Â
show 1 more comment
have you tried using 1 instead of 0? 1 is so small that most fan won't even run with such a low value. I have seen pwm controlled fans that completely stop at a low pwm value and restart spinning at zero, this is probably a security feature (system crashed -> let spin the fan).
â pim
May 29 at 9:43
my script is being run on boot and sets all pwm values to82. This is the value that I found out to be slow, nearly silent but still effective. The issue is that in 30% of all cases inputting82results in my fans actually getting173(255-82) due to the invert bug.
â Flatron
May 29 at 11:30
OK, reading your post I assumed only zero was a problem... What is your kernel version? it seems that this patch is related to your problem : patchwork.kernel.org/patch/9615835, should be fixed in 4.10.2 and later
â pim
May 29 at 11:40
And your kernel is far after that, nothing more to say...
â pim
May 29 at 11:55
1
Seems clearly a bug, the maintainer is Jean Delvare <jdelvare@suse.com>, and the report should go to the linux-hwmon@vger.kernel.org mailing list.
â pim
May 30 at 4:40
have you tried using 1 instead of 0? 1 is so small that most fan won't even run with such a low value. I have seen pwm controlled fans that completely stop at a low pwm value and restart spinning at zero, this is probably a security feature (system crashed -> let spin the fan).
â pim
May 29 at 9:43
have you tried using 1 instead of 0? 1 is so small that most fan won't even run with such a low value. I have seen pwm controlled fans that completely stop at a low pwm value and restart spinning at zero, this is probably a security feature (system crashed -> let spin the fan).
â pim
May 29 at 9:43
my script is being run on boot and sets all pwm values to
82. This is the value that I found out to be slow, nearly silent but still effective. The issue is that in 30% of all cases inputting 82 results in my fans actually getting 173 (255-82) due to the invert bug.â Flatron
May 29 at 11:30
my script is being run on boot and sets all pwm values to
82. This is the value that I found out to be slow, nearly silent but still effective. The issue is that in 30% of all cases inputting 82 results in my fans actually getting 173 (255-82) due to the invert bug.â Flatron
May 29 at 11:30
OK, reading your post I assumed only zero was a problem... What is your kernel version? it seems that this patch is related to your problem : patchwork.kernel.org/patch/9615835, should be fixed in 4.10.2 and later
â pim
May 29 at 11:40
OK, reading your post I assumed only zero was a problem... What is your kernel version? it seems that this patch is related to your problem : patchwork.kernel.org/patch/9615835, should be fixed in 4.10.2 and later
â pim
May 29 at 11:40
And your kernel is far after that, nothing more to say...
â pim
May 29 at 11:55
And your kernel is far after that, nothing more to say...
â pim
May 29 at 11:55
1
1
Seems clearly a bug, the maintainer is Jean Delvare <jdelvare@suse.com>, and the report should go to the linux-hwmon@vger.kernel.org mailing list.
â pim
May 30 at 4:40
Seems clearly a bug, the maintainer is Jean Delvare <jdelvare@suse.com>, and the report should go to the linux-hwmon@vger.kernel.org mailing list.
â pim
May 30 at 4:40
 |Â
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1041506%2fpwm-values-randomly-interpreted-invertedly%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
have you tried using 1 instead of 0? 1 is so small that most fan won't even run with such a low value. I have seen pwm controlled fans that completely stop at a low pwm value and restart spinning at zero, this is probably a security feature (system crashed -> let spin the fan).
â pim
May 29 at 9:43
my script is being run on boot and sets all pwm values to
82. This is the value that I found out to be slow, nearly silent but still effective. The issue is that in 30% of all cases inputting82results in my fans actually getting173(255-82) due to the invert bug.â Flatron
May 29 at 11:30
OK, reading your post I assumed only zero was a problem... What is your kernel version? it seems that this patch is related to your problem : patchwork.kernel.org/patch/9615835, should be fixed in 4.10.2 and later
â pim
May 29 at 11:40
And your kernel is far after that, nothing more to say...
â pim
May 29 at 11:55
1
Seems clearly a bug, the maintainer is Jean Delvare <jdelvare@suse.com>, and the report should go to the linux-hwmon@vger.kernel.org mailing list.
â pim
May 30 at 4:40