HDMI outputs only 1 resolution - no 1080

Hello, when I connect my device to a monitor it always outputs 720p. No 1080p. No option to change it in a settings. Tried on Ubuntu and Raspbian. Editing config.txt doesn’t make any difference. Thought? Thanks

Afaik you need to pass your resolution to linux kernel through cmdline (this wqy it works on bpi-r2)

E.g. add this to your cmdline in uboot

video=1280x1024-32

And it shoult be visible by

cat /proc/cmdline

If it was passed (if not you have to check uboots config)

Armbian autodetects screen resolution if EDID on monitor is working properly … it has to be attached at boot time.

I tried to make that change in “/boot/cmdline.txt” - no effect. Could U point me the file where change is suppose to be made? Thanks

for bananapi-r2/r64 there is a uenv.txt in BPI_BOOT/bananapi/bpi-r2/linux/

as i have no bpi-m2/p2 i don’t know how it’s done there

So I was Looking there but I don’t have uEnv file.

Ok, I made some research. Looks like in my case directory ‘used’ while booting is ‘/boot/bananapi/bpi-m2z/linux4.4/720p’. It contains ‘uEnv.txt’ file and changes made in that file make a difference in ‘cat /proc/cmdline’. Unfortunately adding ‘video=1920x1080-32’ made no difference. I am curious why a directory named ‘720p’ is being used and how it is related to my issue…

It is only a dir configured in your uboot (environment) to search for uenv.txt

You see video=… in /proc/cmdline

I see that „video…” when I „cat /proc/cmdline” but it has no effect

Try this https://www.armbian.com/bananapi-m2-zero/ and report.

You mean whole OS? Armbian?

Yes, whole OS. It has completely different software support on the hardware layer / kernel.

Thanks! It supports 1920x1080 with no modifications indeed BUT whole screen flickers :confused: when any change occurs. And there is no native support for raspi-config (probably matter of adding sources).

??? That is odd. Can you make a video? And logs with armbianmonitor -u

Raspi-config is a script for Raspbery Pi which can only alter hardware function of Raspberry Pi. If it would be that cheap like you think, it would be done years ago.

Kernel 4.4 image official only release 720p image, allwinner base code is not support edid or different resolutions in one image, and also not support modify configuration files like config.txt or uEnv.txt. There have two ways to change the resolution, but more complex.

First change the resolution with uboot command fdt, you need a uart cable and boot to uboot command line mode

BPI-IoT# fdt list /soc/boot_disp
boot_disp {
    compatible = "allwinner,boot_disp";
    device_type = "boot_disp";
    output_disp = <0x00000000>;
    output_type = <0x00000003>;
    output_mode = <0x00000005>;
};
BPI-IoT# fdt set /soc/boot_disp output_mode <0xa>
BPI-IoT# 
BPI-IoT# fdt list /soc/boot_disp
boot_disp {
    compatible = "allwinner,boot_disp";
    device_type = "boot_disp";
    output_disp = <0x00000000>;
    output_type = <0x00000003>;
    output_mode = <0x0000000a>;
};
BPI-IoT# fdt list /soc/disp     
disp@01000000 {
    boot_fb0 = "5f000000,500,2d0,20,1400,186,b9,37a,217";
    disp_config0 = <0x00000004 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000>;
    init_disp = <0x020b0000>;
    tv_vdid = <0x32766564>;
    compatible = "allwinner,sunxi-disp";
    reg = <0x00000000 0x01000000 0x00000000 0x00300000 0x00000000 0x01c0c000 0x00000000 0x00000ff;
    interrupts = <0x00000000 0x00000056 0x00000104 0x00000000 0x00000057 0x00000104>;
    clocks = <0x00000009 0x00000065 0x00000066>;
    boot_disp = <0x00000405>;
    fb_base = <0x00000000>;
    status = "okay";
    device_type = "disp";
    disp_init_enable = <0x00000001>;
    disp_mode = <0x00000000>;
    screen0_output_type = <0x00000003>;
    screen0_output_mode = <0x00000005>;
    screen1_output_type = <0x00000002>;
    screen1_output_mode = <0x0000000b>;
    dev0_output_type = <0x00000004>;
    dev0_output_mode = <0x00000005>;
    dev0_screen_id = <0x00000000>;
    dev0_do_hpd = <0x00000001>;
    dev1_output_type = <0x00000002>;
    dev1_output_mode = <0x0000000b>;
    dev1_screen_id = <0x00000001>;
    dev1_do_hpd = <0x00000001>;
    dev2_output_type = <0x00000000>;
    def_output_dev = <0x00000000>;
    hdmi_mode_check = <0x00000001>;
    disp_para_zone = <0x00000001>;
    fb0_format = <0x00000000>;
    fb0_width = <0x00000500>;
    fb0_height = <0x000002d0>;
    fb1_format = <0x00000000>;
    fb1_width = <0x00000000>;
    fb1_height = <0x00000000>;
    lcd0_backlight = <0x00000032>;
    lcd1_backlight = <0x00000032>;
    lcd0_bright = <0x00000032>;
    lcd0_contrast = <0x00000032>;
    lcd0_saturation = <0x00000039>;
    lcd0_hue = <0x00000032>;
    lcd1_bright = <0x00000032>;
    lcd1_contrast = <0x00000032>;
    lcd1_saturation = <0x00000039>;
    lcd1_hue = <0x00000032>;
};
BPI-IoT# fdt set /soc/disp screen0_output_mode <0xa>
BPI-IoT# fdt set /soc/disp dev0_output_mode <0xa>
BPI-IoT# fdt set /soc/disp fb0_width <0x780>
BPI-IoT# fdt set /soc/disp fb0_height <0x438>
BPI-IoT# fdt save
boot package size: 0x138000
read uboot from flash: ret 2496
Entry_name        = u-boot
Entry_name        = parameter
Entry_name        = soc-cfg
Entry_name        = dtb
uboot_pkg magic 0x89119800
uboot size = 0x138000
storage type = 1
mmc down uboot
fdt write result 0
BPI-IoT# reset

Another way is modify and build the bsp code and flash the bootloader, here is the patch

diff --git a/sunxi-pack/sun8iw7p1/configs/BPI-M2Z-720P/sys_config.fex b/sunxi-pack/sun8iw7p1/configs/BPI-M2Z-720P/sys_config.fex
index 45c8bda..70b3d21 100755
--- a/sunxi-pack/sun8iw7p1/configs/BPI-M2Z-720P/sys_config.fex
+++ b/sunxi-pack/sun8iw7p1/configs/BPI-M2Z-720P/sys_config.fex
@@ -499,7 +499,7 @@ nand0_ndqs          = port:PC16<2><0><1><default>
 [boot_disp]
 output_disp  = 0
 output_type  = 3
-output_mode  = 5
+output_mode  = 10
 ;output_full = 1
 ;auto_hpd    = 1

@@ -519,13 +519,13 @@ disp_init_enable         = 1
 disp_mode                = 0

 screen0_output_type      = 3
-screen0_output_mode      = 5
+screen0_output_mode      = 10

 screen1_output_type      = 2
 screen1_output_mode      = 11

 dev0_output_type = 4
-dev0_output_mode = 5
+dev0_output_mode = 10
 dev0_screen_id = 0
 dev0_do_hpd = 1

@@ -541,8 +541,8 @@ hdmi_mode_check = 1
 disp_para_zone           = 1

 fb0_format               = 0
-fb0_width                = 1280
-fb0_height               = 720
+fb0_width                = 1920
+fb0_height               = 1080

 fb1_format               = 0
 fb1_width                = 0

Ok. I will but now I switched back to troubleshooting Raspbian.

To a raspi-config stuff - as far as I know it it that simple when using Debian on Pi.

Awesome stuff! Could U give me more details on those operations? I have ftdi for uart so physical connection is 100% possible. That uart idea seems easier for me.

Uart debug port is the three pins header beside sd slot, connect it with uart cable to PC and open minicom or other terminal, power on the m2z and press any key to enter uboot command mode

...
Hit any key to stop autoboot:  0 
BPI-IoT#

This is not raspberry Pi which is why nothing works and its not simple. In Armbian we have armbian-config, where (almost) everything works and is far more advanced and complex then raspiconfig.

Raspbian is most stupid OS you will find for bananas. It has nothing in coming with the OS you are used from RPi. Its just a plain Debian with the same wallpaper / look and private Allwinner developed kernel without active development and little to no community supports.

(relatively simple) Allwinner based boards (including M2Z) are almost fully supported by community with quality standardised code from this century - Armbian runs kernel 5.7.y / 5.8.y. What you will learn is AW proprietary way and is already obsolete. But its your time :wink:

What works and what does’t in modern kernel:

https://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix

So that port is not just a breakout for the standard uart? It can be used for debugging regardless of normal uart and console output etc? It like “always works”?

And could you provide some more information on flashing the bootloader?