Porting the DisplayLink Ubuntu driver to other Linux distributions ?

Hi,

I am wondering if anyone has gotten the driver that Display Link provided for Ubuntu to work with openSUSE?
I am not smart enough to do it.

The driver:
http://www.displaylink.com/downloads/ubuntu.php

And instructions?
http://support.displaylink.com/knowledgebase/articles/679060

Thanks,
Dave

Hi
Have a read of this article;
http://nothen.com.ar/en/support-for-displaylink-adapters-on-linux/

So is your device the same as the article? I will have a play and build a 13.2 kernel module for you to try.

Thank you for looking at this!

This is the device I have
https://www.asus.com/us/Monitors_Projectors/MB168B/overview/

I did read the article and and will give it a try.

Hi
Can you plug the device in and run the following commands an post it back here within code tags;


lsusb
uname -a

Here are the results:


mac@mac:~> lsusb
Bus 002 Device 004: ID 17e9:ff03 DisplayLink 
Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0781:5583 SanDisk Corp. 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 058f:b003 Alcor Micro Corp. 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
mac@mac:~> uname -a
Linux mac.xyz 3.16.6-2-desktop #1 SMP PREEMPT Mon Oct 20 13:47:22 UTC 2014 (feb42ea) x86_64 x86_64 x86_64 GNU/Linux
mac@mac:~> 



I installed from Yast the patterns:
Base Development
C/C++ Development
Linux Kernel Development

and “dkms” from here
https://software.opensuse.org/package/dkms

I then followed the instructions for manual install from the link provided
http://nothen.com.ar/en/support-for-displaylink-adapters-on-linux/

Here is what happens


mac:/home/mac/DisplayLink # tar -xJvf displaylink-1.0.68.txz -C /
usr/src/evdi-1.0.68/
usr/src/evdi-1.0.68/evdi_drv.c
usr/src/evdi-1.0.68/evdi_drv.h
usr/src/evdi-1.0.68/evdi_connector.c
usr/src/evdi-1.0.68/dkms.conf
usr/src/evdi-1.0.68/evdi_painter.c
usr/src/evdi-1.0.68/evdi_debug.c
usr/src/evdi-1.0.68/evdi_modeset.c
usr/src/evdi-1.0.68/evdi_ioctl.h
usr/src/evdi-1.0.68/Kconfig
usr/src/evdi-1.0.68/evdi_stats.c
usr/src/evdi-1.0.68/Makefile
usr/src/evdi-1.0.68/evdi.mod.c
usr/src/evdi-1.0.68/evdi_debug.h
usr/src/evdi-1.0.68/evdi_gem.c
usr/src/evdi-1.0.68/evdi_encoder.c
usr/src/evdi-1.0.68/evdi_main.c
usr/src/evdi-1.0.68/LICENSE
usr/src/evdi-1.0.68/evdi_fb.c
usr/lib/displaylink/
usr/lib/displaylink/firefly-monitor-release.spkg
usr/lib/displaylink/DLInstrumentationDirectoryLock
usr/lib/displaylink/DisplayLinkManager
usr/lib/displaylink/libusb-1.0.so.0.1.0
usr/lib/displaylink/libevdi.so
usr/lib/displaylink/LICENSE
var/log/displaylink/
etc/systemd/system/displaylink.service
etc/udev/rules.d/99-displaylink.rules
mac:/home/mac/DisplayLink # dkms install evdi/1.0.68
Error! echo
Your kernel headers for kernel 3.16.6-2-desktop cannot be found at
/lib/modules/3.16.6-2-desktop/build or /lib/modules/3.16.6-2-desktop/source.
mac:/home/mac/DisplayLink # 

I think the script should be pointing to
/lib/modules/3.16.7-24-desktop/
however I do not know how to change what happens when “dkms install evdi/1.0.68” is ran.

Thanks again for any help,
Dave

Hi
You don’t need the kernel module, have already built that (just not up on OBS yet), was working on their (DisplayLink) script to install the bits openSUSE needs, but will have another look tomorrow at this part. I can’t put their proprietary blob on OBS, hence trying to sort out the script…

Basically it’s two parts, the kernel module (and maybe library), plus their binary blob along with udev rule and systemd service.

Thanks again for your time.

On Thu 03 Sep 2015 03:26:01 AM CDT, mackrackit wrote:

Thanks again for your time.

Hi
OK, so the kernel module is up on OBS, but I see the update repo has a
slightly later kernel. Have you updated the system lately?

All you need to do is download the rpm and install manually with
zypper adding the download path or cding to the directory;


wget http://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_13.2_Update/x86_64/evdi-kmp-desktop-1.0.68_k3.16.7_24-3.1.x86_64.rpm
su -
zypper in /some/download/path/evdi-kmp-desktop-1.0.68_k3.16.7_24-3.1.x86_64.rpm
modprobe edvi
exit

If that shows no errors, all should be good to manually try the
displaylink program, as you user not root!! So copy the tarball into
you home directory and extract;


cd
tar -xJvf displaylink-1.0.68.txz
cd usr/lib/displaylink/
../DisplayLinkManager

Does this fire it up?


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel
3.12.44-52.10-default If you find this post helpful and are logged into
the web interface, please show your appreciation and click on the star
below… Thanks!

Hi,

It will be a few hours before I can try your solution, I am working away from the shop today.

I am testing on a new install and have ran zypper up.

Dave

WiiHoo!!! It worked!!!

A couple of things that happened for the record.
zypper in … rpm caused and unsigned warning to return. I ignored it.
Then “modprobe edvi” returned “modprobe: FATAL: Module edvi not found.”

I then continued with the remainder of your instructions just to see what would happen. It worked.
I did have to go into Configure Desktop and enable the monitor, in fact, I need to do this every time I start the machine. It, the OS, must not be saving the the settings for this.

Question, what will happen when the system kernel gets updated?

I need to learn how you did this.

Thank you again!!!
Dave

Hi
What was the unsigned warning, just the rpm when you installed via zypper?

The module is e v d i not edvi… confusing for me too (and my typo)!!!

OK, so now we need to automate the starting on plugin etc.

Now switch to root user;


su -
modprobe evdi
mkdir -p /usr/lib/displaylink
cp -ar /home/mac/DisplayLink/usr/lib/displaylink/*  /usr/lib/displaylink/
cp /home/mac/DisplayLink/etc/systemd/system/displaylink.service /etc/systemd/system/displaylink.service
chmod 0644 /etc/systemd/system/displaylink.service
cp /home/mac/DisplayLink/etc/udev/rules.d/99-displaylink.rules /etc/udev/rules.d/99-displaylink.rules
chmod 0644 /etc/udev/rules.d/99-displaylink.rules
systemctl enable displaylink.service
systemctl start displaylink.service
systemctl status displaylink.service

You may need to modprobe the evdi module on reboot, but we can fix that.

See how that goes and report back…

Yes, the unsigned warning was only when installing the rpm via zypper.

Fixing the typo make modprobe work. I will blame my trifocals on not seeing it either :wink:

Some observations.
1- After reboot I have to go into Configure Desktop as before and enable the display, even after following your last instructions and modprobing after rebooting.

2- If I leave the USB monitor plugged in during a reboot the OS hangs before the KDS splash screen. A forced reset is required.

3- When the monitor is running and if it is then unplugged from the PC, it will not reconnect until a reboot.

Below is from the terminal when running your last instructions, maybe there is a clue here? “They are not meant to be enabled
using systemctl.”

But either way I am just happy that it works at all !! This is a portable monitor for field work.


mac@mac:~> su
Password: 
mac:/home/mac # modprobe evdi
mac:/home/mac # mkdir -p /usr/lib/displaylink
mac:/home/mac # cp -ar /home/mac/DisplayLink/usr/lib/displaylink/*  /usr/lib/displaylink/
cp: cannot create regular file ‘/usr/lib/displaylink/DisplayLinkManager’: Text file busy
mac:/home/mac # cp -ar /home/mac/DisplayLink/usr/lib/displaylink/*  /usr/lib/displaylink/
mac:/home/mac # cp /home/mac/DisplayLink/etc/systemd/system/displaylink.service /etc/systemd/system/displaylink.service
mac:/home/mac # chmod 0644 /etc/systemd/system/displaylink.service
mac:/home/mac # cp /home/mac/DisplayLink/etc/udev/rules.d/99-displaylink.rules /etc/udev/rules.d/99-displaylink.rules
mac:/home/mac # chmod 0644 /etc/udev/rules.d/99-displaylink.rules
mac:/home/mac # systemctl enable displaylink.service
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
mac:/home/mac # systemctl start displaylink.service
mac:/home/mac # systemctl status displaylink.service
displaylink.service - DisplayLink Manager Service
   Loaded: loaded (/etc/systemd/system/displaylink.service; static)
   Active: active (running) since Thu 2015-09-03 19:35:48 MST; 10s ago
  Process: 12027 ExecStartPre=/sbin/modprobe evdi (code=exited, status=0/SUCCESS)
 Main PID: 12030 (DisplayLinkMana)
   CGroup: /system.slice/displaylink.service
           └─12030 /usr/lib/displaylink/DisplayLinkManager

mac:/home/mac 

Hi
Can you post the contents of the udev rule, I think it needs tweaking…

For 1, Maybe it needs a some xorg tweaking to add it (but lets see if can fix 2 and 3 and 1 may fix itself).
For 2, I think this is because it conflicts with tty7.
For 3, Need to see the udev rule.


mac@mac:/etc/udev/rules.d> ls
55-libsane.rules  56-sane-backends-autoconfig.rules  70-persistent-net.rules  99-displaylink.rules
mac@mac:/etc/udev/rules.d> cat 99-displaylink.rules
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR}=="DisplayLink", MODE="0660", RUN+="/bin/systemctl start displaylink.service"
ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_VENDOR}=="DisplayLink", RUN+="/bin/systemctl stop displaylink.service"
mac@mac:/etc/udev/rules.d> 

Hi
OK, in the install script it contains;


ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="179", ATTR{bNumInterfaces}=="*5", GROUP="plugdev", MODE="0660"

The one you have is the fedora one, can you edit the file and replace with above.

This is the systemd service file from the script;


[Unit]
Description=DisplayLink Manager Service
After=display-manager.service
Conflicts=getty@tty7.service

[Service]
ExecStartPre=/sbin/modprobe evdi
ExecStart=/usr/lib/displaylink/DisplayLinkManager
Restart=always
WorkingDirectory=/usr/lib/displaylink
RestartSec=5

[Install]
WantedBy=graphical.target

If the above differs from what you have in /etc/systemd/system/displaylink.service lets replace it and see how it all goes.

I changed the udev rule and the systemd service file from the script on my setup was the same with the exception of the last two lines on your example was not there, so I added them to mine.

Rebooted and plugged the monitor in. The monitor did not show up in configure desktop as it had. I thought I must have messed one of the file up so I decided to change them back to what they were. No, I did not lsusb or dmesg, I just thought I messed the file up.

Now I did mess something up as on reboot the OS hangs before it gets to the log-in screen.

My plan now is to re-install the OS and follow you instructions, skipping the stuff I did from the fedora page.

I will report back …

Thanks again for your help!!!
Making progress.

Hi
Don’t forget to update first, then install the kernel module so the module version matches the running kernel. If you don’t want to update I have built on OBS the default install kernel version.

I would use the fedora udev rule and service to start with and then change the service file first and see how that goes. If you can get to grub you should be able to boot into failsafe mode?

Ummm,
Where do I find this on OBS? I have not used the service before.

Dave

Hi
Just use this link… this is the default install kernel…


wget http://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_13.2/x86_64/evdi-kmp-desktop-1.0.68_k3.16.6_2-3.1.x86_64.rpm

OBS is this: https://build.opensuse.org/
Any your package is being built here;
Welcome - openSUSE Build Service
And you can search here as well for packages…
Search?