Answer the question
In order to leave comments, you need to log in
What is wrong with my bash script?
Task: after resume or thaw, run a script that, using the aticonfig utility, will reduce the speed of the video card cooler. During a normal start, the cooler spins at a speed of 20%. And if the computer starts up after suspend, then the cooler spins at a speed of 35%, which is quite loud.
Through aticonfig, you can set the speed of rotation of the cooler.
aticonfig --pplib-cmd "set fanspeed 0 N"
#!/bin/sh
case "${1}" in
resume|thaw)
exec aticonfig --pplib-cmd "set fanspeed 0 10"
;;
esac
aticonfig --pplib-cmd "get fanspeed 0"
Answer the question
In order to leave comments, you need to log in
Have you tried redirecting stdout and stderr to a file? Maybe aticonfig writes something about this. Is there anything strange in dmesg too?
As a hypothesis, the script works too early, after it someone else starts (for example, it is reinitialized when X starts) and resets the setting to default.
Didn't find out, 35% is the minimum default speed of your video card cooler or will it drop lower if you improve the cooling of the video card?
As a direct and reliable solution - to change the bios of the video card with a modified cooler control scheme.
Whence such conviction that the script in general is executed?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question