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

can't extract any version of the displayLink drivers on Arch linux #229

Closed
dummys opened this issue Oct 16, 2020 · 27 comments
Closed

can't extract any version of the displayLink drivers on Arch linux #229

dummys opened this issue Oct 16, 2020 · 27 comments

Comments

@dummys
Copy link

dummys commented Oct 16, 2020

Hi,

I'm still trying to install this driver but definitely can't extract it under arch linux. Also tried the old version, same problem.

-> $ ./displaylink-driver-5.3.1.34.run --target test --noexec
Verifying archive integrity... 100% Error in MD5 checksums: print mode: md5sum <file
check mode: md5sum -c <checksum is different from 7ba0e635b6284f0651177ec1e63381d0

When I check your script, it appears that you are using md5sum to check against binary data from stdin, which I can't reproduce. The only way getting your stuff working is with "md5" and not md5sum. But then after patching this, I still get error in extracting with gzip.

I know it is for ubuntu, but it should extract correctly on all linux distro.

@bnavigator
Copy link

To quote myself from the AUR page:

Looks like your md5sum command is broken.

Here is what it should look like:

% export LC_ALL=C
% which md5sum
/usr/bin/md5sum
% pacman -Qo /usr/bin/md5sum
/usr/bin/md5sum is owned by coreutils 8.32-1
% md5sum --version
md5sum (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.
%

@bnavigator
Copy link

Looking into the script: you could just set SETUP_NOCHECK=1.

Or get to the root of this. What's your output of

env

OLD_PATH="$PATH"
PATH=${GUESS_MD5_PATH:-"$OLD_PATH:/bin:/usr/bin:/sbin:/usr/local/ssl/bin:/usr/local/bin:/opt/openssl/bin"}
MD5_ARG=""
MD5_PATH=`exec <&- 2>&-; which md5sum || command -v md5sum || type md5sum`
echo "0: $MD5_PATH"
test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which md5 || command -v md5 || type md5`
echo "1: $MD5_PATH"
test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which digest || command -v digest || type digest`
echo "2: $MD5_PATH"
PATH="$OLD_PATH"

?

@dummys
Copy link
Author

dummys commented Oct 19, 2020

I think my md5sum is working.

pacman -Qo /usr/bin/md5sum

pacman -Qo /usr/bin/md5sum
/usr/bin/md5sum is owned by coreutils 8.32-1
md5sum --version
md5sum (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.

Here is the result of your test:

env
SHELL=/bin/bash
WINDOWID=20971531
COLORTERM=truecolor
GDK_DPI_SCALE=0
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
LC_ADDRESS=fr_CH.UTF-8
LC_NAME=fr_CH.UTF-8
GRADLE_HOME=/usr/share/java/gradle
DESKTOP_SESSION=awesome
LC_MONETARY=fr_CH.UTF-8
EDITOR=/usr/bin/vim
GTK_MODULES=canberra-gtk-module
ANDROID_NDK=/opt/android-ndk
XDG_SEAT=seat0
XDG_SESSION_DESKTOP=awesome
XDG_SESSION_TYPE=x11
XAUTHORITY=/home/user/.Xauthority
DESKTOP_STARTUP_ID=awesome/kitty/918-28-user_TIME842238358
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/user
MOTD_SHOWN=pam
HOME=/home/user
AUTOJUMP_ERROR_PATH=/home/user/.local/share/autojump/errors.log
LC_PAPER=fr_CH.UTF-8
LANG=en_US.UTF-8
KITTY_WINDOW_ID=1
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
ANDROID_NDK_HOME=/opt/android-ndk
XDG_SESSION_CLASS=user
ANDROID_HOME=/opt/android-sdk
TERMINFO=/usr/lib/kitty/terminfo
TERM=xterm-kitty
LC_IDENTIFICATION=fr_CH.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
USER=user
AUTOJUMP_SOURCED=1
DISPLAY=:0
SHLVL=1
LC_TELEPHONE=fr_CH.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MEASUREMENT=fr_CH.UTF-8
XDG_VTNR=7
XDG_SESSION_ID=2
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
LC_CTYPE=fr_CH.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
LC_TIME=fr_CH.UTF-8
QT_AUTO_SCREEN_SCALE_FACTOR=1
LC_COLLATE=fr_CH.UTF-8
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/android-ndk:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
GDK_SCALE=1
GDMSESSION=awesome
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
HG=/usr/bin/hg
MAIL=/var/spool/mail/user
LC_NUMERIC=fr_CH.UTF-8
_=/usr/bin/env

OLD_PATH="$PATH"
PATH=${GUESS_MD5_PATH:-"$OLD_PATH:/bin:/usr/bin:/sbin:/usr/local/ssl/bin:/usr/local/bin:/opt/openssl/bin"}
MD5_ARG=""
MD5_PATH=`exec <&- 2>&-; which md5sum || command -v md5sum || type md5sum`
echo "0: $MD5_PATH"
0: /usr/bin/md5sum
test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which md5 || command -v md5 || type md5`
echo "1: $MD5_PATH"
1: /usr/bin/md5sum
test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which digest || command -v digest || type digest`
echo "2: $MD5_PATH"
2: /usr/bin/md5sum

@dummys
Copy link
Author

dummys commented Oct 19, 2020

ok I think you are right, my md5sum is broken because on another computer I can do it correctly. Do you have an idea what can make this probem on my other arch linux box ? both box has kitty as termina and fish as shell.
Let me show you the same output on the computer where it didn't work, will to tonight. Thanks for help.

@bnavigator
Copy link

Error in MD5 checksums: print mode: md5sum <file
check mode: md5sum -c <checksum
is different from 7ba0e635b6284f0651177ec1e63381d0

The bold part is the result of a failed md5sum call fed with the binary data in displaylink-driver-5.3.1.34.run. But that string does not appear in the coreutils' md5sum help text. Is /bin/sh a custom shell which brings its own md5sum command? Do you execute displaylink-driver-5.3.1.34.run with a nonstandard shell despite the /bin/sh shebang? I do not know much about fish.

You could edit displaylink-driver-5.3.1.34.run and find out what the actual call including arguments looks like. Between line 187 and 188 insert

echo "$MD5_PATH $MD5_ARG"

and work your way backwards from there.

@dummys
Copy link
Author

dummys commented Oct 19, 2020

yes I tried all this already. It's where I discovered that when running "cat /bin/ls | md5sum" was giving nothing. Then I tried just for test to remove in the script the which md5sum part and use the md5 binary. But then I get that gzip stuff is not right. Now that I have a computer where the stuff is working I will try to see what different between both. Fish shell is very nice but it is not posix compliant, so perhaps that's why . Will investigate and keep you posted.

As for the 5.9 kernel patch, I will upgrade my Arch tonight to move from 5.8 to 5.9 and test again, keep you posted on lightdm story. I would be very happy to help you debug this issue, but I think I need to have somehow my kernel is a debugging version or something ? I never debugged my kernel in linux, but I would be very happy to take my hand on.

@bnavigator
Copy link

No need to debug. The patch is working with 5.9.

@bnavigator
Copy link

Fish shell is very nice but it is not posix compliant, so perhaps that's why

Bu it should still adhere to the shebang and execute the installer with /bin/sh

@dummys
Copy link
Author

dummys commented Oct 19, 2020

No need to debug. The patch is working with 5.9.

even when reluanching login manager ? so do you think my problem comes only because of kernel 5.8.x ?

@dummys
Copy link
Author

dummys commented Oct 19, 2020

Fish shell is very nice but it is not posix compliant, so perhaps that's why

Bu it should still adhere to the shebang and execute the installer with /bin/sh

agreed. In fact my way of calling fish is in .bashrc with exec fish

@bnavigator
Copy link

even when reluanching login manager ? so do you think my problem comes only because of kernel 5.8.x ?

No, the lightdm crash would be independent from kernel version and patch. You would have to post your crashlogs (in a separate thread, maybe in a more suitable forum). Maybe @sickcodes' advice in #225 about disabling the udev rule and starting the service manually also helps in your case.

agreed. In fact my way of calling fish is in .bashrc with exec fish

Ooh, does that mean that even for /bin/sh, which is a link to /bin/bash you drop into fish? That is calling for trouble. I see that the Arch wiki recommends that option. Not sure if it is a wise one.

@dummys
Copy link
Author

dummys commented Oct 19, 2020

ỳeah I will have to test
but here: https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html its written:

Invoked non-interactively
When Bash is started non-interactively, to run a shell script, for example, it looks for the variable BASH_ENV in the environment, expands its value if it appears there, and uses the expanded value as the name of a file to read and execute. Bash behaves as if the following command were executed:

if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
but the value of the PATH variable is not used to search for the filename.

As noted above, if a non-interactive shell is invoked with the --login option, Bash attempts to read and execute commands from the login shell startup files.

So there should be no difference.
Tonight will test advice of @sickcodes but the problem is that when installing the package displaylink under arch it created this file. Do you think it is not needed at all ?

@sickcodes
Copy link
Contributor

@dummys

You can change the default shell to fish using chsh

@bnavigator
Copy link

You probably meant to quote the paragraph below the one you were quoting where it talks about being called as sh. Probably your way of enabling fish is not interfering with the script.

Still, you have to check why you get a non-standard md5sum error message instead of the desired hash value.

@dummys
Copy link
Author

dummys commented Oct 19, 2020

yeah that's crazy, I don't know why... I even tried to comment the exec fish inside my .bashrc and tried to call again md5sum on cat /bin/ls and I got the same behavior. Will do more testing and keep you posted. Thanks both of you to help :D

@dummys
Copy link
Author

dummys commented Oct 19, 2020

found a md5sum binary in /usr/local/bin... weird removed this guy and not it is working, the displaylink installation etc.
So After this, I tried running systemctl restart lightdm and ... Boom, no screen anymore and crash in journactl -fl:

oct 19 18:41:48 flashed systemd[1]: Starting Light Display Manager...
oct 19 18:41:48 flashed systemd[1]: Started Light Display Manager.
oct 19 18:41:48 flashed audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lightdm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
oct 19 18:41:48 flashed lightdm[1897]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
oct 19 18:41:48 flashed kernel: evdi: [D] evdi_driver_postclose:133 (dev=1) Process tries to close us, postclose
oct 19 18:41:48 flashed kernel: evdi: [I] Task 1903 (Xorg.wrap) of process 1903 (Xorg.wrap)
oct 19 18:41:49 flashed kernel: evdi: [D] evdi_driver_postclose:133 (dev=1) Process tries to close us, postclose
oct 19 18:41:49 flashed kernel: evdi: [I] Task 1903 (Xorg) of process 1903 (Xorg)
oct 19 18:41:49 flashed systemd[1]: Started Process Core Dump (PID 1904/UID 0).
oct 19 18:41:49 flashed systemd[1]: lightdm.service: Main process exited, code=exited, status=1/FAILURE
oct 19 18:41:49 flashed systemd[1]: lightdm.service: Failed with result 'exit-code'.
oct 19 18:41:49 flashed systemd-coredump[1905]: Process 1903 (Xorg) of user 0 dumped core.
                                                
                                                Stack trace of thread 1903:
                                                #0  0x00007f8081df0615 raise (libc.so.6 + 0x3d615)
                                                #1  0x00007f8081dd9862 abort (libc.so.6 + 0x26862)
                                                #2  0x0000557fcdc5935a OsAbort (Xorg + 0x14a35a)
                                                #3  0x0000557fcdc5ae21 FatalError (Xorg + 0x14be21)
                                                #4  0x0000557fcdc60a79 n/a (Xorg + 0x151a79)
                                                #5  0x00007f8081df06a0 __restore_rt (libc.so.6 + 0x3d6a0)
                                                #6  0x0000557fcdc6ae32 xf86BusProbe (Xorg + 0x15be32)
                                                #7  0x0000557fcdc7c44a InitOutput (Xorg + 0x16d44a)
                                                #8  0x0000557fcdb48426 n/a (Xorg + 0x39426)
                                                #9  0x00007f8081ddb152 __libc_start_main (libc.so.6 + 0x28152)
                                                #10 0x0000557fcdb495ae _start (Xorg + 0x3a5ae)
oct 19 18:41:49 flashed systemd[1]: systemd-coredump@5-1904-0.service: Succeeded.

@dummys
Copy link
Author

dummys commented Oct 19, 2020

Even when removing the udev rules -> crash

@bnavigator
Copy link

Okay so you resolved the can't extract issue. Please close #229 and open a new issue for the crash. But first try to find out, if this is really an evdi problem, e.g whether " Error getting user list" is relevant or unrelated.

@dummys
Copy link
Author

dummys commented Oct 19, 2020

yep ok. But how can I debug this ? To be honest I don't know from where this crash occurs, as if I remove evdi, no more crash when restarting lightdm., so should be evdi right ? anyway it's xorg that crash

@dummys dummys closed this as completed Oct 19, 2020
@bnavigator
Copy link

yep ok. But how can I debug this ? To be honest I don't know from where this crash occurs, as if I remove evdi, no more crash when restarting lightdm., so should be evdi right ?

See https://wiki.archlinux.org/index.php/Core_dump and https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces

@dummys
Copy link
Author

dummys commented Oct 19, 2020

ok thanks for advice

@sickcodes
Copy link
Contributor

yep ok. But how can I debug this ? To be honest I don't know from where this crash occurs, as if I remove evdi, no more crash when restarting lightdm., so should be evdi right ? anyway it's xorg that crash

@dummys sounds like same issue as me!

Disable DisplayLink service

sudo systemctl disable displaylink.service
# removing 99-displaylink.rules is necessary for me
sudo rm /etc/udev/rules.d/99-displaylink.rules
reboot

And then start X, display manager, or xfce etc.

When you're inside the desktop run:

sudo systemctl start displaylink

This is necessary for me on Xorg latest

@dummys
Copy link
Author

dummys commented Oct 21, 2020

@sickcodes it's not working in my case. I tried your solution already. are you using lightdm ?

@dummys
Copy link
Author

dummys commented Oct 22, 2020

@sickcodes not working. try to do systemctl restart yourdm and tell me if you crash or not.

@dummys
Copy link
Author

dummys commented Oct 27, 2020

@sickcodes are you able to do it ?

@sickcodes
Copy link
Contributor

sickcodes commented Oct 27, 2020

I don't use a DM, I boot to command line and run startxfce4.

Yes I'm Xorg latest it crashes unless I remove the udev rules and disable DisplayLink service until the desktop is running

@dummys
Copy link
Author

dummys commented Oct 27, 2020

ok I see. I retried again, without any udev rules at all, same shit. What I need to give to displaylink guy to troubleshoot the issue ?

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

3 participants