Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 65

Thread: Fan control script

  1. #11
    Join Date
    Mar 2009
    Location
    /home/joushou
    Beans
    30
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Fan control script

    Quote Originally Posted by hellmitre View Post
    I think you left out a $ in one of the last lines of the script, as well as an 's' at the end of defaults:
    Code:
    update-rc.d $initscript defaults $scriptrlevel || fatal "Failed to install rc-scripts"
    When I ran the script as root, it told me that it failed to install the rc-scripts. I added the $ to scriptrlevel and it ran.
    Yeah, i forgot, i never tested the install script... i just fixed it
    I was toying around with the rc script too late at night, so i accidently wrote "rm -rf rc*.d smcfancontrol" instead of "rm -rf rc*.d/smcfancontrol"... i wrote the install script after i had reinstalled all the rc script, so i was a bit tired

    Anyway, thanks for telling me
    Last edited by Joushou; March 28th, 2009 at 11:48 PM. Reason: I want a world-record: "Fewest unedited post"
    Once upon a time, there was.
    Then, there wasn't.
    - A description of life, the universe, and everything.

  2. #12
    Join Date
    Feb 2006
    Location
    Springfield, IL, USA
    Beans
    108

    Re: Fan control script

    Hi Joushou,

    Sometimes the script dies after running for a long time for some reason.
    Sometimes it happens after I wake up my computer from suspend.
    I added it to my rc.local, and am not using it as a daemon. Is it because of that?

    I am using it on Arch linux.

    Does any of you know if this fan speed bug got solved in the latest versions of the kernel?

    Thanks.

  3. #13
    Join Date
    Mar 2009
    Location
    /home/joushou
    Beans
    30
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Fan control script

    What fan speed bug? The not-so-great fan-speed-control is not a bug

    But back to my script:
    Does it die after a certain amount of time, or is it random (Try to run it manually with "sudo time /usr/local/sbin/smcfancontrol", it will time how long it runs)?
    Do the logs say anything? (It will print if it failed to read sensors or set fans to /var/log/smcfancontrol.log, and to stderr)
    Running it as a daemon makes no difference, it's just a bash script afterall...

    Anyway, if you could tell me if the logs give any info, it would help finding the problem alot
    I'll look at the script again, and see if i left something stupid in it...
    Once upon a time, there was.
    Then, there wasn't.
    - A description of life, the universe, and everything.

  4. #14
    Join Date
    Feb 2006
    Location
    Springfield, IL, USA
    Beans
    108

    Re: Fan control script

    Code:
    26/04 00:16:34: Detecting configuration
    26/04 00:16:34:   Fans: 1 
    26/04 00:16:34:     Min fan-speed: 2000
    26/04 00:16:34:     Max fan-speed: 6000
    26/04 00:16:34:   Sensors: 10
    26/04 00:16:34:     Limited by user to 4
    26/04 00:16:34:   Laptop: true
    26/04 00:16:34:     ACPI-State: online
    26/04 00:16:34: Configuration detected
    26/04 00:16:34: Temperature: 53, Fan-speed: 5404, ACPI-State: online
    26/04 00:16:55: Temperature: 52, Fan-speed: 5256, ACPI-State: online
    26/04 00:18:05: Temperature: 51, Fan-speed: 5108, ACPI-State: online
    26/04 00:19:21: Temperature: 50, Fan-speed: 4960, ACPI-State: online
    26/04 00:20:37: Temperature: 49, Fan-speed: 4812, ACPI-State: online
    26/04 00:23:54: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:24:19: Temperature: 49, Fan-speed: 4812, ACPI-State: online
    26/04 00:24:24: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:28:32: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:30:48: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:31:03: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:31:13: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:34:41: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:34:46: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:34:51: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:34:56: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:35:06: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:35:26: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:35:36: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:35:41: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:35:51: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:35:56: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:36:07: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:36:12: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:36:17: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:36:27: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 00:36:37: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 00:38:38: Temperature: 46, Fan-speed: 4368, ACPI-State: online
    26/04 00:40:04: Temperature: 45, Fan-speed: 4220, ACPI-State: online
    26/04 00:42:25: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:42:30: Temperature: 45, Fan-speed: 4220, ACPI-State: online
    26/04 00:42:41: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:55:43: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:55:48: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:56:04: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:56:09: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:56:14: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:56:19: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:56:29: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:56:34: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:56:44: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:56:49: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:56:54: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:56:59: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:57:14: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:57:29: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:57:45: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:57:50: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:57:55: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:58:00: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:58:50: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 00:59:00: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 00:59:10: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 01:00:46: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 01:00:56: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 01:01:02: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 01:01:07: Temperature: 43, Fan-speed: 3924, ACPI-State: online
    26/04 01:01:12: Temperature: 44, Fan-speed: 4072, ACPI-State: online
    26/04 01:05:35: Temperature: 45, Fan-speed: 4220, ACPI-State: online
    26/04 01:05:45: Temperature: 46, Fan-speed: 4368, ACPI-State: online
    26/04 01:05:50: Temperature: 45, Fan-speed: 4220, ACPI-State: online
    26/04 01:07:16: Temperature: 46, Fan-speed: 4368, ACPI-State: online
    26/04 01:07:21: Temperature: 45, Fan-speed: 4220, ACPI-State: online
    26/04 01:07:26: Temperature: 46, Fan-speed: 4368, ACPI-State: online
    26/04 01:08:42: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 01:08:57: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 01:09:02: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 01:10:34: Temperature: 51, Fan-speed: 5108, ACPI-State: online
    26/04 01:10:39: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 01:10:49: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 01:12:05: Temperature: 56, Fan-speed: 5848, ACPI-State: online
    26/04 01:12:10: Temperature: 51, Fan-speed: 5108, ACPI-State: online
    26/04 01:12:15: Temperature: 50, Fan-speed: 4960, ACPI-State: online
    26/04 01:12:20: Temperature: 49, Fan-speed: 4812, ACPI-State: online
    26/04 01:12:25: Temperature: 54, Fan-speed: 5552, ACPI-State: online
    26/04 01:12:30: Temperature: 52, Fan-speed: 5256, ACPI-State: online
    26/04 01:12:35: Temperature: 50, Fan-speed: 4960, ACPI-State: online
    26/04 01:12:45: Temperature: 49, Fan-speed: 4812, ACPI-State: online
    26/04 01:12:56: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 01:13:01: Temperature: 47, Fan-speed: 4516, ACPI-State: online
    26/04 01:14:27: Temperature: 48, Fan-speed: 4664, ACPI-State: online
    26/04 01:17:34: FATAL: Failing at: 
    26/04 01:17:34: Attempting to set fans to safe values
    26/04 01:17:34: Commit suicide. Bye.
    This is the log. I am running it manually after it crashes..
    What is this bug related to
    https://bugs.launchpad.net/ubuntu/+s...ux/+bug/262550
    Last edited by sands; April 26th, 2009 at 11:51 PM.

  5. #15
    Join Date
    Mar 2009
    Location
    /home/joushou
    Beans
    30
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Fan control script

    Okay, now i know why, sometimes it seems that you can't read the sensors (no idea why that happens though, seems random)
    Quick fix is to just comment out the contents of the fatal-function.
    I'm gonna rewrite the fatal-function to retry the commands 3-5 times, waiting something like 5 secs in between, but it actually requires me to do some thinking, and as you might have noticed, that's not something i'm used to

    Oh, and you meant the serious heating was a bug? thought you meant the non-existing fan-control
    Last edited by Joushou; May 5th, 2009 at 12:07 PM.
    Once upon a time, there was.
    Then, there wasn't.
    - A description of life, the universe, and everything.

  6. #16
    Join Date
    Aug 2005
    Location
    Huntsville, AL, USA
    Beans
    7,526
    Distro
    Ubuntu

    Re: Fan control script

    Quote Originally Posted by Joushou View Post
    Oh, and you meant the serious heating was a bug? thought you meant the non-existing fan-control
    I think the bug covers both aspects of this.

  7. #17
    Join Date
    Feb 2006
    Location
    Springfield, IL, USA
    Beans
    108

    Re: Fan control script

    Thanks, I will do that for now and will wait for your bashfu.

  8. #18
    Join Date
    May 2009
    Beans
    1

    Re: Fan control script

    Excellent catch hellmitre. Thanks for that!

  9. #19
    Join Date
    Oct 2005
    Beans
    127

    Re: Fan control script

    The install script is still missing an "s" on line 40:
    Code:
    update-rc.d $initscript defaults $scriptrlevel || fatal "Failed to install rc-scripts"
    Other than that, the script seems to work well on my MacBook 2,1.

    I'm just curious, what difference does it make to change the number of sensors used? Why is the default 4?

    Thanks,
    Tiago

  10. #20
    Join Date
    Mar 2006
    Beans
    19

    Re: Fan control script

    Thanks a lot Joushou for the great script and others for the corrections!
    One more annoyance eliminated

    Here is a patch to make the change to the fan speed gradual (you can make the change as slow as you want), to add support for coretemp sensors, and to fix the typo in install. The first sensors in the array are used for coretemp (CPU) sensors, so when you set sensorsUsed=2 on a dual core machine, you'll be using only CPU sensors. You can apply the patch by:
    Code:
    gunzip gradual-change-and-coretemp-support.patch.gz
    cd smcfancontrol
    patch -p1 <../gradual-change-and-coretemp-support.patch
    Attached Files Attached Files
    Last edited by cornelius2; May 13th, 2009 at 10:23 AM.

Page 2 of 7 FirstFirst 1234 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •