Getting xrandr to report the correct resolution

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Moderators General, Prelates

User avatar
zed0
Posts: 179
Joined: Sun Dec 17, 2006 11:00 pm UTC

Getting xrandr to report the correct resolution

Postby zed0 » Wed Mar 07, 2012 3:30 pm UTC

I've been trying to get my media PC to display on my TV (Toshiba 32WLT66) and having a lot of problems with it:
It is a widescreen TV but when you set sidescreen resolutions, including the monitor's native resolution (1366x768), it has considerable overflow on all sides of the screen meaning it's impossible to use things like menu bars.
The only resolution it behaves at is 1024x768 which is of course 4:3 rather than widescreen meaning there are black bars down each side.

I can sort of fudge it to display at the right resolution by doing:

Code: Select all

xrandr --newmode "1360x768_60.00"  84.72  1360 1424 1568 1776  768 769 772 795  -HSync +Vsync
xrandr --addmode VGA1 1360x768_60.00
xrandr --output VGA1 --mode 1360x768_60.00 --transform 1,0,-100,0,1,-18,0,0,1 --fb 1225x720

This does work for a bit for the window manager (XFCE) but after a while it reverts to thinking that it should be using the full 1360x768 which moves parts off the screen.
Applications like mplayer and xbmc just fullscreen straight to the larger, overflowing, resolution.

Does anyone know how of any fixes for this? Either making other applications use the frame buffer resolution or a better way to set the resolution.

Ubik
Posts: 1016
Joined: Thu Oct 18, 2007 3:43 pm UTC

Re: Getting xrandr to report the correct resolution

Postby Ubik » Wed Mar 07, 2012 3:39 pm UTC

Normally televisions cut away the edges of the image, but that naturally isn't desirable when using the television as monitor. The television might have a 1:1 pixel mapping option (the name can be anything, depending on manufacturer, and it can be hidden pretty well) which makes the image work as it should, without overscan. It's odd that it reverts to another resolution by itself, but in any case, I think looking into the settings of the television might be a good idea.

Another thing is the connection that is used. With VGA cable things can work differently than with digital cable (that is, HDMI). Actually, I just searched the TV model (+ "disable overscan") and this page came up: pixelmapping It says there that 1:1 mode works for HDMI but not for VGA. Maybe the manual of the television has more info?

User avatar
Readout
Posts: 54
Joined: Wed Jun 04, 2008 6:01 pm UTC

Re: Getting xrandr to report the correct resolution

Postby Readout » Thu Mar 08, 2012 12:18 am UTC

Possibly a silly question, but what happens when you run a simple "xrandir, do this" command? For example,

Code: Select all

xrandr --output VGA1 --mode 1360x768 --pos 0x0


--edit--
Alternatively, after a quick google, it seems like some graphics cards get upset with TVs which try and scale the image themselves. Have you taken a look through your actual monitor's settings rather than the picture that your computer is pumping out?

--edit 2--
This thread seems to indicate that your TV won't support 1360x768 when connected via VGA. Ideal solution would be to try and swap to HDMI - do you have an HDMI or a DVI out on your graphics card?
Anyone who can identify the language these people are really speaking wins three internet cookies

User avatar
zed0
Posts: 179
Joined: Sun Dec 17, 2006 11:00 pm UTC

Re: Getting xrandr to report the correct resolution

Postby zed0 » Fri May 18, 2012 1:32 am UTC

I finally fixed this today when I looked at the howto page realised how a modeline actually worked.
Apparently you can take any modeline such as:
xrandr --newmode "1360x768_60.00" 84.72 1360 1424 1568 1776 768 769 772 795 -HSync +Vsync
And replace the resolution with any smaller resolution and it will still work, just in a small area of the screen:
xrandr --newmode "1360x768_60.00" 84.72 1224 1424 1568 1776 720 769 772 795 -HSync +Vsync
Then to move the area left and right on the screen adjust the two numbers synchronously (add or subtract the same amount from each) just after the X Dimension:
xrandr --newmode "1360x768_60.00" 84.72 1224 1324 1468 1776 720 769 772 795 -HSync +Vsync
To move the area up and down do similar with the two numbers just after the Y Dimension:
xrandr --newmode "1360x768_60.00" 84.72 1224 1324 1468 1776 720 751 754 795 -HSync +Vsync
And you're done. :D
The above example takes a 1224x720 section of the screen and moves it 100 pixels right and 18 pixels down.
Adjust as necessary. You can now use the modeline in your xorg.conf or set up xrandr to run automatically.

(just thought I'd post a solution in case anyone finds my post while searching for the same problem)


Return to “The Help Desk”

Who is online

Users browsing this forum: No registered users and 4 guests