Rotate HDMI-display and change resolution

Started by msx_23, June 17, 2021, 03:04:00 PM

Previous topic - Next topic

msx_23

Hello, I am using a Board with A20 chip and HDMI output, connected to a normal HDMI monitor. It works out of the box as expected, but now I want to change the settings. Im using standard OLinuXino image

In the graphical user interface settings I can´t change the resolution (1920x1080 is preselected) or the rotation (no selection available). Alsoo I could not find an option to do that in the terminal.

Xrandr gave an error "bad match":
xrandr --screen 0 -o inverted


And adding the following to /boot/uEnv.txt doesnt change anything:
optargs=video=HDMI-A-1:800x600@60e
Strangely after changing the resolution in uEnv.txt (which had no effect on its own) the xrandr operation works as expected and I can rotate the screen as well as change the resolution in the GUI successfully...

Can you please tell me what is the "normal way" to change screen resolution and rotation for HDMI output?

msx_23

I have to correct my previous post, the problem is not solved by the described procedure.

It´s the case that I can change the settings after the first boot of a newly installed SD-card with debian buster, but after the reboot I can´t change anything and xrandr just gives:

olimex@a20-olinuxino:~$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
   1920x1080      0.00*

On the first boot there are serveral options to choose from...

Any advice how I can change the settings permanently or change it after every boot? (I want to set a specific resolution and rotation)

att2

Attach a monitor with 1920x1080 resolution, change resolution, attach normal monitor....

msx_23

#3
Quote from: att2 on July 07, 2021, 09:50:55 PMAttach a monitor with 1920x1080 resolution, change resolution, attach normal monitor....


I dont know if your answer is meant seriously but there are two problems with your answer:

1. It is not very practical and not always possible to switch monitors after every boot
2. It is not really a solution at all, because I can´t change the resolution after the second boot. I always have to flash a new image to SD card before i can change the resolution again in Linux...

Nevertheless I was now able to change the resolution with the following command in u-boot permanently:
setenv video-mode sunxi:1280x720-24@60,monitor=dvi,hpd=0,edid=0
saveenv
reset

source:
https://linux-sunxi.org/Display

It seems to be necessary for linux that u-boot handles hdmi initialization, is that correct or is there another way to change resolution in linux directly (on the first boot its also possible, so its definetely a software problem)

And I still don´tknow how to rotate the screen permanently. Writing to /sys/class/graphics/fbcon/rotate or .../rotate_all has no effect ...

Any other suggestions?

Edit: I think I´ve got it now even on consecutive boots: I had to disable the auto display settings in olinuxino-display script