LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-17-2014, 08:49 AM   #1
Lop3
Member
 
Registered: Aug 2013
Posts: 48

Rep: Reputation: Disabled
Question Displaylink temperamental - Not hot pluggable - xrandr - auto config monitors


The holy grail for me in terms of usability and mobility is having hot pluggable displaylink monitors. (displaylink are USB->DVI/HDMI/VGA adapters)

I just want to say a big thank you to anyone who contributes to Linux. It's such a pleasure and a blessing to be able to use Linux and be part of this community.

Edited Jul 29 2014

I'm using a standard Linux Mint 17 64 bit install (based on Ubuntu 14.04) with kernel upgraded to 3.14.1
My /etc/modprove.d/blacklist-framebuffer.conf is unmodified, showing that udlfb is BLACKLISTED. (meaning I'm using the new udl driver)

I'm very pleased that the new udl driver works with xrandr.
I've written a script that automatically detects what is connected and arranges my monitors and mate-panels accordingly.

Troubles
Sometimes when the DL adapters are connected, they don't show up in xrandr or xrandr --listproviders.

If they aren't showing up in xrandr, I first check if they've been detected as USB devices: lsusb | grep DisplayLink. And ensure neither device is showing a device ID of 8060 so I know it has initialized itself properly.

Sometimes I can make the DL adapters appear in xrandr if I restart X: pkill X
And then xrandr should have both displaylink adapters recognized.
But sometimes only one DL adapter is enabled and xrandr fails with errors trying to enable the other one, and restarting X is not enough. I have to do a full reboot.
Killing X or rebooting kills all my programs, so it's inconvenient. Does anybody know a way to re-initialize the DL adapters without restarting X or rebooting?

Displaylink Info
https://wiki.archlinux.org/index.php/DisplayLink#udl

If there are any displaylink / kernel driver devs who want to play around with displaylink and iron out the bugs, I recommend giving the following scripts a try to see how reliably displaylink is running. See if you can enable 2 DL's, disable both, then enable both again. See how many rounds you can do? I can't even do 1. I have 2 DL devices with DL-165 chipset. They can be found on ebay for about $46 1 2 Make sure you only buy chipsets supported by Linux.

I've separated each xrandr action into it's own command with delays in between to reduce crashes, and specified --display so the scripts can be run from outside the X session.
Ideally one could issue one xrandr command to set the new configuration.

I don't use these scripts anymore, I've created an all-in-one automatic script that just does whatever is necessary, depending on what is connected.
I'll leave them here for anyone who feels like ironing out xrandr/displaylink bugs or wants some xrandr inspiration.

=========================

LAPTOP SCREEN ONLY

Code:
#!/bin/bash
#turn on HDMI and turn off junk and Displaylinks
echo "turning off non existent VGA"
sleep 1
xrandr --display :0 --output VGA-1-1 --off --output VGA1 --off --output VGA-1-2 --off
sleep 2

echo "turning on LVDS1"
sleep 1
xrandr --display :0 --output LVDS1 --mode 1366x768
sleep 2

echo "disabling left displaylink"
xrandr --display :0 --output DVI-2-0 --off
sleep 10

echo "disabling right displaylink"
xrandr --display :0 --output DVI-3-1 --off
sleep 10

echo "disabling HDMI1"
sleep 1
xrandr --display :0 --output HDMI1 --off
sleep 2

HDMI ONLY

Code:
#!/bin/bash
#turn on HDMI and turn off junk and Displaylinks
echo "turning off non existent VGA"
sleep 1
xrandr --display :0 --output VGA-1-1 --off --output VGA1 --off --output VGA-1-2 --off
sleep 2

echo "Enabling HDMI1"
sleep 1
xrandr --display :0 --output HDMI1 --mode 1920x1080
sleep 2

echo "turning off LVDS1"
sleep 1
xrandr --display :0 --output LVDS1 --off
sleep 2

echo "disabling left displaylink"
xrandr --display :0 --output DVI-2-0 --off
sleep 10

echo "disabling right displaylink"
xrandr --display :0 --output DVI-3-1 --off
sleep 10

3 MONITORS

Code:
#!/bin/bash
#turn on HDMI and turn off junk and Displaylinks
echo "turning off non existent VGA"
sleep 1
xrandr --display :0 --output VGA-1-1 --off --output VGA1 --off --output VGA-1-2 --off
sleep 2

echo "turning off LVDS1"
sleep 1
xrandr --output LVDS1 --off
sleep 2

echo "disabling left displaylink"
xrandr --display :0 --output DVI-2-0 --off
sleep 10

echo "disabling right displaylink"
xrandr --display :0 --output DVI-3-1 --off
sleep 10

#enable HDMI
echo "Enabling HDMI1"
sleep 1
xrandr --display :0 --output HDMI1 --mode 1920x1080
sleep 6

echo "turning on left displaylink"
sleep 1
xrandr --display :0 --output DVI-2-0 --mode 1920x1080 --left-of HDMI1
sleep 10

echo "turning on right displaylink"
sleep 1
xrandr --display :0 --output DVI-3-1 --mode 1920x1080 --right-of HDMI1
sleep 10
echo "Finished, you should have 3 monitors on"
REARRANGE 3 MONITORS
Lastly this file is just for convenience. When I boot up and my screens are in the wrong order. It doesn't stress test anything because the correct screens are already on.

Code:
#!/bin/bash
echo "rearranging 3 monitors"
sleep 1
xrandr --display :0 --output DVI-2-0 --mode 1920x1080 --left-of HDMI1 --output DVI-3-1 --mode 1920x1080 --right-of HDMI1

echo "finished rearranging monitors"

Last edited by Lop3; 07-29-2014 at 11:31 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Are USB flashdrives hot pluggable in Linux? tzonkov Linux - Hardware 7 01-25-2016 01:23 PM
How to disable CPU hot-pluggable feature? icoming Linux - General 2 11-09-2012 09:59 AM
LXer: Pluggable Schedulers vs. Pluggable Security LXer Syndicated Linux News 0 10-03-2007 11:40 PM
Can I turn off a non-hot pluggable drive? ayteebee Linux - Hardware 2 12-08-2006 04:51 PM
'Support for hot-pluggable devices' option not available in 2.6 kernel shadowsnipes Linux - General 3 10-24-2005 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration