Go Back   DisplayLink Forum > DisplayLink Graphics Technology > Linux and Open Source

Reply
 
Thread Tools Search this Thread Display Modes
Old 02-15-2017, 03:01 PM   #1
seidler2547
Junior Member
 
Join Date: Feb 2017
Posts: 6
Smile Rotation working on DL-4300 USB3.0

Hi,

I just wanted to report that after a long time of trying, I finally got rotation working on my Generic DiplayLink DVI device that shows as 17e9:4300 in lsusb.

I use Arch Linux with Xorg 1.19.1 and the AUR packages for EVDI and DisplayLinkManager. The device was working fine but whenever I tried rotation, xrandr would accept the setting but it didn't actually do anything except confusing X itself.

I have a Intel graphics (i5-3317U, Intel® HD Graphics 4000), so I used xf86-video-intel for a long time, because even though modesetting is preferred now, I could never get it to work together with the modesetting driver that DisplayLink needs.

Now I have found a working configuration, and I believe the key is to disable DRI3 on the Intel modesetting driver, because DisplayLink doesn't support DRI3 (AFAIK) and so they don't play well together.

Despite all the stuff that one finds on the internet, I think that disabling DRI3 is done through
Code:
  Option      "PageFlip" "off"
and that is what worked in the end. Now I can have my two 1600x1200 screen rotated for a total of 2400x1600 screen estate. One is connected to the laptop HDMI, the other one to the USB DisplayLink.

Here is the relevant part of xorg.conf:

Code:
Section "Device"
  Identifier  "intel"
  Driver      "modesetting"
  Option      "kmsdev" "/dev/dri/card0"
  Option      "SWCursor" "on"
  Option      "PageFlip" "off"
  Option      "ShadowFB" "true"
EndSection

Section "Device"
  Identifier  "USB3"
  BusID       "USB"
  Driver      "modesetting"
  Option      "kmsdev" "/dev/dri/card1"
  Option       "ReportDamage" "on"
  Option       "SWCursor" "on"
  Option       "ShadowFB" "on"
EndSection
Important to note: it does not work the first time after login, but then when I log out and log in again, it works just fine.

[EDIT]
Forgot to say: the best thing about it is that I have no problems with partial screen updates anymore. Everything is working perfectly. Previously it would often not update parts of the screen until I went over them with the mouse cursor. I had worked around that by running a compositor (compton), but still I had lag sometimes. Now compton is not needed and the screen always updates everything just as it should.

I can also watch 1440p video on youtube spanning both monitors and it looks great, no lag on either screen. 4K is a bit too much for my little laptop CPU.
[/EDIT]

Hope that helps,

Stefan

Last edited by seidler2547; 02-15-2017 at 03:11 PM.
seidler2547 is offline   Reply With Quote
Old 02-20-2017, 09:01 AM   #2
taiki
Junior Member
 
Join Date: Jan 2017
Posts: 3
Default Do you use xf86-video-intel ?

Hi.
Great work.

Do you use xf86-video-intel?
Should I uninstall the AUR evdi and displaylink manager for rotation?

Please help me.
taiki is offline   Reply With Quote
Old 02-21-2017, 07:02 PM   #3
seidler2547
Junior Member
 
Join Date: Feb 2017
Posts: 6
Default

Works with intel and modesetting, I tried both. xf86-video-intel is deprecated, but it works fine for me.

evdi and displaylink need both be installed from AUR. I found out that sometimes the USB takes a while to register, so when that happens and the devices are recognized after X starts, X will not set the "PageFlip" option.

So in /opt/displaylink/udev.sh I replaced

Code:
  systemctl start displaylink.service
with
Code:
  systemctl start displaylink.service
  systemctl restart display-manager.service
Stefan
seidler2547 is offline   Reply With Quote
Old 02-24-2017, 08:32 PM   #4
seidler2547
Junior Member
 
Join Date: Feb 2017
Posts: 6
Default

I recently got a StarTech USB3.0 Dock with DVI, HDMI and VGA outputs and the above method still works when using modesetting for the primary GPU and having PageFlip off on all driver definitions. Using evdi 1.3.43 and DLM 1.3.52.

So I have both external screens connected to the dock and both rotate ok. This doesn't seem to honour VSync, so glxgears reports about 290fps.

I have named the Driver Identifiers Card0, Card1 and Card2 and that seems to convince X to pick up the PageFlip off Option correctly every time, so no need to restart display-manager.service.

Stefan
seidler2547 is offline   Reply With Quote
Old 03-01-2017, 04:46 PM   #5
taiki
Junior Member
 
Join Date: Jan 2017
Posts: 3
Default No rotation option found

Thanks to your reply.

I made the 99-evdi.conf in xorg.conf.d like following:

Code:
Section "Device"
  Identifier  "intel"
  Driver      "modesetting"
  Option      "kmsdev" "/dev/dri/card0"
  Option      "SWCursor" "on"
  Option      "PageFlip" "off"
  Option      "ShadowFB" "true"
  Option       "RandRRotation" "True"

EndSection

Section "Device"
  Identifier  "USB3"
  BusID       "USB"
  Driver      "modesetting"
  Option      "kmsdev" "/dev/dri/card1"
  Option       "ReportDamage" "on"
  Option       "SWCursor" "on"
  Option       "ShadowFB" "on"
  Option       "RandRRotation" "True"
  Option       "rotate" "CCW"

EndSection
But I cannot rotate because No rotation option avaiable.

There are the xrandr outputs.
Code:
Screen 0: minimum 8 x 8, current 4102 x 1824, maximum 32767 x 32767
eDP1 connected primary 2736x1824+0+0 (normal left inverted right x axis y axis) 260mm x 173mm
   2736x1824      60.0*+
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1366x768+2736+0 344mm x 194mm
   1366x768       60.0*+
   1024x768       75.1     70.1     60.0  
   800x600        72.2     75.0     60.3     56.2  
   848x480        60.0  
   640x480        75.0     72.8     60.0     59.9
taiki is offline   Reply With Quote
Old 03-06-2017, 01:37 AM   #6
Conassa
Junior Member
 
Join Date: Mar 2017
Posts: 3
Default

Stefan, awesome, thanks for this. Rotation works fine on my Intel HD4000.

I have reduced your xorg config to this:

Code:
Section "Device"
  Identifier  "intel"
  Option      "kmsdev" "/dev/dri/card0"
  Option      "PageFlip" "off"
EndSection

Section "Device"
  Identifier  "USB3"
  BusID       "USB"
  Driver      "modesetting"
  Option      "kmsdev" "/dev/dri/card1"
  Option      "PageFlip" "off"
EndSection
I'm also using the new driver - and glxgears seems synced with the DisplayLink monitor's refresh rate. However for it to draw properly I had to use:
compton --glx-use-copysubbuffermesa --glx-no-rebind-pixmap
(I'm using compton with openbox)

My only complain is CPU usage. With glxgears running I get 40% usage on one core... is this normal?

taiki - try removing the RandRRotation and rotate options. It rotates fine for me without those.

Last edited by Conassa; 03-06-2017 at 12:45 PM.
Conassa is offline   Reply With Quote
Old 03-30-2017, 02:48 PM   #7
Eevey
Junior Member
 
Join Date: Mar 2017
Posts: 1
Default

Thanks for the information and research, rotation works like a charm here as well, after some fiddling! (Gnome Shell on Antergos/Arch Linux)

I have an Asus MB169B+ that I bought without properly researching whether screen rotation would work on Linux, and was quite shocked to find that it didn't out of the box. I tried a number of variations, based on the experience of the other people in this thread, and found that it didn't really work properly without having all the lines:
Code:
Section "Device"
  Identifier  "intel"
  Driver      "modesetting"
  Option      "kmsdev" "/dev/dri/card0"
  Option      "PageFlip" "off"
  Option      "SWCursor" "on"
  Option      "ShadowFB" "true"
EndSection

Section "Device"
  Identifier  "USB3"
  BusID       "USB"
  Driver      "modesetting"
  Option      "kmsdev" "/dev/dri/card1"
  Option      "PageFlip" "off"
  Option      "SWCursor" "on"
  Option      "ShadowFB" "true"
EndSection
On a side-note: the SWCursor option significantly reduces mouse flickering for me, though it's not completely gone.

Also really hope Wayland will be supported soon and screen rotation will just work out of the box there. :-)
Eevey is offline   Reply With Quote
Old 01-18-2021, 01:36 PM   #8
ArcturusB
Junior Member
 
Join Date: Jan 2021
Posts: 1
Default

It took me a while to get rotation to work with my Asus MB16A display, so I figured I’d post something in case it helps other users.

The solution posted by Eevey (almost 4 years ago!) for their Asus MB169B+ also works with the MB16A on Arch Linux.
ArcturusB is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.