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

FYI, kernels 5.14+ removed drm_irq.h and compat_alloc_user_space(). #308

Closed
jasonriedy opened this issue Sep 12, 2021 · 66 comments
Closed

Comments

@jasonriedy
Copy link

As a heads-up evdi cannot build on kernels at or beyond 5.15. Looks like drm_irq.h actually isn't used, but I don't know my ioctls well enough to poke at the compat_alloc_user_space() issue.

Really wish this were upstream. Really wish I had done the research to find the binary blob issue. sigh.

@nilathedragon
Copy link

nilathedragon commented Sep 26, 2021

I got it to build under 5.15, but I am soooo not qualified to properly fix it or debug if it actually works. Kinda need this to work on 5.15 (fixes some issues with my hardware)

Edit: I can confirm my evdi fork does indeed work on 5.15 :)

@FBobbioC
Copy link

FBobbioC commented Nov 4, 2021

@Infinytum:

I am running Slackware64-current. I tried building evdi-kernel under 5.15 and was not able to do so. The error message is the following:
evdi-1.9.1/module/evdi_drm_drv.h:23:10: fatal error: drm/drm_irq.h: No such file or directory
23 | #include <drm/drm_irq.h>

What did you have to modify for it to build for you? I also downloaded the zip file from your evdi fork and still had the same issue

@nilathedragon
Copy link

@Infinytum:

I am running Slackware64-current. I tried building evdi-kernel under 5.15 and was not able to do so. The error message is the following: evdi-1.9.1/module/evdi_drm_drv.h:23:10: fatal error: drm/drm_irq.h: No such file or directory 23 | #include <drm/drm_irq.h>

What did you have to modify for it to build for you? I also downloaded the zip file from your evdi fork and still had the same issue

Are you sure you tried my repo? I removed that import from the file...

nilathedragon@273fbb0#diff-c00b60aa62f1d5ca62e486eff56f6f9a22e5659f0fcd1731e8cf83c95c409bc7L23

@FBobbioC
Copy link

FBobbioC commented Nov 4, 2021

@Infinytum:

Thank you for your guidance. Somehow, even though the files were in the tar.gz file, as you mentioned, the /tmp for the build was pulling the files from some other location and overwriting them. I copied the three files manually and evdi-kernel was able to build successfully

@nilathedragon
Copy link

@FBobbioC Glad that worked out for you!

@francoism90
Copy link
Contributor

@Infinytum Thanks for your repo, are you interested in other merges as well? Does seem the current developers don't really seem to care.

@nilathedragon
Copy link

@Infinytum Thanks for your repo, are you interested in other merges as well? Does seem the current developers don't really seem to care.

What merges would you have in mind?

@francoism90
Copy link
Contributor

@Infinytum #315

However I still think they should do more about the performance issues everyone has when using this module.

@nilathedragon
Copy link

@francoism90 Merged that PR into my repo.

@aaronrancsik
Copy link

aaronrancsik commented Nov 13, 2021

Thank You everyone here! I just made fork package for arch users with kernel 5.15+ which use the @Infinytum fork for source.
https://github.com/aaronrancsik/evdi-arch

@nilathedragon
Copy link

@aaronrancsik Awesome! Obligatory I use arch BTW, will take a look at it :)

@francoism90
Copy link
Contributor

francoism90 commented Nov 15, 2021

@Infinytum Would you be interested in merging this change: https://github.com/francoism90/evdi/commit/5be03ad88fa52e88cc47815fec3cb43730dcd10b

It seems to mostly fix the logging issues when using options evdi initial_loglevel=0, they are still being reported elsewhere, but my knowledge about these kind of things is limited. I would like to remove my repo as I'm not a C developer. :)

@mcardillo55
Copy link

@displaylink-emajewsk @displaylink-mlukaszek @displaylink-dkurek @lspintzyk Could we have these changes merged? Currently broken in Arch Linux.

@displaylink-mlukaszek
Copy link
Contributor

Hi All, we are planning to refresh the branch here on GitHub and we are indeed planning to include key PRs - sorry for the delay, the team have been occupied with other work and could not pick this up earlier.

@realitix
Copy link

Hello, could you merge the patch soon ? All Arch users are blocked and need to use the fork of francoism90.
Thanks

@robmaster2016
Copy link

I can compile the Kernel for 5.14 and 5.15, but the Module doesn't work. My screens stay black.

@francoism90
Copy link
Contributor

@robmaster2016 Are you using Wayland or Xorg? It doesn't work for me at all on Xorg, but it does work fine on Wayland.

@Ashark
Copy link

Ashark commented Nov 19, 2021

@francoism90 @robmaster2016
It does work for me. Build for linux 5.15.2. In x11 it works as expected, I created 20-evdo.conf as Arch Wiki says.
On wayland on amd card when I disable one of the monitors (mine displaylink has two ports), then the screen goes black. When they are both enabled, then it works. To avoid phantom space, I just dragged that phantom monitor onto another one.

Edit: I just caught it. When hot plugged dl device in x11. When I cold plug it (boot with it already plugged in), then it works.

@olof-nord
Copy link

Hello @displaylink-mlukaszek, many thanks for your input regarding this.
Do you have any estimation for when this could be available?

evdi is unfortunately not working for Linux 5.15 at the moment.

@wvdakker
Copy link

Can confirm it works with the latest Debian kernel upgrade (5.15.3)

@groovyman
Copy link

It would be helpful to know the platform (CPU, graphic card) that does run the upgraded code.

@wvdakker
Copy link

There is only one real Debian platform (amd64) ;)
Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz

@displaylink-mlukaszek
Copy link
Contributor

This is something that the team is actively working on. You should see PRs getting verification and getting landed, so evdi itself would let you be compatible with fresh kernels again soon. We are currently targeting to release a full driver update in December, this requires much more testing that just evdi.

@francoism90
Copy link
Contributor

@displaylink-mlukaszek Thanks for the update, I'm looking forward to the new improved evdi module. :)

@rohanverma94
Copy link

rohanverma94 commented Nov 29, 2021

@Infinytum:
I am running Slackware64-current. I tried building evdi-kernel under 5.15 and was not able to do so. The error message is the following: evdi-1.9.1/module/evdi_drm_drv.h:23:10: fatal error: drm/drm_irq.h: No such file or directory 23 | #include <drm/drm_irq.h>
What did you have to modify for it to build for you? I also downloaded the zip file from your evdi fork and still had the same issue

Are you sure you tried my repo? I removed that import from the file...

infinytum@273fbb0#diff-c00b60aa62f1d5ca62e486eff56f6f9a22e5659f0fcd1731e8cf83c95c409bc7L23

This worked for me on kernel 5.15.4, Fedora 35. I hope new releases for Kernel 15+ are coming soon.

@ryepup
Copy link

ryepup commented Nov 29, 2021

I ran into this on Ubuntu 21.10 Impish. I use https://github.com/AdnanHodzic/displaylink-debian to manage display link, which is basically a big shell script to run a bunch of commands I don't quite understand that gets all the kernel modules and systemd stuff in place.

For reference, this is what I did to get my monitors working again after updating to kernel 5.15.4.

  1. ran the displaylink-debian script to uninstall everything

  2. reboot, unplug the dock

  3. ran displaylink-debian to install the latest versions of evdi and friends, reboot and plug the dock back in.

    At this point, my docked keyboard/mouse work, but the monitors are blank. The displaylink-driver.service systemd service is constantly restarting itself (can see that in /var/log/syslog or running systemctl status displaylink-driver.service). The service is trying to ensure the evdi module is installed, and then if needed, runs dkms install evdi/1.9.1. That dkms is failing due to the drm_irq.h problem this issue is about.

  4. gave myself permission to the evdi source code: sudo chown -R $USER /usr/src/evdi-1.9.1

  5. edited those files to apply the changes mentioned earlier by @nilathedragon at nilathedragon@273fbb0#diff-c00b60aa62f1d5ca62e486eff56f6f9a22e5659f0fcd1731e8cf83c95c409bc7L23

    At this point, the constant restarts of displaylink-driver.service finally succeed in running dkms install evdi/1.9.1, and the service is up and running. However, my monitors still didn't work.

  6. Remove /etc/X11/xorg.conf.d/20-displaylink.conf, and reboot. This file was created by displaylink-debian, and didn't do the right thing for me.

If you're not using displaylink-debian, then patching /usr/src/evdi-1.9.1 and running sudo dkms install evdi/1.9.1 might be sufficient.

@chriscarpenter12
Copy link

To be clear I did finally get it working with the adapter I had bought, but I had terrible ghosting on all my displays and just "broken" looking rendering. Sub-optimal at best and definitely not usable for day to day work. Will be returning the adapter unfortunately.

Took a chance hoping for the best, but it just didn't work out for my current setup.

Followed steps listed here in combination with displaylink-debian in case it helps anyone else.

@F4FXL
Copy link

F4FXL commented Dec 15, 2021

To be clear I did finally get it working with the adapter I had bought, but I had terrible ghosting on all my displays and just "broken" looking rendering. Sub-optimal at best and definitely not usable for day to day work. Will be returning the adapter unfortunately.

Took a chance hoping for the best, but it just didn't work out for my current setup.

Followed steps listed here in combination with displaylink-debian in case it helps anyone else.

This did not do the trick for me. Now it is complaining about missing drm/drm-drv.h

In file included from /var/lib/dkms/evdi/1.9.1/build/evdi_platform_dev.c:30:
/var/lib/dkms/evdi/1.9.1/build/evdi_drm_drv.h:20:10: fatal error: drm/drm_drv.h: Aucun fichier ou dossier de ce type 20 | #include <drm/drm_drv.h>

Running Debian Sid with follwing kernel :
5.15.0-2-amd64 #1 SMP Debian 5.15.5-1 (2021-11-26) x86_64 GNU/Linux

@francoism90
Copy link
Contributor

displaylink-debian.sh downloads and extracts the contents of the official DisplayLink Ubuntu driver.

@chriscarpenter12 If this is correct (I cannot verify, not running Debian), this would overwrite the evdi files each time. When do you overwrite the files? Think @F4FXL keeps getting the old one.

Better would be DisplayLink just releasing a new evdi module.

@chriscarpenter12
Copy link

chriscarpenter12 commented Dec 15, 2021

If this is correct (I cannot verify, not running Debian), this would overwrite the evdi files each time. When do you overwrite the files?

After running dkms build evdi/1.9.1 the debian installer script seemed to detect it was already available ¯_(ツ)_/¯

Better would be DisplayLink just releasing a new evdi module.

Can't agree more. I was just trying to get something working.

@amija004
Copy link

I ran into this on Ubuntu 21.10 Impish. I use https://github.com/AdnanHodzic/displaylink-debian to manage display link, which is basically a big shell script to run a bunch of commands I don't quite understand that gets all the kernel modules and systemd stuff in place.

For reference, this is what I did to get my monitors working again after updating to kernel 5.15.4.

1. ran the `displaylink-debian` script to uninstall everything

2. reboot, unplug the dock

3. ran `displaylink-debian` to install the latest versions of `evdi` and friends, reboot and plug the dock back in.
   At this point, my docked keyboard/mouse work, but the monitors are blank. The `displaylink-driver.service` systemd service is constantly restarting itself (can see that in `/var/log/syslog` or running `systemctl status displaylink-driver.service`). The service is trying to ensure the `evdi` module is installed, and then if needed, runs `dkms install evdi/1.9.1`. That `dkms` is failing due to the `drm_irq.h` problem this issue is about.

4. gave myself permission to the `evdi` source code: `sudo chown -R $USER /usr/src/evdi-1.9.1`

5. edited those files to apply the changes mentioned earlier by @nilathedragon at [nilathedragon@273fbb0#diff-c00b60aa62f1d5ca62e486eff56f6f9a22e5659f0fcd1731e8cf83c95c409bc7L23](https://github.com/nilathedragon/evdi/commit/273fbb0a67eca5f60fd2aaab0e25076dae4d8a3a#diff-c00b60aa62f1d5ca62e486eff56f6f9a22e5659f0fcd1731e8cf83c95c409bc7L23)
   At this point, the constant restarts of `displaylink-driver.service` finally succeed in running `dkms install evdi/1.9.1`, and the service is up and running. However, my monitors still didn't work.

6. Remove `/etc/X11/xorg.conf.d/20-displaylink.conf`, and reboot. This file was created by `displaylink-debian`, and didn't do the right thing for me.

If you're not using displaylink-debian, then patching /usr/src/evdi-1.9.1 and running sudo dkms install evdi/1.9.1 might be sufficient.

This worked for me! PopOS update broke my display, this was the 3rd fix I tried and it works perfectly so far :)

Pop!_OS 21.10 - 5.15.5-76051505-generic

@timnolte
Copy link

@amija004 did you do all of those steps or just

If you're not using displaylink-debian, then patching /usr/src/evdi-1.9.1 and running sudo dkms install evdi/1.9.1 might be sufficient.
On you Pop!_OS? I'm also on Pop!_OS, but using an actual System76 machine, so i don't really want to install a much that is not included and risk future update issues.

@timnolte
Copy link

When I try to just patch the EVDI 1.9.1 source on my Pop!_OS 21.04 system(System76 hardware), and then run sudo dkms install evdi/1.9.1 I get an error the following error:

ERROR (dkms apport): kernel package linux-headers-5.15.5-76051505-generic is not supported
Error! Bad return status for module build on kernel: 5.15.5-76051505-generic (x86_64)

@solarlodge
Copy link

@wvdakker We'd like nothing more than to be merged upstream. However, for various reasons, that doesn't seem to be in the cards in the near future.

Until then we officially support only Ubuntu LTS kernels.

GA or HWE Kernel?

@cdonatom
Copy link
Contributor

So I use fedora 35 and for me the simplest solution is this:

1. Install the displaylink driver rpm from https://github.com/displaylink-rpm:
   `wget https://github.com/displaylink-rpm/displaylink-rpm/releases/download/v5.4.0-1/fedora-34-displaylink-1.9.1-1.x86_64.rpm`
   `sudo dnf install ./fedora-34-displaylink-1.9.1-1.x86_64.rpm`

2. (Maybe) Install the source files for the current kernels:
   `sudo dnf install kernel-devel`

3. Clone the fork of evdi from nilathedragon:
   `git clone https://github.com/nilathedragon/evdi`

4. Copy the contents of evdi/modules to /var/lib/dkms/evdi/1.9.1/source/
   `sudo cp -r ./evdi/module/* /var/lib/dkms/evdi/1.9.1/source/`

5. Compile & Install the the new module  manually for the first time:
   `sudo dkms autoinstall`

With this steps, on each kernel upgrade the dkms autocompiles the module and you don't have to worry about the version magic error and because of the great work of nilathedragon, it also works on the newer kernels.

Devel branch already has the proper fixes for Kernel 5.15.

@amija004
Copy link

@amija004 did you do all of those steps or just

If you're not using displaylink-debian, then patching /usr/src/evdi-1.9.1 and running sudo dkms install evdi/1.9.1 might be sufficient.
On you Pop!_OS? I'm also on Pop!_OS, but using an actual System76 machine, so i don't really want to install a much that is not included and risk future update issues.

@timnolte I patched the notes according to the diff files. Basically just removed a bunch of code blocks iirc. I'm pretty sure these changes would be overwritten by a relevant update

When I try to just patch the EVDI 1.9.1 source on my Pop!_OS 21.04 system(System76 hardware), and then run sudo dkms install evdi/1.9.1 I get an error the following error:

ERROR (dkms apport): kernel package linux-headers-5.15.5-76051505-generic is not supported
Error! Bad return status for module build on kernel: 5.15.5-76051505-generic (x86_64)

I got this until I overwrote the evdi files. I needed to chown them and apply the changes manually. That was really the only step in the process necessary for me to get the dkms install to work.

@timnolte
Copy link

@amija004 interesting, I tried patching the EVDI files and still got an error.

@amija004
Copy link

@amija004 interesting, I tried patching the EVDI files and still got an error.

@timnolte I'm running through my history to figure out what I did, sorry for the lack of clarity. I used the ubuntu installer instead of the debian. I completely uninstalled evdi as I had tried to use the APT version, ran the ubuntu installer, grabbed the EVDI from the given source, modified the files in the manner described, and then dkms install evdi/1.9.1.

It works, but I have to manually power down, software shutdown hangs. Small price to pay for working screens imo.

@timnolte
Copy link

@amija004 huh, I think I may just bite the bullet and find a new dock that doesn't require DisplayLink, and hopefully also no EVDI. I'm not really OK with a buggy solution in my work machine. If it was just a personal machine that wasn't used as much I'd be OK dealing with some buggy issues but not when my time is going to cost either my company or my clients time or money.

@F4FXL
Copy link

F4FXL commented Dec 29, 2021

@amija004 huh, I think I may just bite the bullet and find a new dock that doesn't require DisplayLink, and hopefully also no EVDI. I'm not really OK with a buggy solution in my work machine. If it was just a personal machine that wasn't used as much I'd be OK dealing with some buggy issues but not when my time is going to cost either my company or my clients time or money.

I was thinking the same too, I am tired of having to fiddle around and will look for a more turnkey solution.

@olof-nord
Copy link

From similar discussions (and conclusions, ie. to buy a different device), here's a non-displaylink recommendation from @GraemeDBlue

#262 (comment)

F4FXL referenced this issue in AdnanHodzic/displaylink-debian Jan 5, 2022
First check if the latest version is a beta version.
If it is => try to download previous version
@ghost
Copy link

ghost commented Jan 11, 2022

So it's possible that the DisplayLink team are keeping this relatively quiet because there may be further work in-progress, but after running into this same issue today, and for anyone curious to try it out:

288f4b6 (within this repository) has resolved the drm_irq.h include issue, and I've been able to build an evdi module from aef6790 (also within this repository) that (after signing) loads correctly and provides DisplayLink support.

@displaylink-emajewsk
Copy link
Contributor

This has been fixed in evdi 1.10

@cypherworld
Copy link

why is this closed when it's still an issue?

@cypherworld
Copy link

This has been fixed in evdi 1.10

apt info evdi-dkms
Package: evdi-dkms
Version: 1.9.0+dfsg-1
Priority: optional
Section: kernel
Source: evdi
Maintainer: Hanno Stock [email protected]
Installed-Size: 160 kB
Depends: dkms (>= 2.1.0.0)
Recommends: libevdi0
Homepage: https://github.com/DisplayLink/evdi

still has this issue

@displaylink-emajewsk
Copy link
Contributor

apt info evdi-dkms
Package: evdi-dkms
Version: 1.9.0+dfsg-1

As you can see your version is 1.9 and not 1.10. We don't maintain the "evdi-dkms" package, its updates rely on a third party.

@squalou
Copy link

squalou commented Feb 21, 2022

for the records, on Debian side :

https://tracker.debian.org/pkg/evdi

1.10 tar gz available, not yet packaged

I installed from these packaged source and it works fine.

@cypherworld
Copy link

apt info evdi-dkms
Package: evdi-dkms
Version: 1.9.0+dfsg-1

As you can see your version is 1.9 and not 1.10. We don't maintain the "evdi-dkms" package, its updates rely on a third party.

you mentioned that you have your own repo. Can you send me the details?

@displaylink-emajewsk
Copy link
Contributor

you mentioned that you have your own repo. Can you send me the details?

I don't believe I did. For now, the only official way to get the software is here: https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu

If the company lets me set up actual repos, I'll tell you. 😋 I'd be happy to do it.

@Landomym
Copy link

for the records, on Debian side :

https://tracker.debian.org/pkg/evdi

1.10 tar gz available, not yet packaged

I installed from these packaged source and it works fine.

Thank you very much man!! It worked perfectly for me.

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

No branches or pull requests