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
displaylink: 1.3.52 -> 4.1.9 and refactor #34194
Conversation
@GrahamcOfBorg build displaylink |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
Ah, it's unfree, ignore the build errors :) |
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 doesn't build for me; probably needs hardeningDisable = [ "format" ];
because of kernel module errors.
Before you fix my other comments -- are you sure FHS environment is really necessary? Binary corruption can be possibly fixed with just dontStrip = true;
.
P.S.: I don't have hardware to test this, so I rely on you saying that it works.
@@ -48,9 +48,10 @@ in | |||
after = [ "display-manager.service" ]; | |||
conflicts = [ "getty@tty7.service" ]; | |||
path = [ pkgs.kmod ]; | |||
wantedBy = [ "multi-user.target" ]; |
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.
My memory is hazy but I think this service is started automatically by udev rules, so no need for that.
executable = true; | ||
text = '' | ||
#!${bash}/bin/bash | ||
exec ${fhsEnv}/bin/displaylink-fhs-env "${displaylink}/bin/DisplayLinkManager" |
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.
Better use runScript
in fhsEnv
.
}; | ||
in writeTextFile { |
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.
Won't other files, like udev rules, be hidden in package because of that indirection?
|
||
let | ||
version = "4.1.9"; | ||
libPath = lib.makeLibraryPath [ stdenv.cc.cc utillinux libusb1 evdi ]; |
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.
It's not used in code anymore.
@abbradar Thank you for your review! As you can see, I'm a Nix(OS) newbie so your hints are highly appreciated.
Um, it works here without
Sadly, yes. When creating the PR from scratch, I tried again with
It works here, but of course, it's better to have more testers. I'll ask a friend of mine who also runs NixOS to test it, too, but that's all I can do. EDIT: It works for him
Your memory is correct ;) I removed the
Yes, but that should be fixed now with the |
While this commit updates displaylink, it also refactors the package to use a FHS env. This is because the binary of displaylink breaks when modifying the RPATH with patchelf. So a little wrapper is created around it, running the binary in the chroot
@Scarmiglione Very strange, I just now tried to bump DisplayLink's version in our existing package and the binary ( Can you try building https://github.com/abbradar/nixpkgs/commits/displaylink and verifying if resulting binary fails for you? |
@abbradar It seems to run with your branch, but my two monitors are not detected. So what are we going to do with this? Do you know any other troubleshooting methods? |
Does daemon run and is |
Yes, the daemon is running and the evdi module is loaded |
Maybe If we won't be able to solve this in a reasonable amount of time let's use your FHS implementation instead. |
Probably you mean |
@schuppentier I think I fixed that, can you try if it works now? |
@abbradar Yes! This really fixes it! This message is typed on a browser on my DisplayLink monitor, running your branch. Do you want to create a new PR that replaces this one? |
Awesome ;) I'll just push to master then after one more evaluation test (I'll close this one when I push). Thank you! |
Thank you very much for your help :) Will this be part of the next NixOS release btw? |
Yeah, I still have plenty of time to push that. I'll backport this to 17.09 too. |
Alright, thank you for your time and effort 👍 |
Do you also backport evdi? It's required for DisplayLink and broken on the current kernel. |
@schuppentier Yeah, plan to do so. Generally our policy is that it's okay to backport version changes to stable releases if it's needed to fix something. |
@schuppentier is there anything required to use this other than adding it to My config: https://github.com/azdle/my-nixos-config/blob/master/desktop-configuration.nix#L31 |
@azdle Try something like |
Dang, that did it. You rock. I ran:
and both of my external displays then showed up in gnome's "displays" settings pane as turned off. Turned each one and they're both working now. It's somehow making firefox really laggy (multiple seconds of lag) and the whole UI goes laggy when I close the lid, but this is a whole lot closer than I've gotten before and this is something that should be much more googleable. Again, thanks, so much. Edit: resetting |
While this commit updates displaylink, it also refactors the package to
use a FHS env. This is because the binary of displaylink breaks when
modifying the RPATH with patchelf. So a little wrapper is created around
it, running the binary in the chroot.
This is the first time I use an FHS env, so please look at this accurately.
Motivation for this change
The current version of displaylink doesn't work because patchelf breaks the RPATH.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)