cm-rgb
cm-rgb copied to clipboard
Add GUI for cm-rgb-monitor
Thank you for merging my original script, I'm glad it could be useful !
I updated the original a bit (mainly cleaning it) and made another script for cm-rgb-monitor this time.
The "Open CM-RGB" button requires the cm-rgb-gui script to be in a PATH folder, I don't really know how the installation is setup but it should be pointed out. Also, the script probably won't run on anything other than Linux as I used some basic commands (cut, sed) and bashism.
Awesome work!
Take a look at the current cm-rgb-monitor we have couple of new features which may benefit from your gui.
I just checked the new features and the CPU frequency is really handy. I'll work on adding it to the script ! However, the mirage function didn't work for me. I guess I need to specify the fan speed source, but how can I list the sources?
Try cm-rgb-monitor --list-temp-sources (I know, super intuitive :smile:) There is a section for fan speed sensors. I have an issue with drivers on my motherboard and I was unable to test this feature.
Ok, I think it works? But apparently I don't have any fan speed sensors or it doesn'T pick them up. Also it means that I have to update my script to take into consideration the new lines that come after the temperature sensors.
Try running sensors
and see if your system recognizes any fans.
Underlying code is very simple and I think it may be better to actually duplicate it rather than parse the output.
def print_available_sources(ctx,value):
if value:
print("Available sensors:")
sensorDict = psutil.sensors_temperatures()
for chipname, chip in sensorDict.items():
for feature in chip:
print(chipname + "/" + feature.label," -> ", feature.current)
print("Available fan speed sensors for mirage:")
fanDict = psutil.sensors_fans()
for chipname, chip in fanDict.items():
i = 0
for feature in chip:
print(chipname + "/" + str(i)," -> ", feature.current)
ctx.exit()
No the sensors
command doesn't return any fans meaning it's an issue from my end.
I came up with cm-rgb-monitor --list-temp-sources | sed -n '/Available sensors:/d ; /Available fan.*/q;p' | cut -d' ' -f1
to parse it.
Since it's a GUI I don't really want the user to be reliant on my script to troubleshoot it if something goes wrong. That's your job ;)
Fair enough :)
Functionally this looks fine, however I imagine people would like to run run monitor as a systemd service or whatever the windows has. In order to join those 2 things together monitor would have to have an ability to load the settings from config file i guess.
I have to think this through and see how other apps do it.
My current setup is saved led config that is activated when my pc is booting with breathing mode on fan and ring. This is taken over by the service as soon as usb device becomes available to the system. As a whole I think this looks very nice and your gui would make it very easy to set up.
I'll have some time on the next weekend and I hope to come up with something.
A great idea ! I could also make the gui create a config file and save it. It would be easy since I already have all the inputs.
I added support for all the new features.
But I encountered an issue while running cm-rgb-cli, the fan rgb blinks continuously when I set a color using cm-rgb-cli. The breathing works fine but its blinking while doing it.
There's no issue with the logo or the ring, and running cm-rgb-monitor seemingly fixes it (until exited)
On windows using the official software there's this issue is not present. I'm really confused it just appeared out of nowhere.
Interval might be to small it was changed recently, it can be changed using argument.
Thanks for the answer, if I set the color and mode with the cli and then set the interval with monitor and exit its fixed. I couldn't seem to find an interval option in cm-rgb-cli tho.
That's great to hear. Regarding CLI that is correct, it sends it's settings once so there is no need for an interval.
Where are the initial settings stored? Because the blinking is constant when I use cm-rgb-cli alone, the workaround is pretty tedious too. I was looking through the code and I noticed the new effects for the ring, do you think they could be implemented to the fan ?
If I remember correctly on the original app from the manufacturer fan and ring have different modes available and I can't do much about it.
As for the blinking with the cli, could you perhaps do a short video + executed command ?
Alright I'll do it later today
$ cm-rgb-cli set logo --mode=static --color=ffffff --brightness=5 fan --mode=static --color=ff0000
$ cm-rgb-cli set logo --mode=static --color=ffffff --brightness=5 fan --mode=static --color=ff0000 save
$ cm-rgb-monitor
^C
Aborted!
$
That is so weird ! I bet this is a bug with mirage support, this is most likely very low frequency mirage on red channel. Try fiddling with those arguments you should see a change. I'm pretty sure I'm not properly clearing those settings out.
Also please run cm-rgb-cli version
perhaps you have slightly different firmware version; worth checking out.
You were right, maxing the mirage frequencies fixes the issue. The default of 0 was causing the problem.
I'll have to recreate this on my setup and fix this. I'm done for today, rough day :) Good day to you.
I've isolated the issue to the cli script. Turns out when you don't specify mirage frequency instead of default 0hz click clamps the value to 3hz.
There is new version available with fix in place
Yes it is fixed, nice job !