Resolution has a wrong aspect ratio (16:9 squashed into 4:3)
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Resolution has a wrong aspect ratio (16:9 squashed into 4:3)
I'm trying to set up a custom resolution (1024x576) on the old IGP Unichrome (Openchrome X.Org driver), running on Debian Squeeze.
I add the gtf or cvt Modeline to the xorg.conf, but when I set it, my screen displays it in a 4:3 aspect ratio and with very poor definition, it looks squashed. I can stretch it by changing the settings in the monitor itself, but it's the same low quality image, only that now it's stretched. It looks horrible. The monitor detects it as 720x576 60Hz, so it's really 5:4.
Interestingly, I took a screen capture and when I opened it later (on a normal resolution) it looks fine.
I tried to do this on a few other computers to see what would happen. One (I think it was nvidia) also showed the image with a bad aspect ratio but the third one (Intel IGP) showed the correct aspect ratio after adding the option "ModeValidation" "AllowNonEdidModes" to the xorg.conf.
So, what's going on here?
Is this a limitation of the driver or maybe there's something I'm not configuring correctly? There's a lot I ignore about what goes down under the hood when you change a resolution. I would appreciate any help to fix this or just to understand what's going on.
By the way, I'm using an LCD display with a VGA standard cable on the Unichrome. The Openchrome driver is capable of displaying 1280x720 or 1920x1080 resolutions perfectly, albeit not as fast as 1024x576 would be.
You have some video mode config file? Have you tried adding
A "PreferredMode" entry?
A "Virtual" entry
Both?
See man xorg.conf as they are only valid in some sections of your video config.
I have a generic xorg.conf (generated with X -configure), I didn't add anything but the line for Modeline generated by cvt for 1024 576 60, in order to get the desired mode as an option.
My default resolution (1280x720) is set in ~/.config/monitors.xml
PreferredMode sets a default mode, but that's not what I'm looking for. What would it change? I would still get the same squashed 5:4 resolution.
And if I can't get the video card to display 1024x576 properly in the first place, why would I want to set up a Virtual desktop? I'm sorry, I can't understand. What's your point?
Quote:
Originally Posted by fatmac
Basically, your video graphics card & video driver will determine what resolutions that you can use....
I've been reading the docs, this one was very good https://www.freedesktop.org/wiki/Openchrome/
From there I learned that beyond 1024x1024 I get no hw acceleration so that's one of the reasons I want to stay at or below 1024.
As you say, I suspect this has to do with particular drivers, because some allow you to set a particular mode, and some don't. But I'm not sure if that could be tweaked some way, or the underlying logic behind why I get a 720x576 (5:4) instead of 1024x576 (16:9) when I use the timings and other data suggested by either cvt or gtf. Why this happens is what I don't understand. I also just tried 1008x567 and the image looks a little less squashed than 1024x576 but still looks really bad, pillarboxed and saquashed. The same happened for other 10 resolutions I just tried (-16/-9) down to 864x486.
What's exactly preventing me to achieve a correct aspect ratio for these custom modes? Are cvt numbers wrong? Should I add some other configuration? Is it a dead end?
My default resolution (1280x720) is set in ~/.config/monitors.xml
PreferredMode sets a default mode, but that's not what I'm looking for. What would it change? I would still get the same squashed 5:4 resolution.
And if I can't get the video card to display 1024x576 properly in the first place, why would I want to set up a Virtual desktop? I'm sorry, I can't understand. What's your point?
You want to set up 1024x576. I'm giving you settings that may produce that, and now you're asking me what@s my point? I've no point. You are not getting the results you want. I tried to help. Some old vesa cards only wanted 4:3 modes, others accepted more. Are you aware of that card (or driver) ever doing that mode?
You want to set up 1024x576. I'm giving you settings that may produce that, and now you're asking me what@s my point? I've no point. You are not getting the results you want. I tried to help. Some old vesa cards only wanted 4:3 modes, others accepted more. Are you aware of that card (or driver) ever doing that mode?
I'm sorry, as I previously stated I don't understand how PreferredMode and Virtual desktop could help. I read through the man and still can't figure it out. My question is, what's the use of those options in this context, how could they help me achieve a 1024x576 (fullscreen) resolution?
The smallest 16:9 resolution that works correctly is 1280x720. The next smaller resolution is 1024x768 but that's already 4:3.
I have a generic xorg.conf (generated with X -configure), I didn't add anything but the line for Modeline generated by cvt for 1024 576 60, in order to get the desired mode as an option.
X -configure hasn't fixed anything for me in over 15 years, before Xorg automagic became the default configuration, displacing /etc/X11/xorg.conf. With automagic implementation, manual tweaks have been made easier via drop-ins in /etc/X11/xorg.conf.d/. Also since that time, manually configured modelines via cvt or gpt have never helped here. Instead, drop-in files in /etc/X11/xorg.conf.d/ with PreferredMode, VertRefresh and HorizSync have normally been all that is required to do the job, by overriding or providing the specifications normally expected to be provided by EDID, and letting Xorg do the modeline calculation itself, just as it normally does by default for common modes. 1024x576 is definitely uncommon. I've never seen it before this thread. You might consider trying more common modes 1024x600 and/or 1024x640, even though physically wrong for a 16/9 display, they're better than 4/3.
[quotee]My default resolution (1280x720) is set in ~/.config/monitors.xml[/QUOTE]That's a local setting, neither global nor default. Thus the file ~/.config/monitors.xml is an option.
Instead, drop-in files in /etc/X11/xorg.conf.d/ with PreferredMode, VertRefresh and HorizSync have normally been all that is required to do the job, by overriding or providing the specifications normally expected to be provided by EDID, and letting Xorg do the modeline calculation itself, just as it normally does by default for common modes
Would you please provide an example of such a file with those specifications?
I don't think that it's monitor dependent. The output signal is 720x576@60Hz (when it should be 1024x576) and that's the same for any monitor.
Quote:
Originally Posted by mrmazda
Quote:
My default resolution (1280x720) is set in ~/.config/monitors.xml
That's a local setting, neither global nor default. Thus the file ~/.config/monitors.xml is an option.
My objective is not to set 1024x576 as the global or default resolution, just be able to set it in a specific situation and later switch back to 1280x720. Should it be the default or global resolution in order to work?
Your xrandr disturbs me because there's a mix of aspect ratios - 16:9, 5:4, & 4:3. Your xorg.conf is pretty unconfigured where it's going wrong. You might try my suggestions from post #2. It will hardly disimprove the situation.
Why set 1280x720 in ~/.config/monitors.xml when you want 1024x576?
VendorName and ModelName are optional (not used by X AFAICT, not necessary).
Quote:
My objective is not to set 1024x576 as the global or default resolution, just be able to set it in a specific situation and later switch back to 1280x720. Should it be the default or global resolution in order to work?
Global is the only method I use for configuring X, but more often the global method I use is a startup script containing xrandr command(s). Missing desired mode problems are historically an exception to this xrandr preference, historically I say because I haven't had such a problem since getting rid of the last of my CRTs many moons ago. I'm not familiar with any method of local configuring that isn't either xrandr-based, or DE-based, and DE-based I rarely attempt to use, so have no basis on which to advise, especially with your novel 1024x576 mode.
VendorName and ModelName are optional (not used by X AFAICT, not necessary).
Global is the only method I use for configuring X, but more often the global method I use is a startup script containing xrandr command(s). Missing desired mode problems are historically an exception to this xrandr preference, historically I say because I haven't had such a problem since getting rid of the last of my CRTs many moons ago. I'm not familiar with any method of local configuring that isn't either xrandr-based, or DE-based, and DE-based I rarely attempt to use, so have no basis on which to advise, especially with your novel 1024x576 mode.
Thanks, I tried creating the 50-monitor.conf and it didn't make any difference. In fact, now I don't even get 1024x576 in my list of possible resolutions, even if I add the Modeline to the file. It's practical insofar as that you don't have to use a full xorg.conf, because it's modular and I'll probably use this way of configuring XOrg in other machines, but it doesn't help in this case.
My way of changing between resolutions is using xrandr, and Squeeze has a very old version that doesn't even allow to use "scale". That could have been an option.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.