Struggling to get 21:9 aspect ratio on an RPi
Pip Ahrens (8995) 18 posts |
Hi, I’ve just started playing around with RISC OS (on a Pi4) but I’m having a bunch of problems in trying to get it to properly recognise my monitor’s resolution. I normally pride myself in my google-fu and spending hours trying to find the answer rather than coming running to ask what could be a stupid question but I’m going around in circles at this stage. The monitor I have is a Samsung ultrawide 3440 × 1440 60hz (on HDMI). It works perfectly well when using a different OS on the same RPi4 but I just can’t seem to make it work here. I started with just the default config.txt file (with the addition of a
This works to a degree, the problem is that when I get into RISC OS and try to change my resolution it just doesn’t have the correct resolution of the monitor. If I change resolution to “Native” I get a lovely change to: Obviously I’d quite like to 1) use the extra pixels I’ve paid for and 2) not have everything a little bit stretched horizontally After some furious googling and forum searches I came across the following post: I made the changes to the config.txt file (I should point out I wasn’t making this change in RISC OS, I was changing it on the SD card in a Linux box) After first bootup it picks “Auto” and again defaults to If I select 2560 × 1440 I get more of what I’m expecting in terms of UI scale but things are still stretched somewhat uncomfortably – I’m now at approx 17:12.5 My next step was trying to follow the rest of the post by adding a new screen mode MDF file. I tried looking around online to see if it was a problem with the “0s” in the _timings lines like As a last ditch effort I tried downloading AnyMode (http://www.pi-star.co.uk/anymode/). Being new to RISC OS I’m not 100% I’m using it correctly, I plonked the module file into the Thank you if you have sat through my ramblings so far, I’m at a point where I just don’t know where to turn next or what to try. If anyone has any idea at all I would be most grateful. EDIT: Of course I make a stupid typo in the title, why wouldn’t I. I suppose it is kind of accurate in that my resolutions available to me seem to be somewhat rationed. |
Andrew Rawnsley (492) 1445 posts |
I’ll caveat this post a bit by saying that I appreciate that suggesting to a new user to buy software when they’re dipping their toe in is bad form. So, please accept my advance apologies for this post. I’m sure there will be people who pop up to explain things more fully, for free. However, our (R-Comp) PiTools program (on !Store) includes a number of things that should help with this specific issue. There’s suitable MDFs, extra software for dealing with wide modes, and Pi config/firmware files, as well as easy switching between the Pi’s display mode styles. We actually demo RISC OS running on 3440×1440 at various shows, so getting machines to drive that resolution has become a bit of a “thing”, although different models can have different quirks. In the interest of helping a someone new to the platform, if you’d like a “try before you buy” type thing, please drop me an email and we’ll sort that out for you. |
David Pitt (3386) 1248 posts |
I have in the past used Pi’s with a 2560×1440 monitor. I disabled EDID as for reasons best known to itself the monitor attempted to default to 1920×1080. Note that the Pi has a GPU between RISC OS itself and the Pi’s video output.Chris Hall’s ScrHelp, available from the PlingStore, shows this clearly. This was added to # start 2560 x 1440 hdmi_cvt=2560 1440 30 5 hdmi_group=2 hdmi_mode=87 hdmi_ignore_edid 0xa5000080 max_framebuffer_width=2560 max_framebuffer_height=1440 hdmi_pixel_freq_limit=400000000 #end A 30Hz mode was specified which matched a 60Hz interlaced MDF. It may be that this step is only required here to avoid the monitor’s EDID default 1920×1080, but it does have the benefit that if the Pi is started headless then the right mode is already being output if a monitor is later connected. The MDF was created with the Provided are two possible MDFs, one at full bandwidth and the other interlaced and with reduced blanking. *cvt 3440 1440 60 # 3440 x 1440 (60.00Hz) 32bit (CVT) startmode mode_name: 3440 x 1440 x_res:3440 y_res:1440 pixel_rate:419500 h_timings:368,624,0,3440,0,256 v_timings:10,40,0,1440,0,3 sync_pol:3 endmode **cvt 3440 1440 60 -i -r # 3440 x 1440 (60.00Hz) INT RBlank 32bit (CVT) startmode mode_name: 3440 x 1440 x_res:3440 y_res:1440 pixel_rate:160000 h_timings:32,80,0,3440,0,48 v_timings:10,8,0,1440,0,3 sync_pol:3 endmode * I have never tried an MDF with zero’s for the ‘irrelevant’ bits, another job for later. Simply put there are two hurdles to be got under, the maximum the monitor can handle and the maximum the Pi can output. My 27" 2560×1440 AOC does tell EDID that its default resolution is 1920×1080, ‘optimal’ the spec says. The spec also says it can do 2560×1440 at 60Hz but I had my doubts. A Samsung ultrawide might put more emphasis on the ‘ultra’. HTH. |
David J. Ruck (33) 1636 posts |
The reason for this is a lot of older machines can’t generate a picture wider than 2048 pixels, so it says it’s default is 1920×1080 so those machines don’t get a blank screen. If your machine can do 2560×1440, you stare at the large fuzzy text for a few seconds, and then select the correct resolution. |
David Pitt (3386) 1248 posts |
Titanium! Some of my procedure outlined above is to do with getting around that and forcing the full resolution.
The Samsung might be doing similar. |
David Pitt (3386) 1248 posts |
I have just been around the loop again. This time with an RPi400. The monitor is the 27" AOC, of quite some vintage. EDID by default does clamp the HDMI output to 1920×1080 and having done that RISC OS cannot be set to anything larger. With a monitortype EDID an MDF is derived and that does have an entry for 2560×1440 at 60Hz. To get to the full resolution EDID must be disabled and the full mode forced in |
andym (447) 473 posts |
The other bit that might be necessary is to set the Eigen value. So, once you’ve set the mode using Configure→Screen, you may need to edit the file that loads in, which is in !Boot.Choices.Boot.PreDesk.Configure – open the file called Monitor, by holding shift and double clicking it. You’ll need to edit the line starting with WimpMode to read something like:
You’ll probably only need to add the EX1 EY1 bits, as the other bits are set by the system when you tell it about the monitor. EX1 and EY1 simply tells it that it isn’t an old style mode with rectangular pixels – this is why your screen may look weird when you initially set the mode using Configure→Screen. |
Pip Ahrens (8995) 18 posts |
Thank you so much for the responses already, I’ll reply to them in one rather than spamming with posts: Andrew R – Thank you very much for the offer and info, I don’t think there is anything to apologise for. In this case I don’t think I will be taking you up on it just yet as I’m not currently using RISC OS to serve a particular goal, I’m currently using it out of pure interest and the reason I have tried to solve it so far is because I would like to be able to understand it better – even the various things I’ve done so far have helped me understand things far better like how the filesystem works, how to properly navigate the menus etc. so I’m not so much after a packaged cure so much as I wish to properly understand what the issue is and why it is happening. David S -
I saw something referencing how to dump this information somewhere along the line but at the time I assumed it was some kind of API call or other programming function. I hadn’t yet discovered the console which, since your post, I’ve found out 1) exists, 2) how to access it and 3) how to use
David P – That is quite a bit of info that I’m going to have to digest. I did actually download ScrHelp.
If I run in the weirdly stretched 3440 × 1440 mode I get:
I’m afraid I’m a bit lost when it comes to the rest, the Pi itself is fine with running at 3440 × 1440 50Hz (I swapped the SD cards out and checked on my Debian w/ LXDE install) which is something I never had to actually configure – it was able to detect and set that resolution automatically (one correction from an earlier comment I made – the monitor supports 60 and 75hz at that resolution but it seems only on DisplayPort, the HDMI port is limited to 50Hz). Andy M – I had a go with a few things based on what you said here. First of all I just threw the extra bits on there but because I assume the
but on reboot it just went straight back to that default resolution and the changes to the file were again lost. Thank you all for your input, I’m learning a lot and, despite the stumbling blocks, I’m really quite enjoying the whole experience so far. |
andym (447) 473 posts |
I think you said you had AnyMode in !Boot.Choices.Boot.PreDesk? I think it might be worth changing your CMDLINE/TXT file inside the Loader folder by adding:
I think that stops the whole EDID thing getting in the way (but I could be wrong). Note though, that CMDLINE/TXT is, as it’s name suggests, a single line. So just go to the end of the current text, add a space, and then add the command before saving. I’ve certainly set up a Pi 4 in the past for a Dell 3440×1440 monitor and the settings survived to work after each reboot. This page might help: http://riscosblog.huber-net.de/2018/03/raspberry-pi-3-b-4k-und-risc-os/ but you (or Google!) may need to translate it first! |
Pip Ahrens (8995) 18 posts |
Andy M -
I did have AnyMode but I removed it before trying out most of these suggestions in case it was getting in the way of something
So I did have So Those changes by themselves didn’t solve the problem, it changed some of the behaviour (I was no longer getting a stretched resolution when set at a 16:9 ratio, it was now being centred in the middle of the monitor. I still had the issue of RISC OS putting the Monitor Type to “Auto” on reboot no matter what I picked. However, I also had a chance to try David P’s additional advice, namely adding in the I rebooted and this time it kept my resolution choice (from the MDF I had dumped and saved). Thank you everyone for all the help you have given here, I don’t think I would have ever worked out that exact combination of things. |