Go Back   DisplayLink Forum > DisplayLink Graphics Technology > Linux and Open Source

Reply
 
Thread Tools Search this Thread Display Modes
Old 06-02-2020, 02:27 AM   #1
corrmaan
Junior Member
 
Join Date: Jun 2020
Posts: 7
Default Gentoo - DisplayLinkManager crash

Hello,

I'm wondering if someone could please decode the log files I have and shed some light on the issue I'm having.

I'm trying to get DisplayLink working on my Gentoo system for a D6000 dock. I managed to piece together some ebuilds that seem to install evdi and displaylink-driver correctly. They are attached along with the DLSupportTool output.

For displaylink-driver, I think all the important files are installed to /opt/displaylink:
Code:
# ls -la /opt/displaylink
total 12264
drwxr-xr-x  2 root root     4096 Jun  1 21:44 .
drwxr-xr-x 11 root root     4096 May 31 23:48 ..
-rwxr-xr-x  1 root root 10900824 May 31 23:48 DisplayLinkManager
prwxr-xr-x  1 root root        0 Jun  1 21:44 DisplayLinkManagerDirLock
-rw-r--r--  1 root root   632688 May 31 23:48 ella-dock-release.spkg
-rw-r--r--  1 root root   336448 May 31 23:48 firefly-monitor-release.spkg
-rw-r--r--  1 root root   667104 May 31 23:48 ridge-dock-release.spkg
-rwxr-xr-x  1 root root     2106 May 31 23:48 udev.sh
The udev.sh file is modified by my ebuild, using the systemd-generated one as the template. All that's changed are the start_service() and stop_service() functions from their systemd versions to OpenRC style: rc-service dlm start/stop. The service name was changed from displaylink-driver to dlm, here is what the dlm OpenRC init script looks like:
Code:
# cat /etc/init.d/dlm 
#!/sbin/openrc-run

command="/opt/displaylink/DisplayLinkManager"
command_background=true
directory="/opt/displaylink"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	after xdm
}

start_pre() {
	modprobe evdi
}
So these options tell openrc-run to change to $directory, run $command, background it, and record it's PID in $pidfile. And before starting dlm, evdi is loaded.

The udev rules file is also installed in the right place and it does start the dlm service when the dock is plugged in to the system.

For evdi, the module and library appear to be in the right places:
Code:
# ls -la /lib/modules/5.6.14-gentoo-x86_64/video | grep evdi
-rw-r--r-- 1 root root   708440 May 31 23:51 evdi.ko
Code:
# ls -la /usr/lib64 | grep evdi
lrwxrwxrwx   1 root root        12 May 31 23:51 libevdi.so -> libevdi.so.0
lrwxrwxrwx   1 root root        16 May 31 23:51 libevdi.so.0 -> libevdi.so.1.7.0
-rwxr-xr-x   1 root root     18408 May 31 23:51 libevdi.so.1.7.0
When the dlm service is started by udev, the evdi module is also loaded at the same time, although without any indication in dmesg:
Code:
# lsmod | grep evdi
evdi                   12288  0
Code:
# ls -la /sys/module/evdi
total 0
drwxr-xr-x   5 root root    0 Jun  1 21:44 .
drwxr-xr-x 180 root root    0 Jun  1 21:42 ..
-r--r--r--   1 root root 4096 Jun  1 21:49 coresize
drwxr-xr-x   2 root root    0 Jun  1 21:49 holders
-r--r--r--   1 root root 4096 Jun  1 21:50 initsize
-r--r--r--   1 root root 4096 Jun  1 21:50 initstate
drwxr-xr-x   2 root root    0 Jun  1 21:50 notes
-r--r--r--   1 root root 4096 Jun  1 21:49 refcnt
drwxr-xr-x   2 root root    0 Jun  1 21:50 sections
-r--r--r--   1 root root 4096 Jun  1 21:50 taint
--w-------   1 root root 4096 Jun  1 21:44 uevent
The problem I'm having is that the dlm service crashes due to DisplayLinkMonitor dying for some reason. The log and edid files are created, my monitors indicate some kind of activity, and then DisplayLinkMonitor crashes.

Does anyone see anything immediately and obviously wrong with this setup?

Thanks,

Cory
Attached Files
File Type: zip displaylink-driver-ebuilds.zip (5.5 KB, 0 views)
File Type: zip DLSupportTool_Output_2020-06-01T21:45:35.016784.zip (163.1 KB, 1 views)
corrmaan is offline   Reply With Quote
Old 06-02-2020, 06:55 AM   #2
lspintzyk
Member
 
lspintzyk's Avatar
 
Join Date: Feb 2013
Posts: 65
Default

Hi corrmaan,

DisplayLinkManager is failing on access to the /sys/devices/evdi/add file.

When writing 1 to that file evdi module is adding one new drm device in /dev/dri/ directory.
lspintzyk is offline   Reply With Quote
Old 06-02-2020, 05:04 PM   #3
corrmaan
Junior Member
 
Join Date: Jun 2020
Posts: 7
Default

Hi lspintzyk,

Thanks for your quick reply.

Although lsmod shows the evdi module as loaded, there is no evdi device appearing:
Code:
# ls -la /sys/devices/evdi
ls: cannot access '/sys/devices/evdi': No such file or directory
So this is probably related to why I'm not seeing any evdi logging in dmesg.

I'll play around with getting the module to work and let you know how I make out.
corrmaan is offline   Reply With Quote
Old 06-03-2020, 05:24 AM   #4
corrmaan
Junior Member
 
Join Date: Jun 2020
Posts: 7
Default

It turns out my aggressive CFLAGS were causing the module to not work properly. If I can narrow down which ones are the culprit then I'll open an issue at the evdi repo.

Thanks again!
corrmaan is offline   Reply With Quote
Old 07-02-2020, 04:53 PM   #5
corrmaan
Junior Member
 
Join Date: Jun 2020
Posts: 7
Default

Turns out the module fails to initialise when compiled with LTO

https://github.com/DisplayLink/evdi/issues/212
corrmaan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.