mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03: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 {
|
config = mkIf enabled {
|
||||||
|
|
||||||
boot.extraModulePackages = [ evdi ];
|
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.
|
# Those are taken from displaylink-installer.sh and from Arch Linux AUR package.
|
||||||
|
|
||||||
@ -47,18 +62,13 @@ in
|
|||||||
description = "DisplayLink Manager Service";
|
description = "DisplayLink Manager Service";
|
||||||
after = [ "display-manager.service" ];
|
after = [ "display-manager.service" ];
|
||||||
conflicts = [ "getty@tty7.service" ];
|
conflicts = [ "getty@tty7.service" ];
|
||||||
path = [ pkgs.kmod ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${displaylink}/bin/DisplayLinkManager";
|
ExecStart = "${displaylink}/bin/DisplayLinkManager";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
|
LogsDirectory = "displaylink";
|
||||||
};
|
};
|
||||||
|
|
||||||
preStart = ''
|
|
||||||
mkdir -p /var/log/displaylink
|
|
||||||
modprobe evdi
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -2,20 +2,23 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "evdi";
|
pname = "evdi";
|
||||||
version = "1.6.2";
|
version = "1.6.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "DisplayLink";
|
owner = "DisplayLink";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0ajjsh1fw7w0k28r6qq7kh3qcr87gzzjp8s890algbglynlafzfw";
|
sha256 = "1gp8xbhd5pmcl95izhpvw9gxfcsbv5f80s6q39l4y3z9j734rb8j";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
buildInputs = [ kernel libdrm ];
|
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" ];
|
hardeningDisable = [ "format" "pic" "fortify" ];
|
||||||
|
|
||||||
@ -26,9 +29,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Extensible Virtual Display Interface";
|
description = "Extensible Virtual Display Interface";
|
||||||
platforms = platforms.linux;
|
homepage = "https://www.displaylink.com/";
|
||||||
license = with licenses; [ lgpl21 gpl2 ];
|
license = with licenses; [ lgpl21 gpl2 ];
|
||||||
homepage = https://www.displaylink.com/;
|
platforms = platforms.linux;
|
||||||
broken = versionOlder kernel.version "4.9" || versionAtLeast kernel.version "5.3" || stdenv.isAarch64;
|
broken = versionOlder kernel.version "4.9" || stdenv.isAarch64;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user