Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

displaylink fix: ignore primary argument when using evdi drivers #25

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

nktnet1
Copy link
Contributor

@nktnet1 nktnet1 commented Jul 24, 2024

Fixes #22.

A slightly more robust way to address the issue than the hack provided in #22 - done by checking if the driver being used for the given GPU is evdi. If so, set primary to {}.

Unsure of the following:

  • whether this still falls under "hacky code" mentioned in Hyprland's PR Guidelines
  • variables like drmName and drmVer are auto instead of auto const - have followed the same convention for the newly introduced drmVerName variable
  • whether there exist use cases with evdi drivers and using the passed-in primary_ argument (I assume no)

@nktnet1 nktnet1 force-pushed the patch-displaylink-evdi-v2 branch from 776721b to 3ce6806 Compare July 24, 2024 10:12
@nktnet1 nktnet1 changed the title WIP: displaylink/evdi ignores primary WIP: displaylink fix: ignore primary argument if using evdi drivers Jul 24, 2024
@nktnet1 nktnet1 changed the title WIP: displaylink fix: ignore primary argument if using evdi drivers WIP: displaylink fix: ignore primary argument when using evdi drivers Jul 24, 2024
@vaxerski
Copy link
Member

hm, I am no kernel dev, but this will essentially force KMS to take buffers from your primary gpu instead of them living on evdi.

I have no clue if that has any ramifications for the user.

If it works fine and others can attest to that, I'm fine with this.

@nktnet1 nktnet1 changed the title WIP: displaylink fix: ignore primary argument when using evdi drivers displaylink fix: ignore primary argument when using evdi drivers Jul 24, 2024
@nktnet1
Copy link
Contributor Author

nktnet1 commented Jul 24, 2024

Thanks @vaxerski - I've fixed the style issue. Running clang-format also modified tests/SimpleWindow.cpp - happy to revert if that should be done in a different MR.

I have no clue if that has any ramifications for the user.

I'm uncertain of this too - my assumption based on what I've read and researched thus far is that evdi is incapable of rendering:

image

If it works fine and others can attest to that, I'm fine with this.

I think it's working fairly well for those on wlroots:

evidence-users

and here's a reply to the previous version of my patch (although effectively the same changes):

@nktnet1
Copy link
Contributor Author

nktnet1 commented Jul 24, 2024

Adding to findings above, for the sake of completeness, I've also tested this patch with the nvidia-gpu re-enabled (to simulate multi-GPU users).

Here are the logs (with HYPRLAND_TRACE=1 and AQ_TRACE=1):

lspci and /dev/dri/by-path:
image

Text output
~$ lspci | grep -E 'VGA|3D'
0000:00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S UHD Graphics (rev 04)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] (rev a1)
~$ ls -l /dev/dri/by-path  
total 0
lrwxrwxrwx 1 root root  8 Jul 24 22:55 pci-0000:00:02.0-card -> ../card1
lrwxrwxrwx 1 root root 13 Jul 24 22:55 pci-0000:00:02.0-render -> ../renderD128
lrwxrwxrwx 1 root root  8 Jul 24 22:55 pci-0000:01:00.0-card -> ../card0
lrwxrwxrwx 1 root root 13 Jul 24 22:55 pci-0000:01:00.0-render -> ../renderD129
lrwxrwxrwx 1 root root  8 Jul 24 22:55 platform-evdi.0-card -> ../card2
lrwxrwxrwx 1 root root  8 Jul 24 22:55 platform-evdi.1-card -> ../card3
~$ 

Working as expected.

@vaxerski
Copy link
Member

Running clang-format also modified tests/SimpleWindow.cpp - happy to revert if that should be done in a different MR

ye please do, I should remove it anyways its broken

@nktnet1 nktnet1 force-pushed the patch-displaylink-evdi-v2 branch from 6708ebd to f60d43e Compare July 24, 2024 14:59
@nktnet1
Copy link
Contributor Author

nktnet1 commented Jul 24, 2024

Running clang-format also modified tests/SimpleWindow.cpp - happy to revert if that should be done in a different MR

ye please do, I should remove it anyways its broken

Have been reverted :)

@vaxerski vaxerski merged commit e569340 into hyprwm:main Jul 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Displaylink/Evdi not working (monitors detected, no signal/black screen)
2 participants