Issues with DisplayLink (Asahi)

Hi! I’m new to NixOS (running on a 2020 MacBook Pro with Asahi), and I’m trying to get an external display to work with DisplayLink. DP Alt Mode still doesn’t work, so as far as I know DisplayLink is the only way to go.

System & hardware

  • Kernel: 6.10.6-asahi
  • DE: Xfce 4.18
  • OS: NixOS 24.11.20241004.bc947f5 (Vicuna) aarch64
  • Dock: Dell D6000
  • External display: HP 27q (2560 x 1440)
  • Internal display: Retina (2560 x 1600)

Setup

I installed evdi and displaylink with the method suggested on the wiki, and after a bit of fiddling I got it to install (i had to switch to unstable since evdi 1.14.4 was having issues building). My config looks like this:

{ lib, pkgs, ... }:

{
  nixpkgs.config.allowUnfreePredicate = pkg:
    builtins.elem (lib.getName pkg) [
      "displaylink"
    ];
  services.xserver = {
    videoDrivers = [ "displaylink" "modesetting" ];
  };
}

and dlm.service is up and running:

● dlm.service - DisplayLink Manager Service
     Loaded: loaded (/etc/systemd/system/dlm.service; linked; preset: ignored)
     Active: active (running) since Thu 2024-10-10 13:09:14 CDT; 3s ago
 Invocation: 4a99906de7a74fd6b46bf03235fc9117
   Main PID: 13860 (.DisplayLinkMan)
         IP: 0B in, 0B out
         IO: 4.8M read, 0B written
      Tasks: 13 (limit: 9247)
     Memory: 7.9M (peak: 10.6M)
        CPU: 130ms
     CGroup: /system.slice/dlm.service
             └─13860 /nix/store/vp8y5fgpdb3d7y43cdn9ljqmmy64d7dl-displaylink-6.0.0-24/bin/DisplayLinkManager

The issue

From my understanding, this is supposed to be a “it just works” solution, but it… doesn’t. When I run xrandr, I only see the builtin display:

Screen 0: minimum 320 x 200, current 2560 x 1600, maximum 16384 x 16384
eDP-1 connected primary 2560x1600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   2560x1600     60.00*+

xrandr --listproviders does show two results, so I assume the second is from the DisplayLink adapter.

Providers: number : 2
Provider 0: id: 0x40 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting
Provider 1: id: 0x2ec cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting

The part I’m mainly confused about is the behavior when I try to run xrandr --setprovideroutputsource 1 0. I get an error message that doesn’t make much sense:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  35 (RRSetProviderOutputSource)
  Value in failed request:  0x40
  Serial number of failed request:  16
  Current serial number in output stream:  17

Another (maybe relevant) issue

I think it’s also worth mentioning that I’m having trouble getting the dock to connect at all. When I start the system with the dock plugged in, none of the attached devices work (mouse or keyboard). Unplugging and immediately replugging does not fix the issue. I’ve found that it occasionally works when I wait several minutes before replugging, but I haven’t found a consistent way to get the dock to connect. This is an issue I can live with, but I wanted to share it in case it’s related in any way to the DisplayLink problem.

I’ve been banging my head against the wall for a solid 7 hours trying to figure this out, so I’d really appreciate any help :')