hyprwm/wlroots-hyprland

DisplayLink Support

Closed this issue · 9 comments

(copying the issue template from hyprland)

System Info and Version

System/Version info Hyprland, built from branch at commit cba1ade848feac44b2eda677503900639581c3f4 (props: bump version to 0.40.0). Date: Sat May 4 15:42:32 2024 Tag: v0.40.0, commits: 4606

flags: (if any)

System Information:
System name: Linux
Node name: censored
Release: 6.8.10-400.asahi.fc40.aarch64+16k
Version: #1 SMP PREEMPT_DYNAMIC Mon May 27 16:05:41 UTC 2024

GPU information:

os-release: NAME="Fedora Linux Asahi Remix"
VERSION="40 (Workstation Edition)"
ID=fedora-asahi-remix
ID_LIKE=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux Asahi Remix 40 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora-asahi-remix:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedora-asahi-remix.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/"
SUPPORT_URL="https://discussion.fedoraproject.org/c/neighbors/asahi/asahi-help/94"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
VARIANT="Workstation Edition"
VARIANT_ID=workstation

plugins:

Bug or Regression?

Bug

Description

DisplayLink dongles are USB-to-HDMI (or some other display connector) devices that use some Synaptics black magic to transfer the display signal over USB instead of USBs DP alt-mode.

Currently, attempting to start Hyprland with the DisplayLink drivers installed (from synaptics' website) just crashes Hyprland outright, unless WLR_RENDERER_ALLOW_SOFTWARE is enabled. From what I've been able to find this is due to missing wlroots support, everything works on gnome/mutter.

Supposedly this patch makes "regular" wlroots play nice with DisplayLink, unfortunately I haven't been able to manually build hyprland on my machine so I haven't been able to test it out.

How to reproduce

Install the DisplayLink drivers. It doesn't seem to whether a dongle is plugged in or not, just having the drivers installed is enough to crash Hyprland.

Crash reports, logs, images, videos

hyprlandCrashReport1316.txt

you can throw the patch into patches/ and it will automatically be applied during build.

g clone --recursive https://github.com/hyprwm/Hyprland
go into subprojects/wlroots-hyprland
throw the patch into patches/
build hyprland normally

you can throw the patch into patches/ and it will automatically be applied during build.

Unfortunately I can't build hyprland on arm64 Fedora, seems like build issues on Fedora are pretty common (and yes, I've followed the steps in hyprwm/Hyprland#284) and the arm64 part probably doesn't help.

If I set up an Arch arm64 VM, build hyrland there and copy the binary to my fedora system, would that work?

likely not

Update: I got it to build on my machine although I had to revert #10. DisplayLink works great, even the full edid data shows up in hyprctl.

@vaxerski Should I create a Pull request, even though I have no idea how the .patch works, just that it does?

feel free

Ran into a few issues setting up Hyprland + Evdi/DisplayLink - documenting here in hopes it'll helps someone.

My Laptop has an integrated intel GPU and a dedicated Nvidia GPU.

I have two external monitors connected via a wavlink docking station. A few options I explored to get the triple-screen setup working:

  1. ❌ Using Nvidia proprietary drivers
    • could not get hyprctl monitors to detect the two external monitors
  2. ❌ Using nouveau
    • all 3 monitors render properly, but Hyprland crashes often (I couldn't deduce why) and was occasionally laggy
  3. ✅ Using intel integrated graphics
    • this is what I ultimately went with - it's also recommended in the Multi-GPU Hyprland docs
    • out of the box, monitors were detected with hyprctl monitors, but no signals (black screen)
    • works well after manually patching wlroots

For (3), the workaround and explanation provided by Kacper Zuk is available here (do note the caveats):

Specific to Hyprland, building from source, the steps are:

  1. Clone the respository after installing all dependencies as per the installation docs:
    git clone --recursive https://github.com/hyprwm/Hyprland
    cd Hyprland
  2. Edit one line in subprojects/wlroots-hyprland/backend/backend.c using the hack by Kacper Zuk, i.e:
    // change this line (at line 261 for me for wlroots-hyprland commit hash 422207db):
    struct wlr_backend *drm = wlr_drm_backend_create(session, gpus[i], primary_gpu);
    
    // to this:
    struct wlr_backend *drm = wlr_drm_backend_create(session, gpus[i], NULL);
  3. Build, then restart Hyprland
    make all && sudo make install
    

Other details

Hyprland Version:

Hyprland, built from branch main at commit d7ea1b7785f31e9fd6477490309721a19a835592
Tag: v0.41.2-14-gd7ea1b77, commits: 4900

linux version: 6.9.7.arch1-1
evdi-git version: 1.14.5.r2.ge36efa8-1
displaylink version: 6.0-0

This patch is not working correctly.
hyprctl monitors is able to detect the displays, but nothing happens and some apps like waybar crash or freeze.

I have maintained these AUR Packages for a while: https://aur.archlinux.org/pkgbase/hyprland-displaylink-git/
it had a working Patch til Hyprland 0.38.1 https://aur.archlinux.org/cgit/aur.git/tree/displaylink.patch?h=hyprland-displaylink-git

With the combination of patched wlroots https://gitlab.freedesktop.org/kennylevinsen/wlroots/-/compare/master...displaylink-hack?from_project_id=12103

Using the "hack", now DisplayLink is working perfectly in my hyprland. However, i noticed that my laptop fan will constantly be running super loud (Temp > 75°C) with just a Firefox tab.

Then i checked the CPU usage and here's the result
image

Never experienced this before, Just switch to Hyprland yesterday

@Dev-Aligator see if you can reproduce the same issue on Sway or DWL (may need to apply the same wlroots patch elsewhere). If you can, then it may not be a wlroots-hyprland issue. You could also visit the original issue on wlroots to see if anyone else has the same problem there.