mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
Merge pull request #72404 from peterhoeg/u/displaylink
displaylink: make it work!
This commit is contained in:
commit
8bddbbaf84
|
@ -19,6 +19,21 @@ in
|
|||
config = mkIf enabled {
|
||||
|
||||
boot.extraModulePackages = [ evdi ];
|
||||
boot.kernelModules = [ "evdi" ];
|
||||
|
||||
environment.etc."X11/xorg.conf.d/40-displaylink.conf".text = ''
|
||||
Section "OutputClass"
|
||||
Identifier "DisplayLink"
|
||||
MatchDriver "evdi"
|
||||
Driver "modesetting"
|
||||
Option "AccelMethod" "none"
|
||||
EndSection
|
||||
'';
|
||||
|
||||
# make the device available
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 1 0
|
||||
'';
|
||||
|
||||
# Those are taken from displaylink-installer.sh and from Arch Linux AUR package.
|
||||
|
||||
|
@ -47,18 +62,13 @@ in
|
|||
description = "DisplayLink Manager Service";
|
||||
after = [ "display-manager.service" ];
|
||||
conflicts = [ "getty@tty7.service" ];
|
||||
path = [ pkgs.kmod ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${displaylink}/bin/DisplayLinkManager";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
LogsDirectory = "displaylink";
|
||||
};
|
||||
|
||||
preStart = ''
|
||||
mkdir -p /var/log/displaylink
|
||||
modprobe evdi
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -2,20 +2,23 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "evdi";
|
||||
version = "1.6.2";
|
||||
version = "1.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DisplayLink";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0ajjsh1fw7w0k28r6qq7kh3qcr87gzzjp8s890algbglynlafzfw";
|
||||
sha256 = "1gp8xbhd5pmcl95izhpvw9gxfcsbv5f80s6q39l4y3z9j734rb8j";
|
||||
};
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
buildInputs = [ kernel libdrm ];
|
||||
|
||||
makeFlags = [ "KVER=${kernel.modDirVersion}" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
||||
makeFlags = [
|
||||
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
"KVER=${kernel.modDirVersion}"
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" "pic" "fortify" ];
|
||||
|
||||
|
@ -26,9 +29,9 @@ stdenv.mkDerivation rec {
|
|||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Extensible Virtual Display Interface";
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://www.displaylink.com/";
|
||||
license = with licenses; [ lgpl21 gpl2 ];
|
||||
homepage = https://www.displaylink.com/;
|
||||
broken = versionOlder kernel.version "4.9" || versionAtLeast kernel.version "5.3" || stdenv.isAarch64;
|
||||
platforms = platforms.linux;
|
||||
broken = versionOlder kernel.version "4.9" || stdenv.isAarch64;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue