-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading fan tables from a configuration file #44
base: master
Are you sure you want to change the base?
Conversation
@@ -10,7 +19,7 @@ | |||
"windows": { | |||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" | |||
}, | |||
"runtimeArgs": ["./dist/tuxedo-control-center"], | |||
"runtimeArgs": ["./dist/tuxedo-control-center", "--debug"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just for executions in VSCode or for release as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--debug
is only passed when you run the Debug Main Process
target from vscode. It would possible to pass to a release build as well. I'm not sure how to avoid that though.
It opens the dev tools / inspector immediately as the application launches which I found useful, especially for placing breakpoints and stepping through things.
currentRows.push([parseInt(match[1]), parseInt(match[2]), parseInt(match[3])]); | ||
} else if((match = sectionLineRegex.exec(line)) !== null) { | ||
if(currentProfile !== null) { | ||
profiles.push(this.createFanProfile(currentProfile, currentRows)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if currentRows is null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currentRows
should never be null but could be an empty list.
are you saying that empty profiles should be discarded? For example
[MyProfile]
[MyOtherProfile]
0,0,0
only MyOtherProfile
should be created?
@@ -134,7 +134,11 @@ export class TuxedoControlCenterDaemon extends SingleProcess { | |||
|
|||
public catchError(err: Error) { | |||
this.logLine('Tccd Exception'); | |||
const errorLine = err.name + ': ' + err.message; | |||
let errorLine = err.name + ': ' + err.message; | |||
let stack = err.stack; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be const?
2. Clone & install libraries | ||
|
||
2. Install `tuxedo-cc-wmi` (can be obtained from the respositories [here](https://www.tuxedocomputers.com/en/Infos/Help-and-Support/Instructions/Add-TUXEDO-Computers-software-package-sources.tuxedo#)). | ||
This package provides a driver at `/dev/tuxedo_cc_wmi`. The control center can run without this but will not be functional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a dependency list to add it to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the question. I just thought I would mention that if you are building the control center from source then you need to install the driver separately. Previously there was no mention of that in the README.
Co-authored-by: NickMa <[email protected]>
I'd love to see this one merged! IMHO fan speed can be more aggressive. |
is anyone ever going to have a look at this or tell me what should be done differently? It's fine if there are reasons you don't want to take my implementation but just ignoring it for months is a bit annoying. I see developers responding to issues and making commits so it's not that the project is dormant. |
This merge is really important. |
Hello, please don't take offence, there is no intentional ignoring going on :) Sometimes feature requests are overlooked or postponed due to other matters. An answer is however warranted! In the case of this merge request it goes in a slightly different direction. The implementation is still unclear but there are added features planned TUXEDO-wise (which are needed) for modifying the fan behaviour. Also as you mention in the original message, you intend to reimplement tccd in C++. This is of course very much possible and because of the already existing decoupled c++ hardware interface should be pretty simple. This also, however, there currently are no plans on implementing in the main repo. For now it sounds like this is best left out of the main repo and used separately as an alternative by those who find it useful. There seem there might be enough interest. Apart from the bigger design decisions there are some useful commits regarding debugging and descriptions that could be useful for sure! |
but not in a way that can be configured and kept in sync with the settings configured in the control center since settings like the fan curves do not go through configuration files but instead refer to data structures in the tcc code itself. I would rather not keep a fork up to date with any changes made to the source code. It makes sense for such things to be communicated to the daemon without requiring source code to be shared. This makes it easier for other projects to share the configuration without having to parse the source code and gives people the option to edit configuration files without a GUI if they prefer.
Ok, in which case if I do write this daemon I will not submit a pull request. This makes it a bit easier because I will probably use rust instead of C++ (C++ was my suggestion since it would have been more likely to be accepted to the main repo) and will probably not attempt to interface with the control center at all and just use the tuxedo driver but none of the userspace logic or configuration files. The reason I wanted to take the approach of trying to get things merged upstream is so that the maximum number of people can benefit, rather than creating something just for myself and maybe a few people that stumble across it.
does this mean that custom fan curves are going to be added, but not by using a configuration file in
Ok that's fine. Should I close this pull request or create a new one with cherry-picked commits that you would like to take? |
This is true. Some things are still to do to communicate through the d-bus. Example that comes to mind is TCC gui still reads the config files itself and figures out which profile is active => state of tccd should come from tccd directly.
Yeah the intentions are great!
Yes most likely, probably will be some config files, yes, and kind of. Yeah it's just that. Not taking it too far in any direction before it's known what is actually needed, work optimization etc. Also, two types of config files might be one too many ;)
Right, the debug + readme additions look useful at a glance. (With the tuxedo-cc-wmi => tuxedo-io change) If you'd like to put them in a PR I'd be happy to include them. |
hum... Here's my suggestion. I think there could be too much overengineering over this without need:
In short, there is no need to rework a separate daemon if it's simpler to cut the minimum things on TCC to make it work without the GUI. Plus, @tuxedoxt , @mbway and other tuxedo developers can continue developing the same GUI without the hassle of reworking on a completely isolated GUI. However, I'm not sure if tuxedo as a company has some policy on the permission of the repo, so in this case, @tuxedoxt could not accept PR even if he wanted, without some approval 😨. I'm saying this because only the employers of Tuxedo had PRs accepted so far. |
For the rest, I agree with you. |
@brunoais agreed, |
I'm not sure I understand this comment:
The control center already has a GUI component which uses electron, and a standalone node.js application (tccd) which is always running and carries out the configuration as instructed by the control center (via configuration files) and monitors temperature and updates fan speed accordingly. Currently several source files are shared by both programs and there is configuration state (like fan curves) in them. My main issue is with the daemon is that it uses an excessive amount of cpu at all times: #37 and it doesn't handle well when the system is under load (which is when fan control is most important!) #29. |
Thanks @mbway I was not aware of all services there. I thought that the control center and GUI were not isolated as separate services, but rather threads. |
Hello. That's exactly what i am doing
Of course all will be openSource and will be on git. |
@sleepingtux nice to know. If I may suggest, you can add an offset parameter that increases all values in the table by a fixed value. |
Lol that exactly what i did. :D |
added support for reading fan tables from a configuration file.
I chose not to use JSON as the configuration language because:
I'm thinking about building an alternative (more efficient) tccd implementation in C++ for my own use (which I would like to upstream if possible) as a solution to #37 . The first roadblock I hit is that the daemon and the control center share a lot of (typescript) code. The first step, therefore is to decouple the control center and the daemon a bit by reading from configuration files. This has the added benefit of being able to define custom fan curves, providing a partial solution for #8 but without any UI.