Comments (10)
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.
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.
from nfancurve.
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.
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.
@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.
@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.
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.
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.
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)
- Only one fan of three detected HOT 5
- Harmless but constant error warning HOT 2
- Does not autostart with the systemd user service enabled HOT 10
- Exit script HOT 4
- VDR is crashing with cuvid enabled. HOT 2
- systemd service fails to start HOT 3
- Hysteresis HOT 1
- Division by Zero When Executing temp.sh HOT 1
- Error when starting Script HOT 15
- Theme parsing error and Error assigning value to attribute HOT 1
- What a mess HOT 1
- Min temps does not seem to work HOT 1
- Could you please create a new release ? HOT 2
- usage issues - xorg.conf, service autostart HOT 4
- ERROR: The current user does not have permission for operation HOT 9
- Fan speed does not back to 0 HOT 1
- nvidia-settings allows setting the fan speed from 30% to 100% HOT 3
- headless support suggestion
- nfancurve doesn't keep fan speed as it should when set to low values <30%, speed keeps dropping to 0% HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nfancurve.