Ubuntu – Add asymmetrical margin on LCD display

displaydisplay-resolutionscreenxrandr

My old laptop display is starting to break, and I have many dead pixels and other physical issues on the left side of the screen only. Of course I should get a new monitor (or ideally a new laptop), but as a workaround I'd like to configure the display to show a smaller screen size with a blank margin on the left where the broken area is.

It should look approximately like this:

+---+-----------------+--
| b |                 |
| l |    remaining    | 6
| a |     screen      | 0
| n |      area       | 0
| k |    (904x600)    |
+---+-----------------+--
|120|   -   904   -   |
|    -   1024    -    |

I've managed to use cvt to generate a 904×600 modeline, and I can add that mode to the display using xrandr, but I cannot for the life of me figure out how to position the smaller screen on the right side of my full display. It seems like the --pos flag should work for this, but xrandr --output LVDS1 --mode 904x600_60.00 --pos 120x0 isn't working (the screen shows up centered in the display, with equal margins on left and right).

Any tips on how to get this to work? I'm using Ubuntu 13.10, in case it makes a difference. Thanks for any advice!

Best Answer

Using NVidia Driver

I put this here for who uses NVidia proprietary driver. So if it is not the case, please add to the question the driver you are using. (Such advanced options depends on the used driver)

  1. Run sudo nvidia-settings
  2. X Server Display Configuration tab → Set monitor from 'Selection:' → Advanced
  3. BTW, This option is called Under Scan. Here an example for my monitor with 1280x800 original resolution. I removed 120 from left and 75 from bottom to keep same ratio.

    ViewPortIn: 1160x725
    ViewPortOut: 1160x725+120+0
    Panning: 1160x725
    
  4. Apply

Note: You can save as the following screenshot to confirm it's size 1160x725

enter image description here

Margin can be seen here:

enter image description here

Related Question