Xrandr problem trying to avoid broken display

Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
Days ago I broke my laptop display by accident, the right side of the screen is damage but the most part of the left side is usable. I do some research trying to find a way to modify the dimension of the screen to fit into the no damage area 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?
linux xrandr display monitors
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
6
down vote
favorite
Days ago I broke my laptop display by accident, the right side of the screen is damage but the most part of the left side is usable. I do some research trying to find a way to modify the dimension of the screen to fit into the no damage area 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?
linux xrandr display monitors
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
Days ago I broke my laptop display by accident, the right side of the screen is damage but the most part of the left side is usable. I do some research trying to find a way to modify the dimension of the screen to fit into the no damage area 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?
linux xrandr display monitors
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Days ago I broke my laptop display by accident, the right side of the screen is damage but the most part of the left side is usable. I do some research trying to find a way to modify the dimension of the screen to fit into the no damage area 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?
linux xrandr display monitors
linux xrandr display monitors
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Oct 1 at 21:41
Jeff Schaller
33.6k851113
33.6k851113
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Sep 30 at 21:02
RealTive
335
335
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
RealTive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Just set the screen size with xrandr --fb (no --mode, --transform, whatever).
$ xrandr --fb 800x768
xrandr will complain about the screen size being too small, but will apply the settings nonetheless.
Example:
$ xrandr --fb 1520x1080
xrandr: specified screen 1520x1080 not large enough for output VGA-0 (1920x1080+0+0)
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 29 (RRSetPanning)
Serial number of failed request: 43
Current serial number in output stream: 43
# from the xtruss output
--- ConfigureNotify(event=w#000004A8, window=w#000004A8, x=0, y=0, width=1520, height=1080, border-width=0, above-sibling=None, override-redirect=False)
$ xwininfo -root | grep geo
-geometry 1520x1080+0+0
That should probably be a warning rather than an error; there are situations where it makes perfect sense to set the screen size to something smaller than the actual display(s).
Update:
Multi-head enabled window managers get the info about the screen(s) via the Xrandr(3) and Xinerama(3) extensions, and do not clamp their dimensions inside the root window rectangle.
A temporary workaround would be to prevent them from using the Xrandr and Xinerama extensions via a LD_PRELOAD hack. That could be improved by turning the dummy functions into wrappers that trim the returned rectangles.
This worked for me on vanilla debian 9.5 with the mate desktop environment and either the lightdm or gdm3 display manager:
root# apt-get install mate-desktop-environment lightdm
root# apt-get install gcc
root# cat <<'EOT' | cc -fPIC -x c - -shared -o /etc/X11/no_xrr.so
int XineramaIsActive(void *d) return 0;
void *XineramaQueryScreens(void *dpy, int *n) *n = 0; return 0;
int XineramaQueryExtension(void *d, int *i, int *j) return 0;
int XRRQueryExtension(void *d, int *i, int *j) return 0;
EOT
root# cat <<'EOT' >/etc/X11/Xsession.d/98-no_xrr
export LD_PRELOAD=/etc/X11/no_xrr.so
case $STARTUP in
/usr/bin/ssh-agent*)
STARTUP="/usr/bin/ssh-agent env LD_PRELOAD=$LD_PRELOAD $STARTUP#* ";;
esac
EOT
Then, from the session menu of lightdm choose "MATE", and as the logged-in user:
$ LD_PRELOAD= xrandr --fb 800x768
I wasn't able to get it to work though with either plasma or gnome3/gnome-shell/mutter yet.
I tried to do that before, the problem is --fb just shrink the usable dimension of the screen to x and y values but it doesn't set the current size of the screen to that values. In another words, the half of the screen get unreachable using that command. imgur.com/a/bOCHrqI there you can see that the half of the screen has been cut using --fb, the rest of the screen is dark.
â RealTive
Oct 1 at 2:21
should the broken part of the screen be "reachable"? how? And the command really does set the size of the screen to those values -- look at thextrussandxwininfooutput; and the new size was readily picked by the window manager. What window manager are you using?
â mosvy
Oct 1 at 2:25
I'm trying to reduce the dimension of the entire screen to fit into the no damage area, when I use --fb XxY I get something like this imgur.com/a/1uszcyd the idea is reduce the dimension to see the entire window like this imgur.com/a/udSwTTl but smaller (smaller enough to be able to see it into the no damage area of my display). I don't know what is a window manager, any help?
â RealTive
Oct 1 at 2:34
What system / distribution is that? As to wm, that's a program like compiz, xfwm. It should handle the change in the root window size automatically. Could you please run thexwininfo -rootcommand in a terminal and post the output?
â mosvy
Oct 1 at 2:41
1
You should have tried the commands given in the "Update" part on your debian 9.5 -- they're not destructive; if it didn't work, you could've just removed the two files created (rm /etc/X11/Xsession.d/98-no_xrr /etc/X11/no_xrr.so) and uninstall mate (apt-get remove --purge mate-desktop-environment). But I'll try to have the hack work with gnome3/mutter too.
â mosvy
Oct 3 at 17:22
 |Â
show 9 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Just set the screen size with xrandr --fb (no --mode, --transform, whatever).
$ xrandr --fb 800x768
xrandr will complain about the screen size being too small, but will apply the settings nonetheless.
Example:
$ xrandr --fb 1520x1080
xrandr: specified screen 1520x1080 not large enough for output VGA-0 (1920x1080+0+0)
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 29 (RRSetPanning)
Serial number of failed request: 43
Current serial number in output stream: 43
# from the xtruss output
--- ConfigureNotify(event=w#000004A8, window=w#000004A8, x=0, y=0, width=1520, height=1080, border-width=0, above-sibling=None, override-redirect=False)
$ xwininfo -root | grep geo
-geometry 1520x1080+0+0
That should probably be a warning rather than an error; there are situations where it makes perfect sense to set the screen size to something smaller than the actual display(s).
Update:
Multi-head enabled window managers get the info about the screen(s) via the Xrandr(3) and Xinerama(3) extensions, and do not clamp their dimensions inside the root window rectangle.
A temporary workaround would be to prevent them from using the Xrandr and Xinerama extensions via a LD_PRELOAD hack. That could be improved by turning the dummy functions into wrappers that trim the returned rectangles.
This worked for me on vanilla debian 9.5 with the mate desktop environment and either the lightdm or gdm3 display manager:
root# apt-get install mate-desktop-environment lightdm
root# apt-get install gcc
root# cat <<'EOT' | cc -fPIC -x c - -shared -o /etc/X11/no_xrr.so
int XineramaIsActive(void *d) return 0;
void *XineramaQueryScreens(void *dpy, int *n) *n = 0; return 0;
int XineramaQueryExtension(void *d, int *i, int *j) return 0;
int XRRQueryExtension(void *d, int *i, int *j) return 0;
EOT
root# cat <<'EOT' >/etc/X11/Xsession.d/98-no_xrr
export LD_PRELOAD=/etc/X11/no_xrr.so
case $STARTUP in
/usr/bin/ssh-agent*)
STARTUP="/usr/bin/ssh-agent env LD_PRELOAD=$LD_PRELOAD $STARTUP#* ";;
esac
EOT
Then, from the session menu of lightdm choose "MATE", and as the logged-in user:
$ LD_PRELOAD= xrandr --fb 800x768
I wasn't able to get it to work though with either plasma or gnome3/gnome-shell/mutter yet.
I tried to do that before, the problem is --fb just shrink the usable dimension of the screen to x and y values but it doesn't set the current size of the screen to that values. In another words, the half of the screen get unreachable using that command. imgur.com/a/bOCHrqI there you can see that the half of the screen has been cut using --fb, the rest of the screen is dark.
â RealTive
Oct 1 at 2:21
should the broken part of the screen be "reachable"? how? And the command really does set the size of the screen to those values -- look at thextrussandxwininfooutput; and the new size was readily picked by the window manager. What window manager are you using?
â mosvy
Oct 1 at 2:25
I'm trying to reduce the dimension of the entire screen to fit into the no damage area, when I use --fb XxY I get something like this imgur.com/a/1uszcyd the idea is reduce the dimension to see the entire window like this imgur.com/a/udSwTTl but smaller (smaller enough to be able to see it into the no damage area of my display). I don't know what is a window manager, any help?
â RealTive
Oct 1 at 2:34
What system / distribution is that? As to wm, that's a program like compiz, xfwm. It should handle the change in the root window size automatically. Could you please run thexwininfo -rootcommand in a terminal and post the output?
â mosvy
Oct 1 at 2:41
1
You should have tried the commands given in the "Update" part on your debian 9.5 -- they're not destructive; if it didn't work, you could've just removed the two files created (rm /etc/X11/Xsession.d/98-no_xrr /etc/X11/no_xrr.so) and uninstall mate (apt-get remove --purge mate-desktop-environment). But I'll try to have the hack work with gnome3/mutter too.
â mosvy
Oct 3 at 17:22
 |Â
show 9 more comments
up vote
2
down vote
accepted
Just set the screen size with xrandr --fb (no --mode, --transform, whatever).
$ xrandr --fb 800x768
xrandr will complain about the screen size being too small, but will apply the settings nonetheless.
Example:
$ xrandr --fb 1520x1080
xrandr: specified screen 1520x1080 not large enough for output VGA-0 (1920x1080+0+0)
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 29 (RRSetPanning)
Serial number of failed request: 43
Current serial number in output stream: 43
# from the xtruss output
--- ConfigureNotify(event=w#000004A8, window=w#000004A8, x=0, y=0, width=1520, height=1080, border-width=0, above-sibling=None, override-redirect=False)
$ xwininfo -root | grep geo
-geometry 1520x1080+0+0
That should probably be a warning rather than an error; there are situations where it makes perfect sense to set the screen size to something smaller than the actual display(s).
Update:
Multi-head enabled window managers get the info about the screen(s) via the Xrandr(3) and Xinerama(3) extensions, and do not clamp their dimensions inside the root window rectangle.
A temporary workaround would be to prevent them from using the Xrandr and Xinerama extensions via a LD_PRELOAD hack. That could be improved by turning the dummy functions into wrappers that trim the returned rectangles.
This worked for me on vanilla debian 9.5 with the mate desktop environment and either the lightdm or gdm3 display manager:
root# apt-get install mate-desktop-environment lightdm
root# apt-get install gcc
root# cat <<'EOT' | cc -fPIC -x c - -shared -o /etc/X11/no_xrr.so
int XineramaIsActive(void *d) return 0;
void *XineramaQueryScreens(void *dpy, int *n) *n = 0; return 0;
int XineramaQueryExtension(void *d, int *i, int *j) return 0;
int XRRQueryExtension(void *d, int *i, int *j) return 0;
EOT
root# cat <<'EOT' >/etc/X11/Xsession.d/98-no_xrr
export LD_PRELOAD=/etc/X11/no_xrr.so
case $STARTUP in
/usr/bin/ssh-agent*)
STARTUP="/usr/bin/ssh-agent env LD_PRELOAD=$LD_PRELOAD $STARTUP#* ";;
esac
EOT
Then, from the session menu of lightdm choose "MATE", and as the logged-in user:
$ LD_PRELOAD= xrandr --fb 800x768
I wasn't able to get it to work though with either plasma or gnome3/gnome-shell/mutter yet.
I tried to do that before, the problem is --fb just shrink the usable dimension of the screen to x and y values but it doesn't set the current size of the screen to that values. In another words, the half of the screen get unreachable using that command. imgur.com/a/bOCHrqI there you can see that the half of the screen has been cut using --fb, the rest of the screen is dark.
â RealTive
Oct 1 at 2:21
should the broken part of the screen be "reachable"? how? And the command really does set the size of the screen to those values -- look at thextrussandxwininfooutput; and the new size was readily picked by the window manager. What window manager are you using?
â mosvy
Oct 1 at 2:25
I'm trying to reduce the dimension of the entire screen to fit into the no damage area, when I use --fb XxY I get something like this imgur.com/a/1uszcyd the idea is reduce the dimension to see the entire window like this imgur.com/a/udSwTTl but smaller (smaller enough to be able to see it into the no damage area of my display). I don't know what is a window manager, any help?
â RealTive
Oct 1 at 2:34
What system / distribution is that? As to wm, that's a program like compiz, xfwm. It should handle the change in the root window size automatically. Could you please run thexwininfo -rootcommand in a terminal and post the output?
â mosvy
Oct 1 at 2:41
1
You should have tried the commands given in the "Update" part on your debian 9.5 -- they're not destructive; if it didn't work, you could've just removed the two files created (rm /etc/X11/Xsession.d/98-no_xrr /etc/X11/no_xrr.so) and uninstall mate (apt-get remove --purge mate-desktop-environment). But I'll try to have the hack work with gnome3/mutter too.
â mosvy
Oct 3 at 17:22
 |Â
show 9 more comments
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Just set the screen size with xrandr --fb (no --mode, --transform, whatever).
$ xrandr --fb 800x768
xrandr will complain about the screen size being too small, but will apply the settings nonetheless.
Example:
$ xrandr --fb 1520x1080
xrandr: specified screen 1520x1080 not large enough for output VGA-0 (1920x1080+0+0)
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 29 (RRSetPanning)
Serial number of failed request: 43
Current serial number in output stream: 43
# from the xtruss output
--- ConfigureNotify(event=w#000004A8, window=w#000004A8, x=0, y=0, width=1520, height=1080, border-width=0, above-sibling=None, override-redirect=False)
$ xwininfo -root | grep geo
-geometry 1520x1080+0+0
That should probably be a warning rather than an error; there are situations where it makes perfect sense to set the screen size to something smaller than the actual display(s).
Update:
Multi-head enabled window managers get the info about the screen(s) via the Xrandr(3) and Xinerama(3) extensions, and do not clamp their dimensions inside the root window rectangle.
A temporary workaround would be to prevent them from using the Xrandr and Xinerama extensions via a LD_PRELOAD hack. That could be improved by turning the dummy functions into wrappers that trim the returned rectangles.
This worked for me on vanilla debian 9.5 with the mate desktop environment and either the lightdm or gdm3 display manager:
root# apt-get install mate-desktop-environment lightdm
root# apt-get install gcc
root# cat <<'EOT' | cc -fPIC -x c - -shared -o /etc/X11/no_xrr.so
int XineramaIsActive(void *d) return 0;
void *XineramaQueryScreens(void *dpy, int *n) *n = 0; return 0;
int XineramaQueryExtension(void *d, int *i, int *j) return 0;
int XRRQueryExtension(void *d, int *i, int *j) return 0;
EOT
root# cat <<'EOT' >/etc/X11/Xsession.d/98-no_xrr
export LD_PRELOAD=/etc/X11/no_xrr.so
case $STARTUP in
/usr/bin/ssh-agent*)
STARTUP="/usr/bin/ssh-agent env LD_PRELOAD=$LD_PRELOAD $STARTUP#* ";;
esac
EOT
Then, from the session menu of lightdm choose "MATE", and as the logged-in user:
$ LD_PRELOAD= xrandr --fb 800x768
I wasn't able to get it to work though with either plasma or gnome3/gnome-shell/mutter yet.
Just set the screen size with xrandr --fb (no --mode, --transform, whatever).
$ xrandr --fb 800x768
xrandr will complain about the screen size being too small, but will apply the settings nonetheless.
Example:
$ xrandr --fb 1520x1080
xrandr: specified screen 1520x1080 not large enough for output VGA-0 (1920x1080+0+0)
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 29 (RRSetPanning)
Serial number of failed request: 43
Current serial number in output stream: 43
# from the xtruss output
--- ConfigureNotify(event=w#000004A8, window=w#000004A8, x=0, y=0, width=1520, height=1080, border-width=0, above-sibling=None, override-redirect=False)
$ xwininfo -root | grep geo
-geometry 1520x1080+0+0
That should probably be a warning rather than an error; there are situations where it makes perfect sense to set the screen size to something smaller than the actual display(s).
Update:
Multi-head enabled window managers get the info about the screen(s) via the Xrandr(3) and Xinerama(3) extensions, and do not clamp their dimensions inside the root window rectangle.
A temporary workaround would be to prevent them from using the Xrandr and Xinerama extensions via a LD_PRELOAD hack. That could be improved by turning the dummy functions into wrappers that trim the returned rectangles.
This worked for me on vanilla debian 9.5 with the mate desktop environment and either the lightdm or gdm3 display manager:
root# apt-get install mate-desktop-environment lightdm
root# apt-get install gcc
root# cat <<'EOT' | cc -fPIC -x c - -shared -o /etc/X11/no_xrr.so
int XineramaIsActive(void *d) return 0;
void *XineramaQueryScreens(void *dpy, int *n) *n = 0; return 0;
int XineramaQueryExtension(void *d, int *i, int *j) return 0;
int XRRQueryExtension(void *d, int *i, int *j) return 0;
EOT
root# cat <<'EOT' >/etc/X11/Xsession.d/98-no_xrr
export LD_PRELOAD=/etc/X11/no_xrr.so
case $STARTUP in
/usr/bin/ssh-agent*)
STARTUP="/usr/bin/ssh-agent env LD_PRELOAD=$LD_PRELOAD $STARTUP#* ";;
esac
EOT
Then, from the session menu of lightdm choose "MATE", and as the logged-in user:
$ LD_PRELOAD= xrandr --fb 800x768
I wasn't able to get it to work though with either plasma or gnome3/gnome-shell/mutter yet.
edited Oct 2 at 6:59
answered Sep 30 at 23:53
mosvy
1,837110
1,837110
I tried to do that before, the problem is --fb just shrink the usable dimension of the screen to x and y values but it doesn't set the current size of the screen to that values. In another words, the half of the screen get unreachable using that command. imgur.com/a/bOCHrqI there you can see that the half of the screen has been cut using --fb, the rest of the screen is dark.
â RealTive
Oct 1 at 2:21
should the broken part of the screen be "reachable"? how? And the command really does set the size of the screen to those values -- look at thextrussandxwininfooutput; and the new size was readily picked by the window manager. What window manager are you using?
â mosvy
Oct 1 at 2:25
I'm trying to reduce the dimension of the entire screen to fit into the no damage area, when I use --fb XxY I get something like this imgur.com/a/1uszcyd the idea is reduce the dimension to see the entire window like this imgur.com/a/udSwTTl but smaller (smaller enough to be able to see it into the no damage area of my display). I don't know what is a window manager, any help?
â RealTive
Oct 1 at 2:34
What system / distribution is that? As to wm, that's a program like compiz, xfwm. It should handle the change in the root window size automatically. Could you please run thexwininfo -rootcommand in a terminal and post the output?
â mosvy
Oct 1 at 2:41
1
You should have tried the commands given in the "Update" part on your debian 9.5 -- they're not destructive; if it didn't work, you could've just removed the two files created (rm /etc/X11/Xsession.d/98-no_xrr /etc/X11/no_xrr.so) and uninstall mate (apt-get remove --purge mate-desktop-environment). But I'll try to have the hack work with gnome3/mutter too.
â mosvy
Oct 3 at 17:22
 |Â
show 9 more comments
I tried to do that before, the problem is --fb just shrink the usable dimension of the screen to x and y values but it doesn't set the current size of the screen to that values. In another words, the half of the screen get unreachable using that command. imgur.com/a/bOCHrqI there you can see that the half of the screen has been cut using --fb, the rest of the screen is dark.
â RealTive
Oct 1 at 2:21
should the broken part of the screen be "reachable"? how? And the command really does set the size of the screen to those values -- look at thextrussandxwininfooutput; and the new size was readily picked by the window manager. What window manager are you using?
â mosvy
Oct 1 at 2:25
I'm trying to reduce the dimension of the entire screen to fit into the no damage area, when I use --fb XxY I get something like this imgur.com/a/1uszcyd the idea is reduce the dimension to see the entire window like this imgur.com/a/udSwTTl but smaller (smaller enough to be able to see it into the no damage area of my display). I don't know what is a window manager, any help?
â RealTive
Oct 1 at 2:34
What system / distribution is that? As to wm, that's a program like compiz, xfwm. It should handle the change in the root window size automatically. Could you please run thexwininfo -rootcommand in a terminal and post the output?
â mosvy
Oct 1 at 2:41
1
You should have tried the commands given in the "Update" part on your debian 9.5 -- they're not destructive; if it didn't work, you could've just removed the two files created (rm /etc/X11/Xsession.d/98-no_xrr /etc/X11/no_xrr.so) and uninstall mate (apt-get remove --purge mate-desktop-environment). But I'll try to have the hack work with gnome3/mutter too.
â mosvy
Oct 3 at 17:22
I tried to do that before, the problem is --fb just shrink the usable dimension of the screen to x and y values but it doesn't set the current size of the screen to that values. In another words, the half of the screen get unreachable using that command. imgur.com/a/bOCHrqI there you can see that the half of the screen has been cut using --fb, the rest of the screen is dark.
â RealTive
Oct 1 at 2:21
I tried to do that before, the problem is --fb just shrink the usable dimension of the screen to x and y values but it doesn't set the current size of the screen to that values. In another words, the half of the screen get unreachable using that command. imgur.com/a/bOCHrqI there you can see that the half of the screen has been cut using --fb, the rest of the screen is dark.
â RealTive
Oct 1 at 2:21
should the broken part of the screen be "reachable"? how? And the command really does set the size of the screen to those values -- look at the
xtruss and xwininfo output; and the new size was readily picked by the window manager. What window manager are you using?â mosvy
Oct 1 at 2:25
should the broken part of the screen be "reachable"? how? And the command really does set the size of the screen to those values -- look at the
xtruss and xwininfo output; and the new size was readily picked by the window manager. What window manager are you using?â mosvy
Oct 1 at 2:25
I'm trying to reduce the dimension of the entire screen to fit into the no damage area, when I use --fb XxY I get something like this imgur.com/a/1uszcyd the idea is reduce the dimension to see the entire window like this imgur.com/a/udSwTTl but smaller (smaller enough to be able to see it into the no damage area of my display). I don't know what is a window manager, any help?
â RealTive
Oct 1 at 2:34
I'm trying to reduce the dimension of the entire screen to fit into the no damage area, when I use --fb XxY I get something like this imgur.com/a/1uszcyd the idea is reduce the dimension to see the entire window like this imgur.com/a/udSwTTl but smaller (smaller enough to be able to see it into the no damage area of my display). I don't know what is a window manager, any help?
â RealTive
Oct 1 at 2:34
What system / distribution is that? As to wm, that's a program like compiz, xfwm. It should handle the change in the root window size automatically. Could you please run the
xwininfo -root command in a terminal and post the output?â mosvy
Oct 1 at 2:41
What system / distribution is that? As to wm, that's a program like compiz, xfwm. It should handle the change in the root window size automatically. Could you please run the
xwininfo -root command in a terminal and post the output?â mosvy
Oct 1 at 2:41
1
1
You should have tried the commands given in the "Update" part on your debian 9.5 -- they're not destructive; if it didn't work, you could've just removed the two files created (
rm /etc/X11/Xsession.d/98-no_xrr /etc/X11/no_xrr.so) and uninstall mate (apt-get remove --purge mate-desktop-environment). But I'll try to have the hack work with gnome3/mutter too.â mosvy
Oct 3 at 17:22
You should have tried the commands given in the "Update" part on your debian 9.5 -- they're not destructive; if it didn't work, you could've just removed the two files created (
rm /etc/X11/Xsession.d/98-no_xrr /etc/X11/no_xrr.so) and uninstall mate (apt-get remove --purge mate-desktop-environment). But I'll try to have the hack work with gnome3/mutter too.â mosvy
Oct 3 at 17:22
 |Â
show 9 more comments
RealTive is a new contributor. Be nice, and check out our Code of Conduct.
RealTive is a new contributor. Be nice, and check out our Code of Conduct.
RealTive is a new contributor. Be nice, and check out our Code of Conduct.
RealTive is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f472459%2fxrandr-problem-trying-to-avoid-broken-display%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password