Days ago I broke my laptop display by accident, the right side of the screen is damaged but the most part of the left side is usable. I did some research trying to find a way to modify the dimension of the screen to fit into the area with no damage and I found xrandr.
I found the next .sh archive but I can't find a way to put the screen into the left side, neither modifying the --transform parameters or the --fb command.
#!/bin/bash
#change these 4 variables accordingly
ORIG_X=1280
ORIG_Y=800
NEW_X=1160
NEW_Y=800
###
X_DIFF=$(($NEW_X - $ORIG_X))
Y_DIFF=$(($NEW_Y - $ORIG_Y))
ORIG_RES="$ORIG_X"x"$ORIG_Y"
NEW_RES="$NEW_X"x"$NEW_Y"
ACTIVEOUTPUT=$(xrandr | grep -e " connected [^(]" | sed -e "s/\([A-z0-9]\+\) connected.*/\1/")
MODELINE=$(cvt $NEW_X $NEW_Y | grep Modeline | cut -d' ' -f3-)
xrandr --newmode $NEW_RES $MODELINE
xrandr --addmode $ACTIVEOUTPUT $NEW_RES
xrandr --output $ACTIVEOUTPUT --fb $NEW_RES --panning $NEW_RES --mode $NEW_RES
xrandr --fb $NEW_RES --output $ACTIVEOUTPUT --mode $ORIG_RES --transform 1,0,$X_DIFF,0,1,$Y_DIFF,0,0,1
I also tried to do it without the .sh archive running the next line:
xrandr --output LVDS-1 --fb 800x768 --mode 800x768 --transform 1,0,566,0,1,0,0,0,1
The screen took the position I want but after running that command a black border on the left side of the screen appears and I can't remove it.
Any idea of what it's going wrong here?