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
asusctl: init at 4.0.6 #147786
asusctl: init at 4.0.6 #147786
Conversation
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.
Great work (by the looks of it, can't test it)! I tried my hands at it a while back but gave up very quickly after some complications...
Hm, for some reason the systemd system unit service isn't copied to share/systemd while the user services are |
should probably have more patching since asusctl tries to edit config files (example) would be nice to have a module as well |
d34e113
to
42cce08
Compare
I could be wrong, but I think the convention is to have separate |
Fixed 👍 |
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 won't be able to test this for a few weeks, but it looks good.
For the most part, it seems to be working fine. supergfxd:
asusd:
supergfx can't seem to modprobe, for some reason. |
Also, supergfxd creates Known options:
|
# Use default phases since the build scripts install systemd services and udev rules too | ||
buildPhase = "buildPhase"; | ||
installPhase = "installPhase"; |
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.
# Use default phases since the build scripts install systemd services and udev rules too | |
buildPhase = "buildPhase"; | |
installPhase = "installPhase"; |
Is that not working?
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.
No, because then cargo build is run instead of make.
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.
We definitely want to run our cargo build phase because it is very different from standard cargo build process. We can run anything else in post phases.
Also we already handle stripping and vendoring outself.
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.
This still needs to be fixed properly
Gave this a quick try, something I noticed: supergfxctrl creates it's own modprobe config at Not a showstopper but might throw some people for a loop, not sure the best fix either, since it seems to rely on doing this for any of its features that require a reboot. Ideally the file would be cleaned up if the service is disabled but I don't believe there is a clean way to do that, maybe a patch to prevent it from writing to modprobe.d, and a config option to enable/disable the patch, so the user is aware of non-declarative changes to the system? |
I'd rather get this merged first before pouring more work into this PR |
For sure, its a fairly niche situation in an already niche pkg that's only a portion of the PR, with no obviously correct solution, I agree on getting it merged as it is, just wanted to note it down |
cc @SuperSandro2000 |
Didn't notice the branch conflict. |
Done ✔️ |
+StartLimitInterval=0 | ||
StartLimitBurst=2 | ||
Before=multi-user.target | ||
+After=supergfxd.service | ||
+Requires=supergfxd.service | ||
|
||
[Service] | ||
Environment=IS_SERVICE=1 | ||
-ExecStartPre=/bin/sleep 2 | ||
ExecStart=/usr/bin/asusd | ||
+StateDirectory=asusd | ||
Restart=on-failure | ||
Restart=always | ||
-RestartSec=1 | ||
+RestartSec=4 |
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'd rather overwrite this within the nixos service than patch it.
buildPhase = "buildPhase"; | ||
installPhase = "installPhase"; |
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.
This also needs a proper solution.
Please rebase |
Why do we want /etc/supergfxd.conf managed by nix? Would you, in some cases, want ot be able to switch graphics modes on the fly without having to rebuild your system? Also it might be worth updating supergfxctl seeing as it's currently on 4.0.5 |
It would be great to have some variant of asusctl in NixOS, even if it had some quirks. I would like to at least be able to change from flashing keyboard backlight to a static colour or disable the AniMe Matrix display. |
Because NixOS tries to be mostly stateless and most system wide settings are managed by it.
Do we? I don't know but a specialization could fix that. |
Superseded by #201081 |
Motivation for this change
Add new package asusctl to improve support for ASUS Laptops.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes