Go Back   DisplayLink Forum > DisplayLink Graphics Technology > Linux and Open Source
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-18-2019, 09:11 AM   #1
edge-case
Junior Member
 
Join Date: Oct 2019
Posts: 2
Talking Bash script works great!

The bash script worked very well for me and solved my problem, thank you! I wanted to add a few more details for others like me that might not be familiar with running bash scripts.

Step one - take the code below and copy paste it into a text editor, for example, gedit. Then save the file with any name you want, or something like fixresolution.sh.

Save it in a folder that is easy to find or navigate to.

Quote:
Originally Posted by jei View Post

Code:
#!/bin/bash

# Adjust these parameters to your needs.
# These worked for me (AOC E1659Fwu)
OUTPUT="DVI-I-1-1"
HORIZONTAL_RES="1360"
VERTICAL_RES="768"

MODELINE="$(cvt ${HORIZONTAL_RES} ${VERTICAL_RES} | tail -n 1 | awk '{for (i=3; i<=NF; i++) print $i}')"
MODELINE_NAME=$(echo ${MODELINE} | awk '{print $1}' | sed -e 's/^"//' -e 's/"$//')

echo "Modeline:"
echo ${MODELINE_NAME} ${MODELINE}
echo

echo "[*] xrandr --newmode"
xrandr -d :0 --newmode ${MODELINE_NAME} ${MODELINE}

echo "[*] xrandr --addmode (${OUTPUT})"
xrandr -d :0 --addmode "${OUTPUT}" ${MODELINE_NAME}

echo "[*] Set new resolution"
xrandr -d :0 --output "${OUTPUT}" --mode ${MODELINE_NAME}
Step two - open a terminal (Ctrl-Alt-T), and cd to the same directory where fixresolution.sh is stored. Alternatively, you can navigate to that folder in a window, then right click and choose "Open in terminal"

Step three - in the terminal, type:

Code:
 
chmod +x fixresolution.sh
./fixresolution.sh

Last edited by edge-case; 10-18-2019 at 10:19 AM.
edge-case is offline   Reply With Quote
Reply

Tags
distorted, image, problem, rotated, skewed


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 12:16 PM.


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