Tuesday, September 13, 2011

HOWTO: Scale Your Display under Linux

Something that has always annoyed me about a good deal of netbooks is the fact that someone decided that 1024x600 was an acceptable maximum resolution. While this isn't always an issue, it becomes extra annoying when you attach an external display to your tiny computer. By default your are typically forced into one of two choices:

1.) You run both screens in 800x600, rendering over 20% of your netbook's internal display useless.

2.) You run the external screen at 1024x768 and the internal screen at 1024x600 and have the bottom 168 pixels show up on the external display, but not on the netbook.

Something many people don't know about is that the display tool xrandr has a really nifty "scale" option you can utilize to make your netbook's screen behave as though it has a higher resolution than it really does. For instance if you have the second case I mention above you simply need to run the command:

xrandr --output LVDS1 --mode 1024x600 --scale 1.00x1.28 --panning 1024x768

in terminal (note your internal display name may vary, most laptops default to LVDS1 though). After running this you will see your netbook display adjust itself so the height of 768 is smushed into it's normal 600 units. This appear a small bit stretched in this mode, but so long as you don't get too crazy with the scale factor it is hardly noticeable.

~Jeff Hoogland


  1. I like krandrtray but it is a good idea to know the syntax of xrandr, thanks. Krandrtray lays out everything as a button press, including monitor frequency in case auto does not work. It also has an auto rollback in case nothing worked.

    With E16, different sized screens seems to expand the desktop into a rectangle of the largest dimensions, so that a portion of the actual screen is hidden out of sight. I don't mind that behavior because the hidden screen space is visible in pagers and programs can be dragged into view.

    E17 on my laptop is a little disappointing because the second monitor, while properly sized, is not properly joined as a unified screen space. I can drag things into it, but they stay there regardless of what virtual screen I look at. This might be the version of E17 in Squeeze or me not knowing how to configure it.

  2. Right click Jupiter > Screen Resolutions > 1024x768.

    That will execute xrandr --output LVDS1 --mode 1024x600 --scale 1.00x1.28

    If you have an 800x480 netbook and select 800x600 in Jupiter it will execute:

    xrandr --output LVDS1 --mode 800x600 --scale 1.00x1.25

  3. Does it apply to desktops as well?

  4. How to set --panning through Jupiter? For example:
    xrandr --output LVDS1 --mode 1024x600 --scale 1.00x1.28 --panning 1024x768

  5. Had this working on t101mt under Bodhi 1.4. Executed command,then moved cursor to bottom of window and held right click to pull to bottom of screen. Under Bodhi 2.1 I do same, but cursor stops moving (and pulling) about an inch above screen bottom. I can hit the full screen button and the window will expand to the bottom of the screen, but cursor still stop about an inch above the bottom of the screen. I could access the whole screen with cursor under 1.4. Did something change?

    1. There is an Xorg bug in Ubuntu 12.04 that prevents this from working any longer. We are working on patching it ourselves in Bodhi, but haven't been successful thus far.

  6. There's a way to work around the bug: Create a new resolution and assign it to the (unused) VGA port. Then have xrandr display to the VGA resolution and scale it to the LCD.

    I wrote a script to do this:

    There's a zenity GUI and it can also be run from the command line (which also means you can set up launchers to it).