PDA

View Full Version : [WORKING] Linux Mint 17.3 & Kernel 4.5


vampirex
04-09-2016, 12:44 AM
Thought I'd share my success for anyone who is still trying to get their DisplayLink adapters/dock to work in Linux Mint 17.3 with the latest 4.5 Kernel.

Thanks to sinfomicien on creating patches to make the latest drivers work on 4.5 kernel.
https://github.com/sinfomicien/displaylink-evdi-opensuse

Follow sinfomicien's guide and before you install, edit the 'displaylink-installer.sh' & change 'SYSTEMINITDAEMON=upstart' then run the install script and voila!

The dock will disconnect and reconnect.

Enjoy!

Also, this might work with other distros, as initially he made it for OpenSuse, just make sure to change the 'SYSTEMINITDAEMON' to upstart,systemd etc

Might work on other kernels: (did not test personally)
https://forums.linuxmint.com/viewtopic.php?t=218898

dnb
04-11-2016, 06:24 PM
For those wondering, this does not work for kernel 4.6:

DKMS make.log for evdi-1.0.68 for kernel 4.6.0-040600rc2-generic (x86_64)
Mon Apr 11 13:30:52 CDT 2016
make KBUILD_VERBOSE=1 SUBDIRS=/var/lib/dkms/evdi/1.0.68/build SRCROOT=/var/lib/dkms/evdi/1.0.68/build CONFIG_MODULE_SIG= -C /lib/modules/4.6.0-040600rc2-generic/build modules
make[1]: Entering directory `/usr/src/linux-headers-4.6.0-040600rc2-generic'
Makefile:667: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /var/lib/dkms/evdi/1.0.68/build/.tmp_versions ; rm -f /var/lib/dkms/evdi/1.0.68/build/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/var/lib/dkms/evdi/1.0.68/build
gcc -Wp,-MD,/var/lib/dkms/evdi/1.0.68/build/.evdi_drv.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -DCC_HAVE_ASM_GOTO -Iinclude/drm -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(evdi_drv)" -D"KBUILD_MODNAME=KBUILD_STR(evdi)" -c -o /var/lib/dkms/evdi/1.0.68/build/.tmp_evdi_drv.o /var/lib/dkms/evdi/1.0.68/build/evdi_drv.c
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
make[2]: *** [/var/lib/dkms/evdi/1.0.68/build/evdi_drv.o] Error 1
make[1]: *** [_module_/var/lib/dkms/evdi/1.0.68/build] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-4.6.0-040600rc2-generic'
make: *** [all] Error 2

Unfortunately I have to run 4.6 for my touch panel to work correctly on this newer hardware.

*le sigh* -- guess I just have to wait longer.

vampirex
04-11-2016, 06:42 PM
I'm not really linux savvy, correct me if i'm wrong, but looks like you might need to update GCC for that kernel.

dnb
04-13-2016, 07:54 PM
I'm not really linux savvy, correct me if i'm wrong, but looks like you might need to update GCC for that kernel.

Kind of hard to update beyond the latest commit in SVN.
Currently using gcc 5.3 (the latest, released in 12/2015).

On my hardware, I've hit an interesting conundrum...

In order to get my touchpad, touchscreen, wifi, and sound to work I had to upgrade to kernel 4.6... In order to COMPILE kernel 4.6, I needed gcc 5+.

The issue is that the kernel module here is linking to old kernel headers that have changed DRM in the latest release (the repo given in this thread patches it). However, they have not upgraded to GCC 5 which changes some flags that have been removed.

What actually needs to happen is DisplayLink needs to get off their lazy asses and fix shit once in a while. They're over a year behind on kernel/gcc releases.

safarik
04-22-2016, 07:06 AM
Hello,

I also run into same problem on Debian Testing with linux 4.5.0


# more /var/lib/dkms/evdi/1.0.335/build/make.log
DKMS make.log for evdi-1.0.335 for kernel 4.5.0-1-amd64 (x86_64)
Pá dub 22 09:00:10 CEST 2016
make KBUILD_VERBOSE=1 SUBDIRS=/var/lib/dkms/evdi/1.0.335/build SRCROOT=/var/lib/dkms/evdi/1.0.335/build CONFIG_MODULE_SIG= -C /lib/modules/4.5.0-1-amd64/build modules
make[1]: Entering directory '/usr/src/linux-headers-4.5.0-1-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make -C /usr/src/linux-headers-4.5.0-1-amd64 KBUILD_SRC=/usr/src/linux-headers-4.5.0-1-common \
-f /usr/src/linux-headers-4.5.0-1-common/Makefile modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /var/lib/dkms/evdi/1.0.335/build/.tmp_versions ; rm -f /var/lib/dkms/evdi/1.0.335/build/.tmp_versions/*
make -f /usr/src/linux-headers-4.5.0-1-common/scripts/Makefile.build obj=/var/lib/dkms/evdi/1.0.335/build
gcc-5 -Wp,-MD,/var/lib/dkms/evdi/1.0.335/build/.evdi_drv.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/src/linux-headers-4.5.0-1-common/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/gene
rated -I/usr/src/linux-headers-4.5.0-1-common/include -Iinclude -I/usr/src/linux-headers-4.5.0-1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-4.5.0-1-common/include/uapi -Iinclude/generated/uapi
-include /usr/src/linux-headers-4.5.0-1-common/include/linux/kconfig.h -I/var/lib/dkms/evdi/1.0.335/build -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declarat
ion -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=ker
nel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_A
VX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused
-but-set-variable -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_
HAVE_ASM_GOTO -I/usr/src/linux-headers-4.5.0-1-common/include/drm -Iinclude/drm -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(evdi_drv)" -D"KBUILD_MODNAME=KBUILD_STR(evdi)" -c -o /var/lib/dkms/evdi/1.0.335/build/.tmp_evd
i_drv.o /var/lib/dkms/evdi/1.0.335/build/evdi_drv.c
if [ "-pg" = "-pg" ]; then if [ /var/lib/dkms/evdi/1.0.335/build/evdi_drv.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/var/lib/dkms/evdi/1.0.335/build/evdi_drv.o"; fi; fi;
gcc-5 -Wp,-MD,/var/lib/dkms/evdi/1.0.335/build/.evdi_modeset.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/src/linux-headers-4.5.0-1-common/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/
generated -I/usr/src/linux-headers-4.5.0-1-common/include -Iinclude -I/usr/src/linux-headers-4.5.0-1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-4.5.0-1-common/include/uapi -Iinclude/generated/
uapi -include /usr/src/linux-headers-4.5.0-1-common/include/linux/kconfig.h -I/var/lib/dkms/evdi/1.0.335/build -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-decl
aration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel
=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_
AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-un
used-but-set-variable -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -
DCC_HAVE_ASM_GOTO -I/usr/src/linux-headers-4.5.0-1-common/include/drm -Iinclude/drm -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(evdi_modeset)" -D"KBUILD_MODNAME=KBUILD_STR(evdi)" -c -o /var/lib/dkms/evdi/1.0.335/build/
.tmp_evdi_modeset.o /var/lib/dkms/evdi/1.0.335/build/evdi_modeset.c
/var/lib/dkms/evdi/1.0.335/build/evdi_modeset.c:124:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.fb_create = evdi_fb_user_fb_create,
^
/var/lib/dkms/evdi/1.0.335/build/evdi_modeset.c:124:16: note: (near initialization for ‘evdi_mode_funcs.fb_create’)
/var/lib/dkms/evdi/1.0.335/build/evdi_modeset.c: In function ‘evdi_modeset_init’:
/var/lib/dkms/evdi/1.0.335/build/evdi_modeset.c:148:3: error: too many arguments to function ‘drm_dev_set_unique’
drm_dev_set_unique(dev, "%s", dev_name(dev->dev));
^
In file included from /var/lib/dkms/evdi/1.0.335/build/evdi_modeset.c:14:0:
/usr/src/linux-headers-4.5.0-1-common/include/drm/drmP.h:1071:5: note: declared here
int drm_dev_set_unique(struct drm_device *dev, const char *name);
^
/usr/src/linux-headers-4.5.0-1-common/scripts/Makefile.build:263: recipe for target '/var/lib/dkms/evdi/1.0.335/build/evdi_modeset.o' failed
make[4]: *** [/var/lib/dkms/evdi/1.0.335/build/evdi_modeset.o] Error 1
/usr/src/linux-headers-4.5.0-1-common/Makefile:1408: recipe for target '_module_/var/lib/dkms/evdi/1.0.335/build' failed
make[3]: *** [_module_/var/lib/dkms/evdi/1.0.335/build] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.5.0-1-amd64'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2


Any ides how to fix it?

Thanks

xblack86
05-04-2016, 12:41 PM
Hi,

Below my modified script and evdi patch:

https://github.com/emavap/displaylink-debian

It is based on https://github.com/AdnanHodzic/displaylink-debian and https://github.com/sinfomicien/displaylink-evdi-opensuse

The script will automatically patch evdi and proceed with install/uninstall