LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to override xrandr minimum screen size [SOLVED] (https://www.linuxquestions.org/questions/linux-software-2/how-to-override-xrandr-minimum-screen-size-%5Bsolved%5D-4175599058/)

inafking 02-05-2017 04:06 PM

How to override xrandr minimum screen size [SOLVED]
 
Hi, I've been fiddling with xorg.conf to modify the minimum resolution that can be set with my video card. I'm currently using a Radeon HD 5450 and this is what is shown when i type xrandr:
xrandr output
This is my current /etc/X11/xorg.conf:
xorg.conf
And this is my Xorg.0.log:
Xorg.0.log

xrandr currently reports a minimum resolution of 320x200. I don't know if this is get from the EDID data. I've tried to add options to xorg.conf to ignore the EDID but to no avail.

I've reached the end of the rope. Is this hard-coded in the radeon driver? Or is there a way to "cheat" the radeon driver to use a shorter minimum resolution?

I hope you can help me with this.
Help would be greatly appreciated!
Greets!

EDIT: Solution: Don't bother using xrandr to switch modes. Use another methods instead (like switching resolutions with the display configuration tool of the window manager or switching res with and SDL built app). xrandr lists all the modes as available but can't switch to some of them. I've tested using 15Khz modes with a Radeon HD 4830. Probably works for the Radeon HD 2xxx-7xxx range (and not so new 7xxx, at least from the first half of 2012). Thanks for all your support!

AwesomeMachine 02-07-2017 07:23 PM

I've used randr fairly extensively, and if you use cvt to create a "mode line" to feed it, you should be able to get pretty much what you want. That doesn't guarantee it will work with the given display though.

In order to prevent losing video, which could be a disaster, programs usually follow the EDID. You can actually create your own EDID file, and tell X to ignore the display device EDID, and use the file instead.

inafking 02-08-2017 07:57 AM

Quote:

Originally Posted by AwesomeMachine (Post 5666844)
I've used randr fairly extensively, and if you use cvt to create a "mode line" to feed it, you should be able to get pretty much what you want. That doesn't guarantee it will work with the given display though.

In order to prevent losing video, which could be a disaster, programs usually follow the EDID. You can actually create your own EDID file, and tell X to ignore the display device EDID, and use the file instead.

Hi, thanks. I read about using cvt but it seems it only adds the highest mode the screen could do, not the lowest.

Also, I don't know which option to use in xorg.conf to force it use a custom EDID. Is it named something like this? (in the "Device" section):
Code:

  Option        "CustomEDID" "DVI-0:/etc/X11/edid.bin"
  Option        "IgnoreEDID" "false"
  Option        "UseEDID" "true"

I saw those options but the example was using the nvidia driver. Do those options belong to X itself? Or are they nvidia propietary options? Remember I'm using the open source radeon driver

Also, I can't remember exactly but those options where ignored by my driver. I've read on another site that those options (EDID configuration) are for UMS and the support for that is already down. Anyone knows if those options are still available in KMS?

I hope you can help me with this.
Thanks in advance!
Greets!

AwesomeMachine 02-08-2017 08:18 PM

You give cvt a resolution and refresh rate and it generates a mode line.
Code:

bob@bob:~$ cvt 240 100 60
# 240x100 52.38 Hz (CVT) hsync: 6.08 kHz; pclk: 1.75 MHz
Modeline "240x100_60.00"    1.75  240 248 264 288  100 103 113 116 -hsync +vsync

Proprietary driver options usually are not listed in tutorials unless the tutorial is for that driver. And, proprietary options always go in a "device" section.

Here's a good link for fake edid: http://kodi.wiki/view/Creating_and_u..._via_xorg.conf

DJ Shaji 02-10-2017 01:00 PM

Just curious: Why do you want to go lower than 320x240?

inafking 02-11-2017 08:17 AM

Quote:

Originally Posted by DJ Shaji (Post 5668457)
Just curious: Why do you want to go lower than 320x240?

To output 15Khz modes that arcade games use. For instance, Wonder boy uses a 256x224 15Khz hfreq, 60Hz vfreq resolution. Lady bug uses a 192x240 one.

Mainly to build an arcade cabinet with radeon cards which should be better than old nvidia cards.

EDIT: I've tried doing the EDID generation steps but xorg doesn't even honour the options to use custom EDIDs (extracted from Xorg.0.log)
Code:

[  3601.012] (WW) RADEON(0): Option "ConnectedMonitor" is not used
[  3601.012] (WW) RADEON(0): Option "CustomEDID" is not used
[  3601.012] (WW) RADEON(0): Option "IgnoreEDID" is not used
[  3601.012] (WW) RADEON(0): Option "UseEDID" is not used


ondoho 02-11-2017 02:43 PM

Quote:

Originally Posted by inafking (Post 5668821)
To output 15Khz modes that arcade games use. For instance, Wonder boy uses a 256x224 15Khz hfreq, 60Hz vfreq resolution. Lady bug uses a 192x240 one.

Mainly to build an arcade cabinet with radeon cards which should be better than old nvidia cards.

erm.
wouldn't one use an emulator for that?

inafking 02-11-2017 03:53 PM

Quote:

Originally Posted by ondoho (Post 5669023)
erm.
wouldn't one use an emulator for that?

The purpose to use 15Khz modelines is to output them on fullscreen with the native mode on a CRT TV or Arcade cabinet. The results are anything comparable to emulator artifacts. We're talking of native hardware scanlines on a CRT. The image is just like you remember from original consoles or arcade cabinets.

I guess one has to be in the mame cabinet scene to understand this.

Still the opensource radeon driver refuses to use the EDID configuration options or found any way to override that 320x200 minimum screen size that xrandr reports. I cannot think of anything related which stops the video card from outputting resolutions less than 320x200. (The parameters that are shown in the error even match the minimum resolution width, that is, 320 pixels, but are shown in hex: 0x200)

In windows 10 with Calamity Drivers I can output the same modelines I've on my xorg.conf file on my CRT TV flawlessly. Perhaps it HAS to do with cheating the OS that we're using a certain kind of monitor (EDID) since those drivers come with an EDID replacing feature (which doesn't work in Ubuntu 16.04 nor opensource radeon drivers)

inafking 02-12-2017 11:53 AM

Finally solved it!
 
Neverming, I've figured out that xrandr does a very bad job at handling resolution changes. I've tried changing resolutions with a game with a low resolution mode in sdlmame and it truly sets the mode to that resolution (scanlines, yay!). I also tested that if you're able to change the resolution in the screen configuration app it works too.

I've tested this with an Radeon HD 4830. Perhaps it works for other cards in the HD 2xxx-7xxx range, safer being between 2xxx and 6xxx. It didn't work on Radeon cards XNNNN (X1550, X1650, and so on). Modelines lower than 320x200 it outputs an Hfreq of about 100KHz and Vfreq of 15Hz (pretty weird) despite the mode being listed by xrandr.

Well, that's about it. I've finally found a set of cards that can do 15Khz with all the modelines I want either in Ubuntu 16.04 and Windows 10. The Radeon HD 2xxx and HD7xxx (not so new 7xxx cards, maybe ones before the first half of 2012).

Thanks for all of your patience guys.

Greets and hugs!


All times are GMT -5. The time now is 08:28 AM.