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

Reply
 
Thread Tools Search this Thread Display Modes
Old 06-28-2020, 08:27 PM   #1
theeta
Junior Member
 
Join Date: Dec 2019
Posts: 2
Default Arch Linux - MiniRay Screen Broken

I have Arch Linux installed on my system. I have a miniRay projector which works on the Display Link technology.
The projector works fine with my android phone. But while trying to make it work with the Laptop where Arch is installed, the screen always gets broken.
I believe the issue is with resolution compatibilty between my system and the projector.



Code:
[theta@boolean-pc ~]$ xrandr
Screen 0: minimum 8 x 8, current 1368 x 768, maximum 32767 x 32767
eDP1 connected primary 1368x768+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
   1368x768_60.00  59.88 +
   1920x1080     60.06 +  59.93    40.04  
   1680x1050     59.88  
   1400x1050     59.98  
   1600x900      60.00    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1368x768      60.00*   59.88    59.85  
   1280x800      59.81    59.91  
   1280x720      59.86    60.00    59.74  
   1024x768      60.00  
   1024x576      60.00    59.90    59.82  
   960x540       60.00    59.63    59.82  
   800x600       60.32    56.25  
   864x486       60.00    59.92    59.57  
   640x480       59.94  
   720x405       59.51    60.00    58.99  
   640x360       59.84    59.32    60.00
HDMI1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
DVI-I-1-1 connected 640x480+640+0 (normal left inverted right x axis y axis) 211mm x 158mm
   1368x768_60.00  59.88 +
   854x480       59.23 +
   856x480_59.90  59.91  
   1368x768_59.90  59.90  
   864x486_59.90  59.91  
   640x480_59.90  59.91* 
  1368x768_60.00 (0x47) 85.250MHz -HSync +VSync
        h: width  1368 start 1440 end 1576 total 1784 skew    0 clock  47.79KHz
        v: height  768 start  771 end  781 total  798           clock  59.88Hz
  856x480_59.90 (0xa1f) 31.680MHz -HSync +VSync
        h: width   856 start  872 end  960 total 1064 skew    0 clock  29.77KHz
        v: height  480 start  481 end  484 total  497           clock  59.91Hz
  1368x768_59.90 (0xca7) 85.720MHz -HSync +VSync
        h: width  1368 start 1440 end 1584 total 1800 skew    0 clock  47.62KHz
        v: height  768 start  769 end  772 total  795           clock  59.90Hz
  864x486_59.90 (0xcde) 32.850MHz -HSync +VSync
        h: width   864 start  888 end  976 total 1088 skew    0 clock  30.19KHz
        v: height  486 start  487 end  490 total  504           clock  59.91Hz
  640x480_59.90 (0xd30) 23.820MHz -HSync +VSync
        h: width   640 start  656 end  720 total  800 skew    0 clock  29.77KHz
        v: height  480 start  481 end  484 total  497           clock  59.91Hz
[theta@boolean-pc ~]$
The different modelines generated in thh DVI-I-1-1 output have been tried by me to try out which one runs. To generate them I am using a script as follows
Code:
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2013-2014 Nathan Typanski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# Script for setting up DisplayLink monitor.
#
# Fill in MAINOUTPUT, MAINPROVIDER, WIDTH, HEIGHT, and REFRESH with your own
# values before use.

MAINOUTPUT="eDP1" # Obtained from xrandr --current
MAINPROVIDER="0"   # Obtained from xrandr --listproviders
WIDTH="854"       # Width of DisplayLink monitor in pixels
HEIGHT="480"       # Height of DisplayLink monitor in pixels
WIDTH="1368"       # Width of DisplayLink monitor in pixels
HEIGHT="768"       # Height of DisplayLink monitor in pixels
WIDTH="640"       # Width of DisplayLink monitor in pixels
HEIGHT="480"       # Height of DisplayLink monitor in pixels
REFRESH="59.9"     # Refresh rate of DisplayLink monitor
#REFRESH="60"     # Refresh rate of DisplayLink monitor

# Behave like `echo`, but print the first arg in blue, and subsequent args in
# regular font. Purely for eyecandy.
function blueprint() {
    tput setaf 6
    tput bold
    for arg in "$@"; do
        printf "$arg "
        tput sgr0
    done
    echo
}

# Print in bold red text to stderr and exit the program with status 1.
function fail() {
    tput setaf 1
    tput bold
    for arg in "$@"; do
        echo "$arg" > /dev/stderr
        tput sgr0
    done
    tput sgr0
    exit 1
}

# Generate modeline info for the displaylink monitor in xrandr using 'gtf'.
# We need to do some work on gtf's output to make it usable.
modeline=$(gtf "$WIDTH" "$HEIGHT" "$REFRESH" |\
           grep 'Modeline' |\
           sed 's/\( *Modeline *\)//g' |\
           sed 's/"//g')

dlmodename=$(echo "$modeline" | cut -d ' ' -f 1)

# Try to guess at the DisplayLink provider number. If there are other
# modesetting providers active, this might fail to grab the correct
# one.
dlprovider=$(xrandr --listproviders | \
             grep 'name:modesetting' | \
             cut -d ' ' -f 2 | \
             sed -e 's/://g')

if [ -z "$dlprovider" ]; then
    fail "<< No displaylink providers found, bailing! >>"
fi

# Obtain the dimensions of the main provider.
mainstatus=$(xrandr --current | grep "$MAINOUTPUT" | cut -d ' ' -f 4)

if [ -z "$mainstatus" ]; then
    fail "<< Couldn't get status of main output $MAINOUTPUT >>"
fi

# Get the width, height, and position of the main provider from $mainstatus
# so we can place the DisplayLink output next to it.
attributes=($(sed \
            's/\([0-9]\+\)x\([0-9]\+\)+\([0-9]\+\)+\([0-9]\+\)/\1 \2 \3 \4/g' \
            <<< "$mainstatus"))

# Break attributes into component parts so we can use nice descriptive names.
mainwidth="${attributes[0]}"
mainheight="${attributes[1]}"
mainx="${attributes[2]}"
mainy="${attributes[3]}"

blueprint ">> Generated modeline:" "$modeline"
blueprint ">> Detected DisplayLink provider:" "$dlprovider"
blueprint ">> Main output config:"\
          "$mainwidth"x"$mainheight" 'resolution'\
          'at position ('"$mainx"','"$mainy"')'

# DisplayLink monitors usually show up as DVI outputs, but we could probably
# find a more definitive way to check this.
if ! xrandr | grep DVI; then
    blueprint "Associating DL provider with $MAINPROVIDER"

    xrandr --setprovideroutputsource "$dlprovider" "$MAINPROVIDER" > /dev/null

    if [[ "$?" -ne 0 ]]; then
      fail "Could not set Displayink provider."
    fi
fi

if ! xrandr | grep "$dlmodename" > /dev/null; then
    blueprint ">> Desired DisplayLink mode "
    printf "$dlmodename"
    blueprint " does not exist! Creating new mode ...\n"
    xrandr --newmode $modeline || fail "could not create mode for $dlmodename"
fi


dloutput=$(xrandr | grep DVI | cut -d ' ' -f 1)
[ "$dloutput" ] || fail " << Failed to find the DisplayLink output >>";

blueprint ">> DisplayLink output: " "$dloutput"

# Add the modeline to the DisplayLink output. Perhaps we shouldn't actually do
# this every time, and in fact we should look and see if DVI-whatever already
# has that mode associated with it.
xrandr --addmode "$dloutput" "$dlmodename"


echo --output "$MAINOUTPUT" \
       --mode "$mainwidth"x"$mainheight" \
       --pos "$mainx"x"$mainy" --rotate normal \
       --output "$dloutput" --mode "$dlmodename" \
       --pos "$mainwidth"x"$mainy" --rotate normal \
       --output eDP1 --off 

# The payoff. If this passes, we're in business.
xrandr --output "$MAINOUTPUT" \
       --mode "$mainwidth"x"$mainheight" \
       --pos "$mainx"x"$mainy" --rotate normal \
       --output "$dloutput" --mode "$dlmodename" \
       --pos "$mainwidth"x"$mainy" --rotate normal \
       --output eDP1 --off \
 || fail "<< Couldn't configure xrandr outputs - try doing it manually >>"
My System:
Code:
[theta@boolean-pc ~]$ uname -a
Linux boolean-pc 5.7.4-arch1-1 #1 SMP PREEMPT Thu, 18 Jun 2020 16:01:07 +0000 x86_64 GNU/Linux
dkms O/P
Code:
[theta@boolean-pc ~]$ dkms status
evdi, 1.7.0, 5.4.47-1-lts, x86_64: installed
evdi, 1.7.0, 5.7.4-arch1-1, x86_64: installed
vboxhost, 6.1.10_OSE, 5.4.47-1-lts, x86_64: installed
vboxhost, 6.1.10_OSE, 5.7.4-arch1-1, x86_64: installed
theeta is offline   Reply With Quote
Old 06-28-2020, 08:34 PM   #2
theeta
Junior Member
 
Join Date: Dec 2019
Posts: 2
Default A Screenshot

theeta is offline   Reply With Quote
Old 06-30-2020, 01:48 PM   #3
KatarzynaCzaja
DisplayLink Tech Support
 
KatarzynaCzaja's Avatar
 
Join Date: Apr 2020
Posts: 461
Default

Hello,

Thank you for reaching out to us!

This issue could depend on the memory layout in the hardware or the openGL driver but to workaround that problem you would have to create new mode 1366x768 or 1360x768 and that should improve the performance.

Best regards,
Katarzyna
KatarzynaCzaja 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 08:53 PM.


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