Very pleased to report success on connecting my TP300LA running Fedora 24 to a USB 3.0 DisplayLink dock. This would be a very handy way of connecting monitors. At present I can only use the laptop with a monitor connected to its HDMI port.
Here’s a little teaser before we look at the details:
OS - Fedora 24 running kernel 4.9.13-101.fc24.x86_64
Dock used: Dell MKS14b
Installed the displaylink-rpm driver following the instructions posted for Fedora 25 by reypm at this post. He experienced some issues while attempting to install the DisplayLink driver on Fedora 25. The instructions for Fedora 25 worked without a glitch on Fedora 24.
DisplayLink driver rpm link: fedora-24-displaylink-rpm-1.3.43-2.x86_64.rpm
Checking the status of displaylink.service after installing the driver
[root@tp300la displaylink-driver-1.2.65]# systemctl status displaylink.service ● displaylink.service - DisplayLink Manager Service Loaded: loaded (/usr/lib/systemd/system/displaylink.service; static; vendor preset: disabled) Active: inactive (dead)
Connected the USB 3.0 cable from the dock after installing the DisplayLink driver and checking the displaylink.service was active
Plugging in the USB cable from the dock
[root@tp300la displaylink-driver-1.2.65]# systemctl status displaylink.service ● displaylink.service - DisplayLink Manager Service Loaded: loaded (/usr/lib/systemd/system/displaylink.service; static; vendor preset: disabled) Active: active (running) since Thu 2017-03-23 13:41:57 GMT; 5min ago Process: 24805 ExecStartPre=/sbin/modprobe evdi (code=exited, status=0/SUCCESS) Main PID: 24822 (DisplayLinkMana) Tasks: 26 (limit: 512) CGroup: /system.slice/displaylink.service └─24822 /usr/libexec/displaylink/DisplayLinkManager
[ 5043.605949] usb 1-1.3: New USB device found, idVendor=0451, idProduct=8044 [ 5043.605951] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=1 [ 5043.605952] usb 1-1.3: SerialNumber: NNNNNNNNNNNN [ 5043.606309] usb 1-1.3: Not enough bandwidth for new device state. [ 5043.606315] usb 1-1.3: can't set config #1, error -28 [ 5043.669754] usb 2-1.3: new SuperSpeed USB device number 19 using xhci_hcd [ 5043.681922] usb 2-1.3: New USB device found, idVendor=0451, idProduct=8046 [ 5043.681924] usb 2-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 5043.682440] usb 2-1.3: Not enough bandwidth for new device state. [ 5043.682447] usb 2-1.3: can't set config #1, error -28 [ 5043.745725] usb 1-1.4: new low-speed USB device number 32 using xhci_hcd [ 5043.826237] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c016 [ 5043.826242] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 5043.826245] usb 1-1.4: Product: Optical USB Mouse [ 5043.826247] usb 1-1.4: Manufacturer: Logitech [ 5043.826793] usb 1-1.4: Not enough bandwidth for new device state. [ 5043.826806] usb 1-1.4: can't set config #1, error -28 [ 5044.050445] evdi: [W] evdi_painter_disconnect:462 (dev=-1) An unknown connection to ffff96485851e000 tries to close us [ 5044.050447] evdi: [W] evdi_painter_disconnect:463 - ignoring [ 5044.063811] evdi: [D] evdi_painter_connect:443 (dev=1) Connected with ffff96485851e000 [ 5044.063813] evdi: [D] evdi_detect:75 (dev=1) Painter is connected [ 5044.063852] evdi: [D] evdi_painter_crtc_state_notify:360 (dev=1) Notifying crtc state: 3 [ 5044.064608] evdi: [D] evdi_detect:75 (dev=1) Painter is connected [ 5044.064612] evdi: [D] evdi_painter_get_edid_copy:192 (dev=1) 00 ff ff [ 5044.099866] evdi: [D] evdi_painter_mode_changed_notify:376 (dev=1) Notifying mode changed: 1920x1200@60; bpp 32; [ 5044.099868] evdi: [D] evdi_painter_mode_changed_notify:377 pixel format 875713112 [ 5044.099873] evdi: [D] evdi_painter_crtc_state_notify:360 (dev=1) Notifying crtc state: 0 [ 5044.099876] evdi: [D] evdi_painter_dpms_notify:347 (dev=1) Notifying dpms mode: 0 [ 5044.280517] evdi: [D] evdi_detect:75 (dev=1) Painter is connected [ 5044.280520] evdi: [D] evdi_painter_get_edid_copy:192 (dev=1) 00 ff ff
disconnecting the USB cable from the dock
[ 5102.015916] usb 1-1: USB disconnect, device number 29 [ 5102.015920] usb 1-1.2: USB disconnect, device number 30 [ 5102.063364] usb 1-1.3: USB disconnect, device number 31 [ 5102.063491] usb 1-1.4: USB disconnect, device number 32 [ 5102.122400] xhci_hcd 0000:00:14.0: Cannot set link state. [ 5102.122405] usb usb2-port1: cannot disable (err = -32) [ 5102.122410] usb 2-1: USB disconnect, device number 17 [ 5102.122411] usb 2-1.1: USB disconnect, device number 18 [ 5102.123103] cdc_ncm 2-1.1:1.5 enp0s20u1u1i5: unregister 'cdc_ncm' usb-0000:00:14.0-1.1, CDC NCM [ 5102.143956] usb 2-1.3: USB disconnect, device number 19 [ 5102.145449] evdi: [D] evdi_painter_disconnect:483 (dev=1) Disconnected from ffff96485851e000 [ 5102.145452] evdi: [D] evdi_detect:78 Painter is disconnected [ 5102.145488] evdi: [W] evdi_painter_disconnect:462 (dev=-1) An unknown connection to ffff96485851e000 tries to close us [ 5102.145490] evdi: [W] evdi_painter_disconnect:463 - ignoring [ 5102.147704] evdi: [D] evdi_detect:78 Painter is disconnected [ 5102.177013] evdi: [D] evdi_painter_crtc_state_notify:360 (dev=-1) Notifying crtc state: 3 [ 5102.177019] evdi: [W] evdi_painter_send_crtc_state:266 Painter is not connected! [ 5102.194840] audit: type=1130 audit(1490277065.997:5177): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' [ 5102.348666] evdi: [D] evdi_detect:78 Painter is disconnected
[root@tp300la displaylink-driver-1.2.65]# systemctl status displaylink.service ● displaylink.service - DisplayLink Manager Service Loaded: loaded (/usr/lib/systemd/system/displaylink.service; static; vendor p Active: inactive (dead)
PSD is designed to manage browser profile(s) in tmpfs and to periodically sync back to the physical disc, thereby reducing writes to SSDs. This is useful where there is ample spare RAM on the system.
profile-sync-daemon was not available in Fedora repositories at the time. To build and install it
Download the source from https://github.com/graysky2/profile-sync-daemon
[mochapenguin@dv6tqe psd]su - [root@dv6tqe psd]# git clone https://github.com/graysky2/profile-sync-daemon.git [root@dv6tqe psd]# cd profile-sync-daemon/ [root@dv6tqe profile-sync-daemon]# make Setting version [root@dv6tqe profile-sync-daemon]# make install Installing main script... install -p -d "/usr/bin" install -p -m755 common/profile-sync-daemon "/usr/bin/profile-sync-daemon" install -p -m755 common/psd-overlay-helper "/usr/bin/psd-overlay-helper" ln -s profile-sync-daemon "/usr/bin/psd" install -p -d "/usr/share/zsh/site-functions" install -p -m644 common/zsh-completion "//usr/share/zsh/site-functions/_psd" install -p -d "/usr/share/psd/browsers" install -p -m644 common/psd.conf "/usr/share/psd/psd.conf" cp common/browsers/* "/usr/share/psd/browsers" Installing manpage... install -p -d "/usr/share/man/man1" install -p -m644 doc/psd.1 "/usr/share/man/man1/psd.1" install -p -m644 doc/psd-overlay-helper.1 "/usr/share/man/man1/psd-overlay-helper.1" gzip -9 "/usr/share/man/man1/psd.1" gzip -9 "/usr/share/man/man1/psd-overlay-helper.1" ln -s psd.1.gz "/usr/share/man/man1/profile-sync-daemon.1.gz" Installing systemd files... install -p -d "/usr/lib/systemd/user" install -p -m644 init/psd.service "/usr/lib/systemd/user/psd.service" install -p -m644 init/psd-resync.service "/usr/lib/systemd/user/psd-resync.service" install -p -m644 init/psd-resync.timer "/usr/lib/systemd/user/psd-resync.timer"
When profile-sync-daemon is run for the first time, it outputs the following:
[mochapenguin@dv6tqe ~]$ psd p First time running psd so please edit /home/mochapenguin/.config/psd/psd.conf to your liking and run again.</pre>
Create the config file.
[mochapenguin@dv6tqe ~]$ psd p Profile-sync-daemon v6.25 on Fedora 24 (Workstation Edition) Systemd service is currently active. Systemd resync-timer is currently active. Overlayfs v23 is currently active. Psd will manage the following per /home/mochapenguin/.config/psd/psd.conf: browser/psname: firefox/firefox owner/group id: mochapenguin/1000 sync target: /home/mochapenguin/.mozilla/firefox/fu8u7xk0.default tmpfs dir: /run/user/1000/mochapenguin-firefox-fu8u7xk0.default profile size: 14M overlayfs size: recovery dirs: none browser/psname: google-chrome/chrome owner/group id: mochapenguin/1000 sync target: /home/mochapenguin/.config/google-chrome tmpfs dir: /run/user/1000/mochapenguin-google-chrome profile size: 5.8M overlayfs size: recovery dirs: none</pre>
More information on profile-sync-daemon usage can be found on Arch Linux Profile Sync Daemon page
- Installation and configuration
- Overview of Installation steps
- Post install fixes
- permission issues
- fixes for sshd.sh
- SSH Configuration
- Log output
These are my notes on installing and configuring fun_plug (0.7) on D-Link DNS-315 (NAS). If you come across anything that doesn’t come across clear please leave a comment and I shall attempt to add more explanation.
For me the primary motive for installing fun_plug was to enable SSH. This allows me to mount directories on my NAS onto my laptop / desktop.
Please ensure that the internal “Remote Backup” Services is deactivated. This server is shipped with newer NAS like the DNS-320/DNS-320L/DNS-325/DNS-345 and conflicts with the SSH-Server of the fun_plug.
Installation and configuration
Overview of Installation steps
- Follow the steps here. Download ARM version of fun_plug.tgz and copy the 2 files to root of drive
- Fix script issues
- change permissions of script - executable (on Linux)
- the HDD mount point is /mnt/HD/HD_a2
- fun_plug script should run and install fun_plug
- change root password - described here
- Apply the steps described in the post-install fixes section
- activate services by chmod a+x the respective scripts
- For instance, to enable ssh daemon, type chmod a+x /ffp/startup/sshd.sh
- [if you wish to use SSH] See the section on SSH Configuration for additional configuration
Post install fixes
There appears to be a problem with file permissions – after reboot most of them are reset to 777 and that upsets sshd and also prevents choosing the startup scripts.
To address this, modify /ffp/etc/fun_plug.init
I added to /ffp/etc/fun_plug.init the following line, just before the section dedicated to enable/disable services:
chmod 600 /ffp/etc/ssh/ssh_host_* chmod 755 /ffp/var/lib/sshd
fixes for sshd.sh
- I also changed a line in /ffp/start/sshd.sh to correctly check for the /ffp/etc/ssh/ssh_host_ecdsa_key file.
It appears this error may be to a invalid reference to the ssh file in /ffp/start/sshd.sh script.
The original script reads: if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then /ffp/bin/ssh-keygen -t ecdsa -f /ffp/etc/ssh/ssh_host_ecdsa_key -N '' fi I believe it should read: if [ ! -f /ffp/etc/ssh/ssh_host_ecdsa_key ]; then /ffp/bin/ssh-keygen -t ecdsa -f /ffp/etc/ssh/ssh_host_ecdsa_key -N '' fi #!/ffp/bin/sh
Set up rsync option.
@see troubleshooting section
added user using the web interface
Configuring User Home directories
usermod -s /ffp/bin/sh mochapenguin mkdir -p /ffp/home/mochapenguin/ sed -ie 's#:/usr/share/ftp/mochapenguin:#:/ffp/home/mochapenguin:#g' /etc/passwd pwconv usermod -d /ffp/home/mochapenguin/ mochapenguin store-passwd.sh # [saves changes to disk]
Yay!! It worked!!
User and user .ssh folder permissions
Once the users have been created, set the permissions of the
user and user’s
.ssh folder at boot.
Create a script to put back the permissions of the user and user .ssh folder at boot
log in as root (did it using a telnet session)
#!/ffp/bin/sh chmod 700 /ffp/home/mochapenguin chmod 600 /ffp/home/mochapenguin/.ssh/* chmod 700 /ffp/home/mochapenguin/.ssh
To have a better understanding of the concept of private, public key authentication read this nas-tweaks post
Changing the home of the user
By default, the home directory of the user root is set to
/home, which is located in the internal flash-memory. This memory is deleted every time the device is rebooted. Thus the home-directory of the each user should be moved to be a sub-directory of ffp.
# Create directory for new home for root mkdir -p /ffp/home/root/ # Modify user usermod -d /ffp/home/root/ root store-passwd.sh
You need to repeat the last two steps every time your firmware gets upgraded.
Generating the keypair
mkdir /ffp/home/root/.ssh cd /ffp/home/root/.ssh
There are now two choices for the key. You can either have a password (which can automatically be entered by ssh-agent or PuttY Pageant) or no password. Both ways are described below and will generate two files named keypair and keypair.pub which contain the private and public key needed for the authentication:
- Without Password
ssh-keygen -f keypair -C 'Generated by nas-tweaks.net' -t rsa -q
- With Password
ssh-keygen -f keypair -C 'Generated by nas-tweaks.net' -N '' -t rsa -q
Adding public key
create .ssh folder in /ffp/home/mochapenguin as user mochapenguin
- change permission of directory to
- copy the pub file to .ssh folder
- set chmod to
Activating public key authentication in SSH
Open /ffp/etc/ssh/sshd_config and search for the following line:
And remove the comment:
Moving the generated keys to authorized_keys
touch authorized_keys chmod 600 authorized_keys cat keypair.pub >> authorized_keys
restart SSH service
root@DNS-315:~# sh /mnt/HD/HD_a2/ffp/start/sshd.sh restart
Here is the fun_plug startup log from DNS-315. There are a couple of things I am not happy about. But they are not show stoppers anyway. I shall be looking into them as soon as I get time. Any suggestions in the meantime are welcome.
**** fun_plug script for DNS-323 (2008-08-11 email@example.com) **** **** fun_plug script modded by Uli (2012-02-21 firstname.lastname@example.org) **** Sat Sep 14 01:35:28 BST 2013 ln -snf /mnt/HD/HD_a2/ffp /ffp * Running /ffp/etc/fun_plug.init ... * Running /ffp/etc/fun_plug.local ... * Running /ffp/etc/rc ... * /ffp/start/SERVERS.sh ... * /ffp/start/portmap.sh ... Starting /ffp/sbin/rpc.portmap * /ffp/start/nfsd.sh ... Mounting /proc/fs/nfsd ... WARNING: rpc.portmap: Already running <== How do I turn off rpc portmap? Starting /ffp/sbin/rpc.statd Starting /ffp/sbin/rpc.nfsd 8 rpc.nfsd: unable to resolve ANYADDR:nfs to inet address: Servname not supported for ai_socktype <= WTF? rpc.nfsd: unable to set any sockets for nfsd Starting /ffp/sbin/rpc.mountd * /ffp/start/LOGIN.sh ... * /ffp/start/telnetd.sh ... Starting /ffp/sbin/telnetd -l /ffp/bin/sh * /ffp/start/sshd.sh ... Starting /ffp/sbin/sshd * /ffp/start/rsyncd.sh ... Error: Missing config file /ffp/etc/rsyncd.conf * /ffp/start/kickwebs.sh ... Kicking webs ... webs: no process found * /ffp/start/lighttpd.sh ... <= Should I turn this off for now? How? /ffp/etc/lighttpd.conf: Required file not found or not readable * /ffp/start/inetd.sh ... /ffp/etc/inetd.conf: Required file not found or not readable * /ffp/start/fp_master.sh ... Starting /ffp/sbin/fp.master Ready.