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
autorandr: 855c18b -> 1.1 #26296
autorandr: 855c18b -> 1.1 #26296
Conversation
wantedBy = [ "sleep.target" ]; | ||
}; | ||
|
||
services.udev.extraRules = '' | ||
ACTION=="change", SUBSYSTEM=="drm", RUN+="${pkgs.bash}/bin/sh -c '${pkgs.systemd}/bin/systemctl is-active -q graphical.target && ${pkgs.systemd}/bin/systemctl start autorandr.service'" |
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.
ACTION=="change", SUBSYSTEM=="drm", TAG+="systemd", ENV{SYSTEMD_WANTS}="autorandr.service"
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.
@Mic92 Great, thank you! Will ask this to go in upstream.
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.
@Mic92 After a better testing it seems that the rule you suggested doesn't execute at every monitor replug (which is desired behaviour). Insisting on my rule line then and reopening PR... phillipberndt/autorandr#61 (comment)
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.
Then I would rename the upstream unit to autorandr@.service
and set BindsTo
to the device node to systemd to make the service restart, whenever the device appears/disappears:
ACTION=="change", SUBSYSTEM=="drm", TAG+="systemd", ENV{SYSTEMD_WANTS}="autorandr@%E{DEVNAME}.service"
If this does also not work. I would at least remove the raise condition (systemctl is-active check) and make systemctl non-blocking:
${pkgs.systemd}/bin/systemctl start --no-block autorandr.service
@Mic92 Fixed in upstream. Thank you much for the help! |
@@ -22,19 +22,9 @@ in { | |||
|
|||
environment.systemPackages = [ pkgs.autorandr ]; | |||
|
|||
# systemd.unitPackages = [ pkgs.autorandr ]; | |||
systemd.packages = [ pkgs.autorandr ]; |
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 have enabled the service and it also seems to be trigger:
services.autorandr.enable = true;
Jun 08 12:08:56 turingmachine autorandr[12586]: Failed to load profile 'default': Profile not found (line 1035)
Jun 08 12:08:56 turingmachine autorandr[12586]: Running autorandr as joerg for display :0
Jun 08 12:08:56 turingmachine systemd[1]: Started autorandr execution hook.
So the idea would be to make a default
profile in my user account for autorandr?
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.
@Mic92 You will need to manually configure autorandr to make use of it. Default is often created as a symlink to desired be-default profile https://github.com/phillipberndt/autorandr#how-to-use
@Mic92 Thank you! |
@gnidorah when trying to use this service I get:
any ideas on what is up? |
impurity ... |
There should be a |
BTW autorandr is X11 only thing, no Wayland support. What is the best way to indicate that? |
Motivation for this change
Update package and also fix
predetect
script usageThings done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)