meuter / argon-one-case-ubuntu-20.04 Goto Github PK
View Code? Open in Web Editor NEWport of the argon one case power button and fan script for Ubuntu 20.04 on rpi 4
port of the argon one case power button and fan script for Ubuntu 20.04 on rpi 4
After installing this script, "There is 1 zombie process" is shown in the welcome message(motd).
After debugging, I found that the cause was the following line.
argon-one-case-ubuntu-20.04/argon1.sh
Line 252 in 25b872e
I think just using open()
is enough like this:
echo ' with open("/sys/class/thermal/thermal_zone0/temp", "r") as fp:' >> $powerbuttonscript
echo ' temp = fp.readline()' >> $powerbuttonscript
Not really an issue, but wanted to say this worked great on Ubuntu Server 21.04 as well.
The current temperature is evaluated at install time and inserted into the tempmon script instead of the command to get the current temperature, here: https://github.com/meuter/argon-one-case-ubuntu-20.04/blob/master/argon1.sh#L595
For instance, my script, as installed, looks like:
cat /usr/bin/argonone-tempmon
#! /usr/bin/env bash
while true; do
date
echo "47°C"
sleep 1
# Go back up two lines.
echo -ne "\033[2A"
done
instead of what it should be which is
cat /usr/bin/argonone-tempmon
#! /usr/bin/env bash
while true; do
date
echo "$(( $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ))°C"
sleep 1
# Go back up two lines.
echo -ne "\033[2A"
done
Thanks for this script, it's extremely useful. I would like to request if there could be a command to know the current fan speed.
Hi,
Thank you for creating this useful tool!
I'm having an issue which I suspect means the fans aren't switching on. The tempmon command seems to work fine, but every time I boot up my device I'm getting this error reported to me.
Traceback:
File "/usr/bin/argoned.py", line 11, in <module>
bus = smbus.SMBus(1)
FileNotFoundError: [Errno 2] No such file or directory.
If it helps, I'm running Ubuntu 20.10 on a Pi 4B (4GB), booting with Bootberry.
I realize this script is for 20.04, but I'm wondering if there's a way to modify it to work with 20.10?
Hi There,
May I used your script and distributed for Home-Assistant scripts that I created for the nubie. It will be distributed for Home-Assistant RPI 4 running Debian 10. I tested and run perfectly on my machine. Thanks.
I tested this on Ubuntu 20.10 (Desktop) on the Pi 4, and when I run the argonone-tempmon command I am getting reading in the 36000 range ( 36024, 35537 ) etc. Are the numbers supposed to show up like that?
somewhere like this need to be modified
if rev == 2 or rev == 3:
bus = smbus.SMBus(1)
else:
bus = smbus.SMBus(0)
Hi, I noticed a problem:
Once the script install the fan just keeps running forever, even after my rpi turned off. It stopped only after I unplugged the power supply. Then after I plugged it back in it imminently started the fan even when the rpi was still down.
argonone-config dosent affect it in any way.
Tested on:
Ubuntu 18.04 LTS 64 bit
Raspberri Pi OS 64 bit.
Thank you for providing this script, I really appreciate it! Apologies if this is a dumb question, I'm not super well versed in this.
I recently upgraded my Argon One with an SSD, but in order to get it to boot from USB I had to upgrade from 20.04 LTS to a more recent Ubuntu version. I chose to just go with the most recent version for now (21.10).
The good news is that it seems fanconfig and tempmon still work just fine, but the button sadly no longer turns the Pi off. Does the script need some adjustments in order for the button to work in 21.10? And if so, can you shed some light on what I need to adjust?
Thanks in advance!
The .desktop files generated by the script hardcode Exec='lxterminal ...
; which does not work on ubuntu-mate for instance.
Maybe use Terminal=true
and run the script directly? to be tested...
(initially reported by Joel W.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.