Giter Club home page Giter Club logo

Comments (10)

Zaczero avatar Zaczero commented on May 18, 2024 1

FOR THE SHEBANG WORKAROUND

In addition to changing the shebang (from #!/bin/sh to #!/bin/bash), make sure to update the nfancurve.service file, which, as it is currently, always executes the script with /bin/sh.

Old line:

ExecStart=/bin/sh /usr/bin/nfancurve -c /etc/nfancurve.conf

Fixed line:

ExecStart=/usr/bin/nfancurve -c /etc/nfancurve.conf

from nfancurve.

nan0s7 avatar nan0s7 commented on May 18, 2024

Hmm not sure why it's not working on Ubuntu specifically. This may happen when Coolbits aren't enabled, but I assumed you've done that properly if it works on centos.

You could try using a different shell; sh temp.sh or install dash and use dash temp.sh.

You can also run it in logging mode using the -l option; ./temp.sh -l and send me the output here after a few seconds of it running (if it runs at all).

I assume you're using the same config file between the two OS's?

If you're using the latest pull from the source, try the one prior to adding a new feature as the latest one may not have been tested enough.

from nfancurve.

qq1090942722 avatar qq1090942722 commented on May 18, 2024

from nfancurve.

EthanDarling8 avatar EthanDarling8 commented on May 18, 2024

It's doing the same thing for me. I'm running Ubuntu 21.10 and as soon as I run ./temp.sh it gives the same error. Same nfancurve version and coolbits has been enabled. After running ./temp.sh -l it doesn't run and no logs are shown nor log file generated. If there is anymore info that I can provide let me know. This did not happen to me on Ubuntu 20.04 and this week I did a fresh install of Ubuntu 21.10 and it suddenly isn't working anymore.

from nfancurve.

sicknesz avatar sicknesz commented on May 18, 2024

I got it working by editing line 146 to only have two << sign not <<< seems to works, but it get the same error as previously (unrelated) :
ERROR: Error assigning value 55 to attribute 'GPUTargetFanSpeed' (desktop:0[fan:0]) as specified in assignment '[fan:0]/GPUTargetFanSpeed=55' (Unknown Error).

from nfancurve.

nan0s7 avatar nan0s7 commented on May 18, 2024

@EthanDarling8 @sicknesz have either of you tried the previous committed version? Line 146 impliments an experimental change committed by someone other than myself, so I haven't looked over it closely. It does add another dependency so it could be missing from the default Ubuntu installation or some similar error. However, I don't see why it should cause any issues if it is disabled in the config file.

Nonetheless, try this version: https://github.com/nan0s7/nfancurve/tree/ed631f01c4ab7b0720e82e82943298b5b3b511f5

The error @sicknesz mentioned seems to be caused by either CoolBits or the fan control state not being enabled to 1. Unless NVIDIA changed the command to change the fan speed.

Although I am busy with work IRL, I may get the chance to boot up an Ubuntu derived distro and test things out. Although I will point out these issues can arise from not having a proper X display connected and running. I don't know how Wayland handles things.

from nfancurve.

sicknesz avatar sicknesz commented on May 18, 2024

@nan0s7 : the version you asked me to try works perfectly fine, thanks.

$ ./temp.sh    
################################################################################
#          nan0s7's script for automatically managing GPU fan speed            #
################################################################################

Configuration file: /home/owner/nfancurve/config
Number of Fans detected: 
1
Number of GPUs detected: 
1

  Attribute 'GPUFanControlState' (desktop:0[gpu:0]) assigned value 1.

Started process for 1 GPU and 1 Fan

  Attribute 'GPUTargetFanSpeed' (desktop:0[fan:0]) assigned value 55.

  Attribute 'GPUFanControlState' (desktop:0[gpu:0]) assigned value 0.

from nfancurve.

jorisgr avatar jorisgr commented on May 18, 2024

The problem seems to be due to recent additions using bash-code that isn't portable to dash (the standard Debian/Ubuntu /bin/sh). More specifically it uses '[[' test constructs which don't seem to be POSIX-compliant (see e.g. this ubuntu wiki page).

A current workaround can be to execute the script with bash (e.g. change the shebang to #!/bin/bash), but better would be to replace the tests with single bracket-versions. More semantic changes are needed than just finding and replacing the double brackets with single ones, but I haven't figured out yet which ones.

from nfancurve.

nan0s7 avatar nan0s7 commented on May 18, 2024

The problem seems to be due to recent additions using bash-code that isn't portable to dash (the standard Debian/Ubuntu /bin/sh). More specifically it uses '[[' test constructs which don't seem to be POSIX-compliant (see e.g. this ubuntu wiki page).

A current workaround can be to execute the script with bash (e.g. change the shebang to #!/bin/bash), but better would be to replace the tests with single bracket-versions. More semantic changes are needed than just finding and replacing the double brackets with single ones, but I haven't figured out yet which ones.

Yeah I suspected as much. When I have the spare time I will definitely rewrite it using the POSIX standard. I'll find a way to integrate it better with the rest of the code as well. There is still much to improve on.

Thanks for the workaround for those who want to run it in the meantime!

from nfancurve.

nan0s7 avatar nan0s7 commented on May 18, 2024

I've removed any of the newer bits of code that do not comply with POSIX standards. I've also applied the above edit to the service file which should reduce compatability issues, if it was ever a problem with the original code.

from nfancurve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.