
How to live if you have a laptop, and the screens are missing

Brief HowTo on how to live if you have a laptop, and the screens are missing.
Historically, I have never had a stationary PC. Only laptops as mobility is required. And the latest purchase today is the Asus S300CA ultrabook (with an unnecessary touch screen) with ArchLinux on board.
There is a 23.6 "monitor. And everything would be fine - two screens, comfort, comfort, tiling. But some time ago, when there was more work, I again felt a lack of screens ...
It would seem, it’s business to plug another monitor into a free VGA -port ... A kindly comrade found a monitor with VGA in the bins. We connect the monitor and ... And nothing! Absolutely. Except for some error generated by xrandr.
Internet smoking says that the installed Intel HD4000 can 3 outputs at the same time, but, as I understand it, provided that two of them are through identical digital channels, i.e. LVDS + HDMI + HDMI or LVDS + DP + DP (which does not exist at all).
Buy a personal PC? Well, I do not.
It was decided to try DisplayLink, which was previously an article about. Technology is equipped, for example, monitors and projectors. The device connects via USB and creates an additional video adapter in the system for image transfer. No hardware modification of the PC is required, only the driver. In addition to the above, the converters to which the monitor is connected are also produced. Such a device was decided to try.
Here was found such a converter from HP

Cozy support is promised to users of Mac and Windows, but in this case we have Linux, so we get a tambourine ...
The link contains a good manual that makes it clear a number of necessary things:
- device supported
- the udl module is required instead of the existing udlfb (although I still could not understand why udlfb continues to exist in the system if it is not applicable for this task)
- all this is perfectly supported by xrandr
We connect the device to USB, we connect the monitor to the device - the monitor lights up in bright green, which indicates readiness.
Let's see if the device was determined in the system:
[root@machine ~]$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 03eb:8810 Atmel Corp.
Bus 001 Device 004: ID 0bda:5705 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 13d3:3402 IMC Networks
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 17e9:01d7 DisplayLink
Bus 003 Device 002: ID 045e:07b1 Microsoft Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
We see the line Bus 003 Device 003: ID 17e9: 01d7 DisplayLink , which means there is hope.
X-server framebuffer support is required, for which the xf86-video-fbdev package exists . We also need xf86-video-modesetting .
Both packages are available in the Extra repository. Install:
[root@machine ~]$ pacman -S xf86-video-fbdev xf86-video-modesetting
Let's try to reboot and get the work out of the box, but again we see only the green screen.
Disconnect-connect the device and watch the output of dmesg:
[root@machine ~]$ dmesg
[ 53.300045] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[ 53.479369] udlfb: DisplayLink HP USB Graphics Adap - serial #319454
[ 53.479387] udlfb: vid_17e9&pid_01d7&rev_0102 driver's dlfb_data struct at ffff8800ab8e7800
[ 53.479395] udlfb: console enable=1
[ 53.479398] udlfb: fb_defio enable=1
[ 53.479404] udlfb: shadow enable=1
[ 53.479546] udlfb: vendor descriptor length:1b data:1b 5f 01 0019 05 00 01 03 00 04
[ 53.479558] udlfb: DL chip limited to 2080000 pixel modes
[ 53.479653] udlfb: allocated 4 65024 byte urbs
[ 53.578156] udlfb: 1280x1024 @ 60 Hz valid mode
[ 53.578167] udlfb: 720x400 @ 70 Hz valid mode
[ 53.578171] udlfb: 640x480 @ 60 Hz valid mode
[ 53.578175] udlfb: 640x480 @ 67 Hz valid mode
[ 53.578178] udlfb: 640x480 @ 72 Hz valid mode
[ 53.578181] udlfb: 640x480 @ 75 Hz valid mode
[ 53.578184] udlfb: 800x600 @ 56 Hz valid mode
[ 53.578187] udlfb: 800x600 @ 60 Hz valid mode
[ 53.578190] udlfb: 800x600 @ 72 Hz valid mode
[ 53.578193] udlfb: 800x600 @ 75 Hz valid mode
[ 53.578196] udlfb: 832x624 @ 75 Hz valid mode
[ 53.578200] udlfb: 1024x768 @ 60 Hz valid mode
[ 53.578203] udlfb: 1024x768 @ 70 Hz valid mode
[ 53.578206] udlfb: 1024x768 @ 75 Hz valid mode
[ 53.578209] udlfb: 1280x1024 @ 75 Hz valid mode
[ 53.578213] udlfb: 1152x864 @ 75 Hz valid mode
[ 53.578216] udlfb: 1152x864 @ 75 Hz valid mode
[ 53.578219] udlfb: 1280x960 @ 60 Hz valid mode
[ 53.578222] udlfb: 1280x1024 @ 60 Hz valid mode
[ 53.578226] udlfb: Reallocating framebuffer. Addresses will change!
[ 53.579838] udlfb: 1280x1024 @ 60 Hz valid mode
[ 53.579849] udlfb: set_par mode 1280x1024
[ 53.589240] udlfb: DisplayLink USB device /dev/fb1 attached. 1280x1024 resolution. Using 5120K framebuffer memory
udlfb discovered the device, read the available modes and bound the device / dev / fb1.
In principle, this is enough if the output settings will be made through the X-server configs, but the desired is xrandr support.
Actually, clinging to the fact that udlfb detected the device, although there is udl in the system, we take it for the fact that the modules conflict and therefore we add udlfb to the list of non-downloadable ones. Create a displaylink.conf file and write it there:
[root@machine ~]$ echo 'blacklist udlfb' >> /etc/modprobe.d/displaylink.conf
We reboot again and look at the available adapters:
[user@machine ~]$ xrandr —listproviders:
Provider 0: id: 0x7b cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 5 associated providers: 0 name:Intel
Provider 1: id: 0x41 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting
Hooray, now there are two! The first through the integrated Intel HD4000, the second through our adapter.
Now let xrandr know how to live with it:
[user@machine ~]$ xrandr —setprovideroutputsource 1 0
... and see the conclusion:
[user@machine ~]$ xrandr
Screen 0: minimum 8 x 8, current 4566 x 1080, maximum 32767 x 32767
LVDS1 connected 1366x768+1280+0 (normal left inverted right x axis y axis) 293mm x 164mm
1366x768 60.02*+
1024x768 60.00
800x600 60.32 56.25
640x480 59.94
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+2646+0 (normal left inverted right x axis y axis) 509mm x 286mm
1920x1080 60.00*+ 50.00 59.94 30.00 29.97
1680x1050 59.88
1280x1024 60.02
1440x900 59.90
1280x800 59.91
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 70.07 60.00
800x600 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 66.67 60.00 59.94
720x400 70.08
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
DVI-1-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
1280x1024 60.02*+ 75.02
1280x960 60.00
1152x864 75.00
1024x768 75.08 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 60.00
720x400 70.08
1280x1024 (0x42) 108.000MHz
h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 63.98KHz
v: height 1024 start 1025 end 1028 total 1066 clock 60.02Hz
1152x864 (0x45) 108.000MHz
h: width 1152 start 1216 end 1344 total 1600 skew 0 clock 67.50KHz
v: height 864 start 865 end 868 total 900 clock 75.00Hz
1024x768 (0x47) 75.000MHz
h: width 1024 start 1048 end 1184 total 1328 skew 0 clock 56.48KHz
v: height 768 start 771 end 777 total 806 clock 70.07Hz
1024x768 (0x48) 65.000MHz
h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz
v: height 768 start 771 end 777 total 806 clock 60.00Hz
800x600 (0x4c) 40.000MHz
h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz
v: height 600 start 601 end 605 total 628 clock 60.32Hz
800x600 (0x4d) 36.000MHz
h: width 800 start 824 end 896 total 1024 skew 0 clock 35.16KHz
v: height 600 start 601 end 603 total 625 clock 56.25Hz
640x480 (0x50) 30.240MHz
h: width 640 start 704 end 768 total 864 skew 0 clock 35.00KHz
v: height 480 start 483 end 486 total 525 clock 66.67Hz
640x480 (0x51) 25.200MHz
h: width 640 start 656 end 752 total 800 skew 0 clock 31.50KHz
v: height 480 start 490 end 492 total 525 clock 60.00Hz
720x400 (0x52) 28.320MHz
h: width 720 start 738 end 846 total 900 skew 0 clock 31.47KHz
v: height 400 start 412 end 414 total 449 clock 70.08Hz
DVI-1-0 is our finding.
This concludes the small quest. Further it remains only to tell xrandr how to work with the conclusions. GUI lovers can use arandr , otherwise you can do, for example, like this:
[user@machine ~]$ xrandr --output LVDS1 --auto --output HDMI1 --auto --right-of LVDS1 --output DVI-1-0 --auto --left-of LVDS1
where LVDS1 is the built-in output of the laptop. For all outputs, the parameters are set automatically, output HDMI1 to the right of LVDS1, DVI-1-0 output to the left of LVDS1.
We get something like this:

DVI-1-0 - LVDS1 - HDMI1
And the general plan view:

PS: I
I will be grateful to the community for comments about errors and inaccuracies and I hope that this article manual will be useful to someone.