-
Notifications
You must be signed in to change notification settings - Fork 186
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
Fails to build on kernel 5.4 #172
Comments
There are more issues. I can post a patch if someone is willing to test it. |
Hi @abucodonosor, |
Sure, this version doesn't have all ifdef's I just made it for @DeX77 to test. |
Tested and works. |
From the patch: But, for linux 5.4.1: |
I didn't look at kernel 5.4.1 yet, but it would be strange f they changed that again. |
I cannot find any patch touching these files in 5.4.1, at least not from what Greg posted there: |
Hmm - I'm confused a bit. I still have linux 5.3.11, from Arch Linux, on one machine, and it also does not have a "/usr/include/linux/dma-resv.h". But, the patch was tested on linux 5.4.0, which did have the dma_resv.h? Something else must be going on here. |
Do you have your kernel source ( or whatever is called in Arch Linux ) installed on your machine? |
No, but I could get it. What would you like to search? |
Well install that package and your build should work. You cannot build custom kernel modules without I may post some proper version of the patch with proper ifdef's but that is something for tomorrow. |
Hmm - the Arch "linux-headers" package - as far as I know - is suppose to have everything that might be required to build kernel modules. If you believe that dma-resv.h is a reasonable build requirement for this evdi module, I will file a bug report with Arch. |
That would be strange and a packaging problem I assume. You should not have <linux/reservation.h> in your kernel-headers packages either but again I have |
@displaylink-dkurek @thx1111 @DeX77 There a new version of the patch: https://crazy.dev.frugalware.org/evdi-1.6.4-kernel-5.4.x.patch |
The header file seems to exist in usr/lib/modules/5.4.1-arch1-1/build/include/linux/dma-resv.h |
Thanks for clarifying that. Apparently, I was looking in the wrong place. I may not be helping much. With the new or old patch, and running I get an error, and have:
The lead-up to, and the line 42, are:
The lines 237 and 238 are:
This log file is the same file as '/var/lib/dkms/evdi/1.6.2/build/make.log', where the directory holds the same set of files as '/usr/src/evdi-1.6.2/', which is "owned" by the package 'evdi-git'. The Makefile is: https://github.com/DisplayLink/evdi/blob/devel/module/Makefile Does the dkms Makefile need to change? |
I have no idea about dkms also I never tested the patch against evdi-1.6.2. Just download evdi-1.6.4, patch the source and run make. |
Hi @abucodonosor I've looked at the patch. There are some things to fix. |
Basically yes but can't do that right now, I'm sorry. |
@abucodonosor, |
probably @DeX77 will do the PR, however, we cannot test compile these old 4.x kernels here, |
building with dkms fails consistently as described by @thx1111, even with your patch applied to the latest version. Since there's no guide to people relatively unfamiliar with kernel modules (like me) on how to install the module without dkms, I'll try to describe what I did to get it working. download the latest repo, apply the patch from @abucodonosor and do a regular To insert this module on every boot create a systemd unit file or initv script that inserts the module for you. Caution: I believe insmod bypasses version checks and if you change your kernel but try to load this module, your kernel may crash. use with caution Disclaimer: This is merely what is working for me, and I don't really know what I'm doing so please be careful with this "advice". Edit: if you use the displaylink.service unitfile, you need to comment out |
@d3rrial I don't and never will use dkms. So no idea what is wrong with it. |
is there any reason why a regular 'make install' target doesn't exist? BTW while looking at that I found the versioning of the library is broken as well the kernel modules version is out-of-sync, want PR's for these too? Eg these: |
@d3rrial Being bored here in hospital I've added install/uninstall & fixed versioning. There an all-in-one patch, including the kernel 5.4 fixes: The patch is against the latest git, but may work for 1.6.4. PREFIX defaults to /usr/local HOWTO use:
I hope that helps you and @thx1111 to test the patch. That patch nothing for you in this form, it contains like 4 PR's, just a help for the users are willing to test around but have broken dkms for whatever reason. |
This fixes the DKMS build.
|
@abucodonosor Sure, PR for versioning would be also nice 👍 What is the reasoning behind reordering How will the I would have some notes on the code changes but it will be easier to do the @severach |
Up to kernel 5.3 SUBDIRS=$(PWD) generates a warning. As of Kernel 5.4 SUBDIRS=$(PWD) is ignored and only M=$(PWD) is used. M= is being supplied for the standard make. The DKMS make is still supplying SUBDIRS=, not M=. This fix adds M= to the DKMS make. I suspect that some other M= can be removed.
|
Ok, so a PR for install part too.
Sure.
I can let it as is should work too, however since we are missing LDFLAGS in the link I reordered
In my patch, depmod is within the !dkms block. I am not sure but DKMS should take care of depmod by itself.
Like I've said, this need be like 4 PR's, I made it that way for now bc I am limited in what I can |
Does M= work with kernels as old as 4.2? |
@matheo that error goes away when you add the M= parameter as #172 (comment) suggests. |
Hi @abucodonosor, |
no, feel free to use the patch. ( btw 5.5 need another round of fixes but is just a matter of includes soring and a small code fix ) |
OK, so update for kernel 5.4, 5.5 and changes for DKMS build landed on devel. Hopefully I haven't missed anything :) |
Thank you. ( PS: On missing stuff, you can always blame me :D ) |
@abucodonosor |
For the people like me who out of the loop a bit. What do I need to do to install on Kernel 5.4 the latest DisplayLink package downloaded from the DisplayLink website? |
either the patches posted in this issue against released code, or you clone the git repository and compile from there. |
@abucodonosor Thank you. Sorry, I've got confused a bit by the statement in the readme.md file:
So I was under impression that merely cloning and compiling this repo (evdi module) is not enough to have DisplayLink devices working on my ubuntu system. |
Disclaimer: I'm not an expert on building kernel modules But after this patch got merged I'm still unable to build for 5.4 using dkms build
Results in
The make.log file is big, it contains a lot of errors like
It ends with
Can someone point me in the right direction? |
Looks like your kernel include files are broken. |
@abucodonosor Thanks for your response, although I'm not sure what you mean with include files being broken :) It's becoming even more strange (to me). I was able to build for kernel 5.5.4 and I am successfully using multiple monitors with my DisplayLink device. It just does not build for any other 5.5 or 5.4 kernel. Building for 5.3 versions is still doing fine.
|
I have the same problem as @Netiul with the 5.5.5 kernel |
@devnix are you using latest evdi from devel branch? |
Yes, tried the devel branch and the patchs on the latest tag. |
So DKMS builds? If so I've no idea about those, it seems like distros are doing very strange things with their kernel-source packages. It builds for me on any 5.4* or any |
Stuff like this:
just means 1) your kernel files have some problems eg some of these header files, IOW, does it build without dkms? |
Builds on 5.5 just fine from git.
|
It seems like it compiles:
This is my log when installing:
This is my output when running `sudo dkms install evdi/5.2.14`:
And this is what the log says:
I'm unsure if the installation went well, and I don't understand what's wrong with the DKMS installation. Maybe I'm doing that step wrong! |
Oh, ok! I've just run Thank you for your patience. I'm missing some instructions in order to build and install the module in the readme, that was all. |
Just jumping in here to say thanks to all who have contributed to this thread. I recently upgraded my Fedora 31 to kernel 5.5.11-200.fc31.x86_64, and once again, my DisplayLink driver (fedora-31-displaylink-1.6.4-1.x86_64.rpm) was failing to work. Searched high and low and finally came across the suggestions here in thread. In summary: $ sudo dnf install displaylink-1.6.4-2.x86_64.rpm "Magically" my monitors attached to my Dell D3100 dock came to life. Again, thanks to all! P.S. I'm in no way bashing elguero and all who have contributed to https://github.com/elguero/displaylink-rpm.git. Huge thanks to everyone on that project who has even made the DisplayLink drivers availabe to us Fedora users. https://www.displaylink.com/downloads themselves won't even support us! |
Awesome! Thank you everybody! |
I just used this on Fedora 32 and it worked like a charm |
This worked for me on my Fedora 32 system as well. |
evdi 1.6.4 fails to build on kernel 5.4:
module/evdi_drv.h:23:10: fatal error: linux/reservation.h: No such file or directory
The text was updated successfully, but these errors were encountered: