Package Details: hyprland-displaylink-git 0.38.1-4

Git Clone URL: https://aur.archlinux.org/hyprland-displaylink-git.git (read-only, click to copy)
Package Base: hyprland-displaylink-git
Description: A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (DisplayLink patch)
Upstream URL: https://github.com/hyprwm/Hyprland
Licenses: BSD
Conflicts: hyprland
Provides: hyprland
Submitter: julian.poidevin
Maintainer: Sandwich
Last Packager: Sandwich
Votes: 3
Popularity: 0.85
First Submitted: 2023-05-14 17:44 (UTC)
Last Updated: 2024-05-02 21:44 (UTC)

Required by (29)

Sources (2)

Pinned Comments

Sandwich commented on 2024-04-30 13:05 (UTC) (edited on 2024-05-01 15:57 (UTC) by Sandwich)

This work is mostly done by matt1606 and clementpoiret. Full credit goes to them, and I will be happy to let them own the package if they wish to.

For this package to work wlroots-displaylink-git will be required as well that I will push soon. This package was initially created by "Kshitij Joshi" and the patch by "kennylevinsen"

Sources: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1823 https://gist.github.com/clementpoiret/992d7b4c8cd3707b21461366c817db4d https://pastebin.com/N2siXAXG

Latest Comments

1 2 3 Next › Last »

Sandwich commented on 2024-05-02 23:01 (UTC)

@cristomc thanks for letting me know about that xdg-desktop-portal-hyprland conflict. I have fixed the issue in the latest wlroots-displaylink-git package

Sandwich commented on 2024-05-02 21:54 (UTC) (edited on 2024-05-02 21:59 (UTC) by Sandwich)

@cristomc I'm glad this works for you :)

Still trying to get this working with 39.1

Your HDMI thing is probably caused by the displaylink patch, which includes following:

const char *render_devices[] = {
    "/dev/dri/card0",
    "/dev/dri/card1",
    "/dev/dri/card2",
    "/dev/dri/card3",
    "/dev/dri/card4",
    "/dev/dri/card5",
        "/dev/dri/card6",
    "/dev/dri/card7",
    "/dev/dri/card8",
    "/dev/dri/card9",
    NULL
};

I do not code in C++ but I believe this is the part that enforces loading of the outputs from the listed cards. And with some black magic, somehow it is able to use both your GPUs? :D

The issue with xdg-desktop-portal-hyprland is that it has wlroots as a dependence. You can install it before installing wlroots-displaylink-git or by doing following yay -S xdg-desktop-portal-hyprland --assume-installed wlroots

Sandwich commented on 2024-05-02 21:45 (UTC)

The package is now compiled from git instead of tarball. It still fails to compile for v0.39.1

cristomc commented on 2024-05-02 14:14 (UTC)

@Sandwich thank you so much for update this package :)

I tested it and it works... it enabled my HDMI output on my laptop (even when Hyprland said in their Q/A that is not supported if I don't enable to work with the external GPU :S - REF: https://wiki.hyprland.org/FAQ/#my-external-monitor-is-blank--doesnt-render--receives-no-signal-laptop )

I'll test later how works with my dock (which has display link), but I wanted you to know that this side-effect "feature"

One thing I noticed is that I'm not able to instal xdg-desktop-portal-hyprland, but xdg-desktop-portal-hyprland-git is installed... will this work properly (even if you use the tarball version)? for now I don't see anything broken (but I didn't tested deeply)

Sandwich commented on 2024-05-02 08:33 (UTC)

This package is out of date since it uses the tarball release instead of git. I am unable to make the patch work with the latest Hyprland version, and it is probably not possible to remove -git from the package suffix

Sandwich commented on 2024-05-01 15:57 (UTC)

Patched wlroots package was uplaoded: https://aur.archlinux.org/packages/wlroots-displaylink-git

Sandwich commented on 2024-04-30 13:05 (UTC) (edited on 2024-05-01 15:57 (UTC) by Sandwich)

This work is mostly done by matt1606 and clementpoiret. Full credit goes to them, and I will be happy to let them own the package if they wish to.

For this package to work wlroots-displaylink-git will be required as well that I will push soon. This package was initially created by "Kshitij Joshi" and the patch by "kennylevinsen"

Sources: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1823 https://gist.github.com/clementpoiret/992d7b4c8cd3707b21461366c817db4d https://pastebin.com/N2siXAXG

freqmod commented on 2024-03-18 22:08 (UTC) (edited on 2024-03-18 22:15 (UTC) by freqmod)

I have had success with using the follwing patch with sway / wlr-roots and hyprland (git hash 4ffcdc41): (as of wlroot-git 50eae512d, i don't think the changes to allocator.c are required):

 
diff --git backend/backend.c backend/backend.c
index 0021dbae..5135113d 100644
--- backend/backend.c
+++ backend/backend.c
@@ -258,7 +258,7 @@ static struct wlr_backend *attempt_drm_backend(struct wlr_backend *backend, stru

    struct wlr_backend *primary_drm = NULL;
    for (size_t i = 0; i < (size_t)num_gpus; ++i) {
-       struct wlr_backend *drm = wlr_drm_backend_create(session, gpus[i], primary_drm);
+       struct wlr_backend *drm = wlr_drm_backend_create(session, gpus[i], NULL);
        if (!drm) {
            wlr_log(WLR_ERROR, "Failed to create DRM backend");
            continue;
diff --git render/allocator/allocator.c render/allocator/allocator.c
index 639b52be..a8587a49 100644
--- render/allocator/allocator.c
+++ render/allocator/allocator.c
@@ -50,15 +50,31 @@ static int reopen_drm_node(int drm_fd, bool allow_render_node) {
    if (allow_render_node) {
        name = drmGetRenderDeviceNameFromFd(drm_fd);
    }
-   if (name == NULL) {
-       // Either the DRM device has no render node, either the caller wants
-       // a primary node
-       name = drmGetDeviceNameFromFd2(drm_fd);
-       if (name == NULL) {
-           wlr_log(WLR_ERROR, "drmGetDeviceNameFromFd2 failed");
-           return -1;
-       }
-   }
+    if (name == NULL) {
+               name = drmGetDeviceNameFromFd2(drm_fd);
+        if (name == NULL) {
+                       wlr_log(WLR_ERROR, "drmGetDeviceNameFromFd2 failed");
+            wlr_log_errno(WLR_ERROR, "drmGetPrimaryDeviceNameFromFd failed");
+            return -1;
+        }
+        wlr_log(WLR_DEBUG,
+                "DRM device '%s' has no render node, "
+                "falling back to primary node",
+                name);
+
+        drmVersion* render_version = drmGetVersion(drm_fd);
+        if (render_version != NULL && render_version->name != NULL) {
+            wlr_log(WLR_DEBUG, "DRM device version.name '%s'", render_version->name);
+            if (strcmp(render_version->name, "evdi") == 0) {
+                free(name);
+                name = malloc(sizeof(char) * 15);
+                strcpy(name, "/dev/dri/card0");
+            }
+
+            drmFreeVersion(render_version);
+        }
+    }
+

    int new_fd = open(name, O_RDWR | O_CLOEXEC);
    if (new_fd < 0) {
diff --git render/egl.c render/egl.c
index 19868ca8..fb0f2c34 100644
--- render/egl.c
+++ render/egl.c
@@ -496,25 +496,41 @@ static EGLDeviceEXT get_egl_device_from_drm_fd(struct wlr_egl *egl,
 }

 static int open_render_node(int drm_fd) {
-   char *render_name = drmGetRenderDeviceNameFromFd(drm_fd);
-   if (render_name == NULL) {
-       // This can happen on split render/display platforms, fallback to
-       // primary node
-       render_name = drmGetPrimaryDeviceNameFromFd(drm_fd);
-       if (render_name == NULL) {
-           wlr_log_errno(WLR_ERROR, "drmGetPrimaryDeviceNameFromFd failed");
-           return -1;
-       }
-       wlr_log(WLR_DEBUG, "DRM device '%s' has no render node, "
-           "falling back to primary node", render_name);
-   }
-
-   int render_fd = open(render_name, O_RDWR | O_CLOEXEC);
-   if (render_fd < 0) {
-       wlr_log_errno(WLR_ERROR, "Failed to open DRM node '%s'", render_name);
-   }
-   free(render_name);
-   return render_fd;
+    char* render_name = drmGetRenderDeviceNameFromFd(drm_fd);
+    if (render_name == NULL) {
+        // This can happen on split render/display platforms, fallback to
+        // primary node
+        render_name = drmGetPrimaryDeviceNameFromFd(drm_fd);
+        if (render_name == NULL) {
+            wlr_log_errno(WLR_ERROR, "drmGetPrimaryDeviceNameFromFd failed");
+            return -1;
+        }
+        wlr_log(WLR_DEBUG,
+                "DRM device '%s' has no render node, "
+                "falling back to primary node",
+                render_name);
+
+        drmVersion* render_version = drmGetVersion(drm_fd);
+        if (render_version != NULL && render_version->name != NULL) {
+            wlr_log(WLR_DEBUG, "DRM device version.name '%s'", render_version->name);
+            if (strcmp(render_version->name, "evdi") == 0) {
+                free(render_name);
+                render_name = malloc(sizeof(char) * 15);
+                strcpy(render_name, "/dev/dri/card0");
+            }
+
+            drmFreeVersion(render_version);
+        }
+    }
+
+    wlr_log(WLR_DEBUG, "open_render_node() DRM device '%s'", render_name);
+
+    int render_fd = open(render_name, O_RDWR | O_CLOEXEC);
+    if (render_fd < 0) {
+        wlr_log_errno(WLR_ERROR, "Failed to open DRM node '%s'", render_name);
+    }
+    free(render_name);
+    return render_fd;
 }

 struct wlr_egl *wlr_egl_create_with_drm_fd(int drm_fd) {

danielkrajnik commented on 2023-10-18 19:00 (UTC)

is setting the export WLR_RENDERER_ALLOW_SOFTWARE=1 variable necessary to run this? Otherwise it seems to error: Failed to initialize EGL context?

danielkrajnik commented on 2023-10-17 23:43 (UTC)

yeah, changing make release to make debug and running makepkg -i adds debug symbols. In the process you develop a growing distaste of ABS's poor documentation...