LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-06-2023, 07:57 AM   #1
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 113

Rep: Reputation: 16
Question 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.

Last edited by tauro_kpo; 11-06-2023 at 08:00 AM.
 
Old 11-06-2023, 10:11 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,511

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
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.
 
Old 11-06-2023, 10:19 AM   #3
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,539

Rep: Reputation: Disabled
Basically, your video graphics card & video driver will determine what resolutions that you can use....

This might(?) help - https://manpages.debian.org/testing/...rome.4.en.html
 
Old 11-06-2023, 11:05 AM   #4
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 113

Original Poster
Rep: Reputation: 16
Arrow

Thanks for the suggestions.

Quote:
Originally Posted by business_kid View Post
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 View Post
Basically, your video graphics card & video driver will determine what resolutions that you can use....

This might(?) help - https://manpages.debian.org/testing/...rome.4.en.html
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?

Last edited by tauro_kpo; 11-06-2023 at 11:17 AM.
 
Old 11-06-2023, 12:12 PM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,511

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Quote:
Originally Posted by tauro_kpo View Post
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?
 
Old 11-06-2023, 12:21 PM   #6
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 113

Original Poster
Rep: Reputation: 16
Question

Quote:
Originally Posted by business_kid View Post
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.

Last edited by tauro_kpo; 11-06-2023 at 12:25 PM.
 
Old 11-06-2023, 02:55 PM   #7
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,161
Blog Entries: 6

Rep: Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836Reputation: 1836
Quote:
The smallest 16:9 resolution that works correctly is 1280x720
What is the output of:
Code:
xrandr
 
Old 11-06-2023, 10:26 PM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,915
Blog Entries: 1

Rep: Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082
With no xorg.conf at all, what does xrandr report?
 
Old 11-07-2023, 04:10 AM   #9
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 113

Original Poster
Rep: Reputation: 16
Post

Quote:
Originally Posted by teckk View Post
What is the output of:
Code:
xrandr
Code:
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 400, current 1280 x 720, maximum 1920 x 1080
default connected 1280x720+0+0 0mm x 0mm
   1920x1080      60.0  
   1680x1050      60.0  
   1400x1050      60.0     70.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1440x900       60.0  
   1280x960       60.0  
   1360x768       60.0  
   1280x800       60.0  
   1152x864       75.0     70.0     60.0  
   1280x720       60.0* 
   1024x768       75.0     60.0     70.0  
   832x624        75.0  
   800x600        75.0     60.0     56.0     72.0  
   640x480        75.0     60.0     73.0  
   720x400        70.0
Quote:
Originally Posted by mrmazda View Post
With no xorg.conf at all, what does xrandr report?
It reports exactly the same as I'm using an autogenerated xorg.conf. The system loads the correct drivers automatically.

Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/X11/misc"
	FontPath     "/usr/share/fonts/X11/cyrillic"
	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/Type1"
	FontPath     "/usr/share/fonts/X11/100dpi"
	FontPath     "/usr/share/fonts/X11/75dpi"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
	FontPath     "built-ins"
EndSection

Section "Module"
	Load  "glx"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "dri2"
	Load  "dri"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "PrintVGARegs"       	# [<bool>]
        #Option     "PrintTVRegs"        	# [<bool>]
        #Option     "I2CScan"            	# [<bool>]
        #Option     "VBEModes"           	# [<bool>]
        #Option     "NoAccel"            	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "ExaNoComposite"     	# [<bool>]
        #Option     "ExaScratchSize"     	# <i>
        #Option     "SWCursor"           	# [<bool>]
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "RotationType"       	# [<str>]
        #Option     "Rotate"             	# [<str>]
        #Option     "VideoRAM"           	# <i>
        #Option     "ActiveDevice"       	# [<str>]
        #Option     "BusWidth"           	# [<str>]
        #Option     "Center"             	# [<bool>]
        #Option     "PanelSize"          	# [<str>]
        #Option     "ForcePanel"         	# [<bool>]
        #Option     "TVDotCrawl"         	# [<bool>]
        #Option     "TVDeflicker"        	# <i>
        #Option     "TVType"             	# [<str>]
        #Option     "TVOutput"           	# [<str>]
        #Option     "TVPort"             	# [<str>]
        #Option     "DisableVQ"          	# [<bool>]
        #Option     "DisableIRQ"         	# [<bool>]
        #Option     "EnableAGPDMA"       	# [<bool>]
        #Option     "NoAGPFor2D"         	# [<bool>]
        #Option     "NoXVDMA"            	# [<bool>]
        #Option     "VbeSaveRestore"     	# [<bool>]
        #Option     "DisableXvBWCheck"   	# [<bool>]
        #Option     "ModeSwitchMethod"   	# [<str>]
        #Option     "MaxDRIMem"          	# <i>
        #Option     "AGPMem"             	# <i>
	Identifier  "Card0"
	Driver      "openchrome"
	VendorName  "VIA Technologies, Inc."
	BoardName   "VT8623 [Apollo CLE266] integrated CastleRock graphics"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
 
Old 11-07-2023, 08:07 AM   #10
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,915
Blog Entries: 1

Rep: Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082
Quote:
Originally Posted by tauro_kpo View Post
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.
 
Old 11-07-2023, 08:34 AM   #11
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 113

Original Poster
Rep: Reputation: 16
Exclamation

Quote:
Originally Posted by mrmazda View Post
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 View Post
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?
 
Old 11-07-2023, 10:30 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,511

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
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?
 
Old 11-07-2023, 11:48 AM   #13
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,915
Blog Entries: 1

Rep: Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082
Quote:
Originally Posted by tauro_kpo View Post
Would you please provide an example of such a file with those specifications?
Code:
## file: /etc/X11/xorg.conf.d/50-monitor.conf
Section "Monitor"
    Identifier "DefaultMonitor"
	VendorName	"LG"
	ModelName	"29UM58"
	HorizSync	29-94
	VertRefresh	49-86
	Option	"PreferredMode"	"2560x1080"
EndSection
#
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.
 
Old 11-07-2023, 12:25 PM   #14
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,511

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Personally, I am not aware of changing aspect ratio being possible without xrandr.

You might be able to add blank space to bring 1024x576 up to 1280x720 by preprocessing your input.

Changing aspect ratio inside the X session is what you should google for. If you manage it, please post and instruct us all.
 
Old 11-07-2023, 10:44 PM   #15
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 113

Original Poster
Rep: Reputation: 16
Arrow

Quote:
Originally Posted by mrmazda View Post
Code:
## file: /etc/X11/xorg.conf.d/50-monitor.conf
Section "Monitor"
    Identifier "DefaultMonitor"
	VendorName	"LG"
	ModelName	"29UM58"
	HorizSync	29-94
	VertRefresh	49-86
	Option	"PreferredMode"	"2560x1080"
EndSection
#
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.
 
  


Reply

Tags
aspect ratio, custom, display, resolution, xrandr


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Squeeze newly installed, wrong aspect ratio, nvidia driver? lugoteehalt Debian 12 01-23-2011 05:47 PM
[SOLVED] VLC: aspect ratio wrong & no colour Joe Soap Linux - Newbie 1 06-24-2010 05:26 AM
How to set resolution with non 1:1 aspect ratio sangeetk Linux - Newbie 5 10-09-2009 10:26 AM
Resolution/Aspect Ratio settings epsilon72 Linux - Software 22 03-11-2007 01:35 PM
16:9 aspect ratio resolution possible? rikw Linux - Software 0 09-04-2001 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration