3

Due to a fault with my screen (white vertical bar, the rest is fine), I would like to be able to tell Linux (X and console) to only use part of the screen.

Does anyone know if I can achieve this with kernel boot params, under- scanning, xrandr, or clever X configuration (or a combination thereof).

I want to configure it to use something like 800px x 1080px (it's a 1920x800 display, the white bar appears to the right hand side), but without trying to centre the image (as adjusting the screen resolution does).

All ideas welcomed.

TIA.

newtovaux
  • 353
  • 1
  • 2
  • 6
  • AFAIK you can't make it use only part of the framebuffer, as opposed to displaying just part of the framebuffer ("viewport"), which works. I'd try to do a custom modeline, old-school style, with larger sync durations, so you get a smaller visible framebuffer. – dirkt Feb 09 '17 at 12:18
  • 2
    I can do something like: `xrandr --current --output eDP-1 --fb 1500x1080 --transform 1,0,-100,0,1,0,0,0,1` which shifts the screen, but then things are missing off the right hand side of the screen – newtovaux Feb 09 '17 at 12:44
  • See https://unix.stackexchange.com/questions/127911/due-to-a-broken-monitor-i-need-to-setup-only-the-right-half-of-my-screen – rogerdpack May 18 '23 at 07:23

1 Answers1

0

This is just a workaround since the maximized windows will still fill more than the chosen screen. Yet, this makes it possible to see most of the window frames so that you can manually resize them to the right part of the screen.


I had broken the roughly right half of the screen of a small 11.2 inch netbook. Therefore I changed the resolution and other parameters of the comment of the user above until it fitted.

xrandr --current  --output eDP-1 --fb 960x1100 --transform 1,0,0,0,1,0,0,0,1

If you want this to be on the right side, instead, you need to shift it to the right

xrandr --current  --output eDP-1 --fb 960x1100 --transform 1,0,-840,0,1,0,0,0,1

This is just the result of checks, the break is 840 pixels to the right in my case.

For more parameters, see the docs of xrandr:

If underscan is not available another solution is using xrandr --transform a,b,c,d,e,f,g,h,i, which applies a transformation matrix on the output. See the xrandr(1) § RandR_version_1.3_options manual page for the explanation of the transformation.

For example, the transformation scaling horizontal coordinates by 0.8, vertical coordinates by 1.04 and moving the screen by 35 pixels right and 19 pixels down, is:

$ xrandr --output HDMI1 --transform 0.80,0,-35,0,1.04,-19,0,0,1

(you need to change HDMI1 to eDP-1 if you want the change on the "home screen")

Some additional tricks:

  • At best you have the chance to connect a second monitor in mirrored mode so that you can always get back to see the uncut terminal window.
  • You can also just use the "Arrow-up button" twice + "Enter button" to get back to the previous state.
  • Do not connect the mirrored second screen during the final checks since in my case, there was a shift to the right that disappeared as soon as I took off the second monitor.
  • If for some reasons, you want the screen to be skewed or turned, check the other parameters.

You must check the final results on the broken screen only. Strangely, after having found a way to show the screen directly on the left, bordering at the rough middle of the screen, you still do not see the most right side of any maximized window. Instead, you will still have to narrow down the windows so that you can see them as a whole in the right screen space. That might get solved using a display manager, see xrandr: display borders are cutoff, but I have not tried it.

Strangly, after some successful tests, the results fell back to always just show just the message:

xrandr: specified screen 960x1100 not large enough for output eDP-1 (1920x1080+1+680+1)
xrandr: specified screen 960x1100 not large enough for output HDMI-1 (1680x1050+0+0)

But it worked at the start of the tests, thus it also might work for you.

To get further with this, find out about possible resolution and display names with:

$ xrandr -q
questionto42
  • 405
  • 1
  • 4
  • 12