WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: RPi0, how to setup rotation, resolution, DPI.  (Read 1146 times)

Offline Anichang

  • Newbie
  • *
  • Posts: 3
RPi0, how to setup rotation, resolution, DPI.
« on: October 06, 2023, 08:44:29 PM »
Hi,

my RPi0 is hooked to an LG Ultrawide (old 2560x1080 display) placed vertical and split into two with 2 different sources, one of which being the RPi0 mini-hdmi output.

Xrandr was not working so I used the display_rotate=3 in config.txt and that solved the rotation problem.

Now the problem I have is related to resolution&dpi: in theory half of 2560x1080 is 1280x1080 (and that's what both windows and other linux distributions detect and setup automagically). So I set 1280 and 1080 in config.txt but the picture doesn't fill up the entire display; the picture isn't broken, it just doesn't fill up the (half) panel. Disabled overscan, no changes. If I write 1920 and 1080 in config.txt, I get the (half) panel filled to the frame instead. But the picture is too small (text barely readable).

So I tried to fiddle with DPIs but nothing out of google seems to affect my DPIs: dtoverlays (tried: dpi18, dpi24 and vc4-kms-dpi-generic), .Xdefaults (Xft.dpi), .xsession (Xorg --dpi), ... . No changes, it's all too small for my old, rotten, eyes.

I suppose it has to do with the obnoxious broadcom architecture (VC4 controls the board and the ARMv6 core uses a postoffice to get what it needs); but I've no idea how to fix this.

Any tip?

Thanks

A.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1085
Re: RPi0, how to setup rotation, resolution, DPI.
« Reply #1 on: October 07, 2023, 10:10:15 AM »
Are you trying to use Xorg, or just a console.

A pizero is pretty underpowered for an X display.

Offline Anichang

  • Newbie
  • *
  • Posts: 3
Re: RPi0, how to setup rotation, resolution, DPI.
« Reply #2 on: October 09, 2023, 05:57:54 AM »
I need both. Probably at the end of the day I'll have some custom SDL app to make Zero's life easier, but currently I'm using X.

In any case, it doesn't make much difference... IMHO. Whatever is written in config.txt is parsed and applied by the VC4 even before the ARM core is turned on and the kernel is loaded into memory.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1085
Re: RPi0, how to setup rotation, resolution, DPI.
« Reply #3 on: October 10, 2023, 04:13:08 PM »
Not really.   Some of the stuff in the config.txt is applied only to the firmware.   The vc4 driver overrides firmware settings.

Offline Anichang

  • Newbie
  • *
  • Posts: 3
Re: RPi0, how to setup rotation, resolution, DPI.
« Reply #4 on: October 12, 2023, 05:12:35 PM »
Not really.   Some of the stuff in the config.txt is applied only to the firmware.   The vc4 driver overrides firmware settings.

So why all my attempts using kernel and X settings are simply ignored? I even tried to use the kms overlays as I found on some threads the kms overlay acess the hw directly instead of fkms using the mailbox to request changes.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 674
Re: RPi0, how to setup rotation, resolution, DPI.
« Reply #5 on: October 12, 2023, 10:10:36 PM »
When booting linux you can see what the rpi bios append to the cmdline args to the kernel and the modules just cat the cmdline from the kernel like this.

Code: [Select]
cat /proc/cmdline
Here some steps the rpi takes when booting.
Code: [Select]
Stage 1 boot is in the on-chip ROM. Loads Stage 2 in the L2 cache
Stage 2 is bootcode.bin. Enables SDRAM and loads Stage 3
Stage 3 is loader.bin. It knows about the .elf format and loads start.elf
start.elf loads kernel.img. It then also reads config.txt, cmdline.txt and bcm2835.dtb If the dtb file exists, it is loaded at 0×100 & kernel @ 0×8000 If disable_commandline_tags is set it loads kernel @ 0×0 Otherwise it loads kernel @ 0×8000 and put ATAGS at 0×100
kernel.img is then run on the ARM.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14564
Re: RPi0, how to setup rotation, resolution, DPI.
« Reply #6 on: October 13, 2023, 02:53:25 AM »
Xorg and Xorg-3d work for me on an RPi0 - albeit I'm only changing the resolution and not trying rotation or split screen.