Displaylink: Difference between revisions

Sandro (talk | contribs)
Sandro (talk | contribs)
 
Line 39: Line 39:
   };
   };
};
};
<syntaxhighlight lang="nix">
</syntaxhighlight>


====='''Gnome Wayland'''=====
====='''Gnome Wayland'''=====
Line 45: Line 45:
Install displayLink package
Install displayLink package


{{bc|<nowiki>
<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
   displaylink
   displaylink
];
];
</nowiki>}}
</syntaxhighlight>


Define videoDrivers
Define videoDrivers
Line 57: Line 57:


Add dlm service
Add dlm service
{{bc|<nowiki>
<syntaxhighlight lang="nix">
systemd.services.dlm.wantedBy = [ "multi-user.target" ];
systemd.services.dlm.wantedBy = [ "multi-user.target" ];
</nowiki>}}
</syntaxhighlight>
====='''KDE Plasma'''=====
====='''KDE Plasma'''=====


Line 66: Line 66:
Esnure you properly enabled wayland session  
Esnure you properly enabled wayland session  


{{bc|<nowiki>
<syntaxhighlight lang="nix">
environment.variables = {
environment.variables = {
   KWIN_DRM_PREFER_COLOR_DEPTH = "24";
   KWIN_DRM_PREFER_COLOR_DEPTH = "24";
Line 84: Line 84:


};
};
</nowiki>}}
</syntaxhighlight>


Install displayLink package
Install displayLink package


{{bc|<nowiki>
<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
   displaylink
   displaylink
];
];
</nowiki>}}
</syntaxhighlight>


Instead of dlm setup display-link server as follows:
Instead of dlm setup display-link server as follows:


{{bc|<nowiki>
<syntaxhighlight lang="nix">
# --- THIS IS THE CRUCIAL PART FOR ENABLING THE SERVICE ---
systemd.services.displaylink-server = {
systemd.services.displaylink-server = {
   enable = true;
   enable = true;
  # Ensure it starts after udev has done its work
   requires = [ "systemd-udevd.service" ];
   requires = [ "systemd-udevd.service" ];
   after = [ "systemd-udevd.service" ];
   after = [ "systemd-udevd.service" ];
   wantedBy = [ "multi-user.target" ]; # Start at boot
   wantedBy = [ "multi-user.target" ];
  # *** THIS IS THE CRITICAL 'serviceConfig' BLOCK ***
   serviceConfig = {
   serviceConfig = {
     Type = "simple"; # Or "forking" if it forks (simple is common for daemons)
     Type = "simple";
    # The ExecStart path points to the DisplayLinkManager binary provided by the package
     ExecStart = "${pkgs.displaylink}/bin/DisplayLinkManager";
     ExecStart = "${pkgs.displaylink}/bin/DisplayLinkManager";
    # User and Group to run the service as (root is common for this type of daemon)
     User = "root";
     User = "root";
     Group = "root";
     Group = "root";
    # Environment variables that the service itself might need
    # Environment = [ "DISPLAY=:0" ]; # Might be needed in some cases, but generally not for this
     Restart = "on-failure";
     Restart = "on-failure";
     RestartSec = 5; # Wait 5 seconds before restarting
     RestartSec = 5; # Wait 5 seconds before restarting
   };
   };
};
};
</nowiki>}}
</syntaxhighlight>


==Sway==
==Sway==