diff options
author | francoism90 | 2022-01-08 13:59:36 +0100 |
---|---|---|
committer | francoism90 | 2022-01-08 13:59:36 +0100 |
commit | a8c096c76310b0cf7a85c397f79f2d22bfd68359 (patch) | |
tree | 8b12f359b20fc25914e899f6c037c20c4233d722 | |
download | aur-a8c096c76310b0cf7a85c397f79f2d22bfd68359.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | 99-displaylink.rules | 5 | ||||
-rw-r--r-- | DISPLAYLINK-EULA | 135 | ||||
-rw-r--r-- | PKGBUILD | 75 | ||||
-rw-r--r-- | displaylink-sleep.sh | 32 | ||||
-rw-r--r-- | displaylink.service | 14 | ||||
-rw-r--r-- | udev.sh | 79 |
7 files changed, 374 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c0a9b3bce174 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = displaylink-beta + pkgdesc = Linux driver for DL-6xxx, DL-5xxx, DL-41xx and DL-3x00 + pkgver = 5.5.0 + pkgrel = 1 + url = https://www.synaptics.com/products/displaylink-graphics + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + arch = aarch64 + license = custom + license = GPL2 + license = LGPL2.1 + makedepends = grep + makedepends = gawk + makedepends = wget + depends = evdi>=1.9.1 + depends = libusb>=1.0.0 + conflicts = displaylink + source = displaylink-driver-5.5.0.zip::https://www.synaptics.com/sites/default/files/exe_files/2021-12/DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu%20%28Beta%295.5%20Beta-EXE.zip + source = DISPLAYLINK-EULA + source = udev.sh + source = 99-displaylink.rules + source = displaylink.service + source = displaylink-sleep.sh + sha256sums = aaa6f2c6d8c4492d18cf670466f4bbf6d1ccdbb3c39ccc4ca20b4e5bc3352d56 + sha256sums = 2f81fea43332a62b2cf1dd47e56ea01caf1e886bcd16c3f82b18bfe148fb21a9 + sha256sums = dc41ae8a2c287fc50fdda65bad8b0ffd76726f7773c25e1b0c5b7de95cecbdb6 + sha256sums = c08a4726cf4e2f92c7cab00168ae9cc8d69d36a67c570609396a4a674934245a + sha256sums = 342e83abfe2a38d5635ea928345e933d2ad127ebd3f7caca476663d4f583684b + sha256sums = 8be4ab7616e38f91746bdd3e7fafe9004322a8be8e6722389746df9868d576e0 + +pkgname = displaylink-beta diff --git a/99-displaylink.rules b/99-displaylink.rules new file mode 100644 index 000000000000..3d2cc078917f --- /dev/null +++ b/99-displaylink.rules @@ -0,0 +1,5 @@ +# Copyright (c) 2016 DisplayLink (UK) Ltd. +# File autogenerated by udev-installer.sh script + +ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="17e9", ATTR{bInterfaceClass}=="ff", ATTR{bInterfaceProtocol}=="03", ENV{ID_DISPLAYLINK_DEVICE}="1", RUN+="/opt/displaylink/udev.sh START" +ACTION=="remove", ENV{ID_DISPLAYLINK_DEVICE}=="1", RUN+="/opt/displaylink/udev.sh STOP $env{DEVPATH}" diff --git a/DISPLAYLINK-EULA b/DISPLAYLINK-EULA new file mode 100644 index 000000000000..ebe5627e13b4 --- /dev/null +++ b/DISPLAYLINK-EULA @@ -0,0 +1,135 @@ +DISPLAYLINK SOFTWARE – END USER LICENSE AGREEMENT + +IMPORTANT - READ BEFORE DOWNLOADING, INSTALLING OR USING. + +BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE AND ANY ASSOCIATED MATERIALS +(COLLECTIVELY, “THE SOFTWARE”), YOU AGREE TO BE BOUND BY THE TERMS OF THIS END +USER LICENCE AGREEMENT (“EULA”). IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA, +YOU MAY NOT INSTALL OR USE THE SOFTWARE. + +1. LICENSE: + +1.1 This Software is licensed by DisplayLink Corp. (“DisplayLink”) on a +non-exclusive, non-transferable basis for use only in conjunction with products +which incorporate DisplayLink technology. Use of the Software otherwise than in +conjunction with products which incorporate DisplayLink technology is not +permitted. + +1.2 Any reference to DisplayLink under this EULA shall include its Affiliates. +Affiliates shall mean any company that, directly or indirectly, Controls, is +Controlled by or is under common Control with DisplayLink. + +1.3 You may not install, copy, modify, reverse engineer, decompile, +disassemble, create derivative works from, rent, sell, distribute, sublicense, +offer as a service or transfer any part of the Software except as provided in +this EULA or as permitted by applicable law, and you agree to prevent +unauthorized copying of the Software. + +1.4 This Software utilizes portions of code and software libraries which are +subject to other terms and conditions (“Open Source Elements”), and such Open +Source Elements and the applicable terms and conditions are identified in +documentation accompanying this Software. + +1.5 You may distribute the Software (other than the Open Source Elements) only +(i) without modification, (ii) in an unobfuscated form which allows the Software +to be identified, and (iii) subject to the terms and conditions of this EULA, a +copy of which shall be included with any such distribution. You may use, copy, +modify and distribute the Open Source Elements in accordance with the terms and +conditions applicable to them. + +1.6 If you are an end user: + +a. you may install the Software on any personal electronic device owned or +controlled by you for your personal use; + +b. you may make a back-up copy of the Software only for the purposes of (i) +restoring the Software on a device you have previously installed it on, or (ii) +installing the Software on a device which replaces a device you have previously +installed it on where the Software is no longer in use on that device. + +1.7 If you are a network administrator or IT manager: + +a. you may install the Software on your organization's IT systems and on +personal electronic devices owned or controlled by your organization or its +staff, for your organization's use; + +b. you may make a reasonable number of back-up copies of the Software only for +the purposes of installing or restoring the Software. + +2. NO OTHER RIGHTS. No rights or licenses are granted by DisplayLink to you, +expressly or by implication, with respect to any proprietary information or +patent, copyright, mask work, trademark, trade secret, or other intellectual +property right owned or controlled by DisplayLink, except as expressly provided +in this EULA. All rights not expressly granted are reserved. If you obtained the +Software within a country of the European Community, this EULA is subject to any +rights available under the European Community Software Directive (2009/24/EC). + +3. OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Title to all copies of the Software +remains with DisplayLink or its suppliers. The Software is copyrighted and +protected by the laws of the United States and other countries, and +international treaty provisions. You may not remove any copyright notices from +the Software. DisplayLink may make changes to the Software, or to items +referenced therein, at any time without notice, but is not obligated to support +or update the Software. You may not assign or transfer any of your rights or +obligations under this EULA to a third party without the prior written consent +of DisplayLink. DisplayLink may freely assign or transfer this EULA. + +4. USE OF SOFTWARE. You represent and warrant that: + +a. you are not (i) situated in a country has been designated by the U.S. +Government as a “terrorist supporting” country or that is subject to a U.S. +Government embargo, or (ii) included on any U.S. Government list of prohibited +or restricted parties; + +b. you will not (i) use the Software in violation of any applicable laws or +regulations, (ii) infringe the intellectual property or other rights of any +third party, or (iii) transmit viruses, malware or other harmful or malicious +computer code. + +5. EXCLUSION OF WARRANTIES. EXCEPT WITH RESPECT TO ANY WARRANTIES WHICH MAY NOT +LAWFULLY BE EXCLUDED, WHICH ARE EXPRESSLY PRESERVED, THE SOFTWARE IS PROVIDED +"AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING, BUT NOT +LIMITED TO, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR A +PARTICULAR PURPOSE. DisplayLink does not warrant or assume responsibility for +the accuracy or completeness of any information, text, graphics, links or other +items contained within the Software. The Software is not error free and is not +designed for use in life support or medical monitoring systems, other critical +applications or ultra-hazardous activities. Further the Software is not designed +to meet standards for military applications. You and your distributors and +customers assume the full risk of any such uses and you will indemnify and hold +DisplayLink harmless from any claims that arise as a result of such uses. + +6. LIMITATION OF LIABILITY. YOUR USE OF THE SOFTWARE IS AT YOUR SOLE RISK. IN +NO EVENT SHALL DISPLAYLINK OR ITS AFFILIATES OR SUPPLIERS BE LIABLE FOR ANY +DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS +INTERRUPTION, OR LOST INFORMATION) ARISING OUT OF THE USE OF OR INABILITY TO USE +THE SOFTWARE, EVEN IF DISPLAYLINK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES, TO THE EXTENT PERMITTED BY APPLICABLE LAW. SOME JURISDICTIONS PROHIBIT +EXCLUSION OR LIMITATION OF LIABILITY FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR +INCIDENTAL DAMAGES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU. YOU MAY ALSO +HAVE OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION. + +7. TERMINATION OF THIS AGREEMENT. DisplayLink may terminate this EULA at any +time by notice to you. This EULA will also automatically terminate if you +violate its terms. Upon termination, you will immediately destroy the Software +or return all copies of the Software to DisplayLink. The provisions of clauses +2, 3, 5, 6, 7, 8 and 9 shall survive any termination. + +8. APPLICABLE LAWS. Claims arising under this EULA shall be governed by the +laws of California, excluding its principles of conflict of laws and the United +Nations Convention on Contracts for the International Sale of Goods. You may not +export the Software in violation of applicable export laws and regulations. +DisplayLink is not obligated under any other agreements unless they are in +writing and signed by an authorized representative of DisplayLink. Should a +court of competent jurisdiction find any part of this EULA to be invalid or +unenforceable, the remainder of this EULA shall continue in full force and +effect. + +9. U.S. GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED +RIGHTS." Use, duplication, or disclosure by the Government is subject to +restrictions as set forth in FAR 52.227-14 and DFAR 252.227-7013 et seq. or its +successor. Use of the Software by the Government constitutes acknowledgment of +DisplayLink's proprietary rights therein. Contractor or Manufacturer is +DisplayLink (UK) Limited, 22 Cambridge Science Park, Milton Road, Cambridge, CB4 +0GH, United Kingdom. + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..517c53f92d68 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,75 @@ +# Contributor: rHermes <teodor_spaeren@riseup.net> +# Contributor: bnavigator <code@bnavigator.de> +# Contributor: PlusMinus +# Contributor: rhabbachi + +_pkgver=5.5.0-beta-59.118 +pkgname=displaylink-beta +pkgver=5.5.0 +pkgrel=1 +pkgdesc="Linux driver for DL-6xxx, DL-5xxx, DL-41xx and DL-3x00" +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') +url="https://www.synaptics.com/products/displaylink-graphics" +license=('custom' 'GPL2' 'LGPL2.1') +depends=('evdi>=1.9.1' + 'libusb>=1.0.0') +makedepends=('grep' 'gawk' 'wget') +conflicts=('displaylink') +source=(displaylink-driver-${pkgver}.zip::https://www.synaptics.com/sites/default/files/exe_files/2021-12/DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu%20%28Beta%295.5%20Beta-EXE.zip + DISPLAYLINK-EULA + udev.sh + 99-displaylink.rules + displaylink.service + displaylink-sleep.sh) +sha256sums=('aaa6f2c6d8c4492d18cf670466f4bbf6d1ccdbb3c39ccc4ca20b4e5bc3352d56' + '2f81fea43332a62b2cf1dd47e56ea01caf1e886bcd16c3f82b18bfe148fb21a9' + 'dc41ae8a2c287fc50fdda65bad8b0ffd76726f7773c25e1b0c5b7de95cecbdb6' + 'c08a4726cf4e2f92c7cab00168ae9cc8d69d36a67c570609396a4a674934245a' + '342e83abfe2a38d5635ea928345e933d2ad127ebd3f7caca476663d4f583684b' + '8be4ab7616e38f91746bdd3e7fafe9004322a8be8e6722389746df9868d576e0') + +package() { + echo "Adding udev rule for DisplayLink DL-3xxx/5xxx devices" + install -D -m644 99-displaylink.rules "$pkgdir/etc/udev/rules.d/99-displaylink.rules" + install -D -m755 udev.sh "$pkgdir/opt/displaylink/udev.sh" + + echo "Installing DLM systemd service" + install -D -m644 displaylink.service "$pkgdir/usr/lib/systemd/system/displaylink.service" + install -D -m755 displaylink-sleep.sh "$pkgdir/usr/lib/systemd/system-sleep/displaylink.sh" + + COREDIR="$pkgdir/usr/lib/displaylink" + install -d -m755 $COREDIR + install -d -m755 "$pkgdir/var/log/displaylink" + + echo "Extracting DisplayLink Driver Package" + pushd $srcdir + chmod +x displaylink-driver-${_pkgver}.run + ./displaylink-driver-${_pkgver}.run \ + --noexec \ + --target $pkgname-$pkgver \ + --nox11 \ + --noprogress + test -d $pkgname-$pkgver || (echo "Extracting the driver with the .run installer failed"; exit 1) + pushd $pkgname-$pkgver + + case $CARCH in + i686) + ARCH="x86-ubuntu-1604" ;; + x86_64) + ARCH="x64-ubuntu-1604" ;; + arm|armv6h|armv7h|aarch64) + ARCH="arm-linux-gnueabihf" ;; + esac + + echo "Installing DisplayLink Manager $ARCH" + install -D -m755 $ARCH/DisplayLinkManager $COREDIR/DisplayLinkManager + + echo "Installing firmware packages" + install -D -m644 *.spkg $COREDIR + + echo "Installing license file" + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + popd + popd + install -D -m644 DISPLAYLINK-EULA "${pkgdir}/usr/share/licenses/${pkgname}/DISPLAYLINK-EULA" +} diff --git a/displaylink-sleep.sh b/displaylink-sleep.sh new file mode 100644 index 000000000000..b47d5fd2d45d --- /dev/null +++ b/displaylink-sleep.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright (c) 2015 - 2016 DisplayLink (UK) Ltd. + +suspend_dlm() +{ + #flush any bytes in pipe + while read -n 1 -t 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out; do : ; done; + + #suspend DisplayLinkManager + echo "S" > /tmp/PmMessagesPort_in + + if [ -f /tmp/PmMessagesPort_out ]; then + #wait until suspend of DisplayLinkManager finish + read -n 1 -t 10 SUSPEND_RESULT < /tmp/PmMessagesPort_out + fi +} + +resume_dlm() +{ + #resume DisplayLinkManager + echo "R" > /tmp/PmMessagesPort_in +} + +case "\$1/\$2" in + pre/*) + suspend_dlm + ;; + post/*) + resume_dlm + ;; +esac + diff --git a/displaylink.service b/displaylink.service new file mode 100644 index 000000000000..a67491f134e5 --- /dev/null +++ b/displaylink.service @@ -0,0 +1,14 @@ +[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 diff --git a/udev.sh b/udev.sh new file mode 100644 index 000000000000..41869bee9ce1 --- /dev/null +++ b/udev.sh @@ -0,0 +1,79 @@ +#!/bin/sh +# Copyright (c) 2016 DisplayLink (UK) Ltd. +# File autogenerated by udev-installer.sh script + +get_evdi_dev_count() +{ + if [ "$(ls -l /sys/devices/platform/* | grep evdi | wc -l)" = "0" ]; then + echo "0" + return + fi + + cat /sys/devices/platform/evdi.*/drm/card*/card*/status | grep "^connected$" | wc -l +} + +get_displaylink_dev_count() +{ + cat /sys/bus/usb/devices/*/idVendor | grep 17e9 | wc -l +} + +start_displaylink() +{ + if [ "$(get_displaylink_dev_count)" != "0" ]; then + start_service + fi +} + +try_stop_displaylink() +{ + if [ "$(get_evdi_dev_count)" = "0" ]; then + parent_dev_path="$1" + if [ -d "$parent_dev_path" ]; then + echo "1" + return + fi + + if [ "$(get_displaylink_dev_count)" = "0" ]; then + stop_service + echo "0" + return + fi + fi + echo "1" +} + +stop_displaylink() +{ + parent_devpath=$(dirname /sys$1) + retry_num="50" # 5s + while [ "$(try_stop_displaylink $parent_devpath)" != "0" ] && [ "$retry_num" != "0" ]; + do + sleep 0.1 + retry_num=$((retry_num-1)) + done +} + +main() +{ + op=$1 + devpath=$2 + if [ "$op" = "START" ]; then + start_displaylink + elif [ "$op" = "STOP" ]; then + stop_displaylink $devpath + fi +} + +start_service() +{ + systemctl start displaylink.service +} + +stop_service() +{ + systemctl stop displaylink.service +} + + +main $1 $2 + |