Jump to content

How to change resolution HDMI display (Armbian5.27)?


Recommended Posts

Resolution is currently set by U-Boot. It reads recommended resolution from EDID. So, if the screen reports right resolution, it should work automaticly. Please describe your troubles more in details. Also the name of you display gives only the LCD panel datasheet. What kind of hdmi to lvds adapter do you use? Is it properly configured, especially EDID?

Link to comment
Share on other sites

Strange, what is the resolution reported by Linux? Does resolution detection works properly on any other screen? To answer your initial question, there is no way to change resolution the only way to change resolution is by creating special U-Boot variable, because the current driver is meant to be quick workaround until proper Linux driver is written. Current driver just ask monitor what is its prefered resolution (in your case it should be 800x480) and then sets it. Probably your lvds to hdmi converter doesn't report correct resolution.

 

Anyway, according to adafruit page you linked, your monitor should work regardless, but I guess that you get weird scaled image as explained there? According to this page, this boards often have broken EDID data, which would explain the issue, but I would think that adafruit checks that before shipping.

 

P.S. I just remembered, if you have 1024x768 resolution set, then this means that EDID data could not be read. Fortunately, converter could be reprogrammed...

Edited by jernej
Correct the facts
Link to comment
Share on other sites

2 minutes ago, IgZero said:

I have read your reference. 


Read again and read what Jernej wrote:

 

12 hours ago, jernej said:

use the current driver is meant to be quick workaround until proper driver is written


I gave you a hint, how you can try - at the supplied link you have:
 

Quote

For example to always use the hdmi connector, even if no cable is inserted, using edid info when available and otherwise initalizing it at 1024x768@60Hz, use: setenv video-mode sunxi:1024x768-24@60,monitor=dvi,hpd=0,edid=1.

Parameters regarding video must be saved into u-boot environment file since they must be read before reading boot script. You can do this by adding saveenv command at the end of boot script (boot.cmd). Remember to recompile boot.cmd to boot.scr and note that changes will come into action after second boot.

 

I am not sure it will work for you, but it's worth trying.
Forget about armbianEnv.txt. This is not gonna work with this temporally driver and this development kernel, which we don't support anyway.

Link to comment
Share on other sites

3 minutes ago, Igor said:

I am not sure it will work for you, but it's worth trying.
Forget about armbianEnv.txt. This is not gonna work with this temporally driver and this development kernel, which we don't support anyway.

I tried this hint. Doesn't work.

My boot.cmd

Quote

# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
#

setenv load_addr "0x44000000"
setenv overlay_error "false"
# default values
# setenv rootdev "/dev/mmcblk0p1"
# setenv verbosity "1"
# setenv console "both"
setenv disp_mem_reserves "off"
# setenv disp_mode "1920x1080p60"
setenv rootfstype "ext4"
setenv docker_optimizations "on"
setenv video-mode sunxi:800x480,monitor=hdmi,hpd=0,edid=1
saveenv

 

 

Link to comment
Share on other sites

@Igor,

Is this variable constructed during script parsing? To be honest, I didn't played with it, but if I understand everything correctly, it must be available during initialization, which means that the only possible way is to save it as an environment variable - first setenv then saveenv and reboot. Video driver is initialized before boot script gets executed.

Link to comment
Share on other sites

29 minutes ago, jernej said:

@Igor,

Is this variable constructed during script parsing? To be honest, I didn't played with it, but if I understand everything correctly, it must be available during initialization, which means that the only possible way is to save it as an environment variable - first setenv then saveenv and reboot. Video driver is initialized before boot script gets executed.

IMHO: I think that it would be the correct decision.  

Link to comment
Share on other sites

Spoiler

 


U-Boot SPL 2017.01-rc1-g5df570f-dirty (Mar 12 2017 - 06:16:19)

DRAM: 1024 MiB

Trying to boot from MMC1NOTICE:  BL3-1: Running on H5 (1718) in SRAM A2 (@0x44000)

NOTICE:  Configuring SPC Controller

NOTICE:  BL3-1: v1.0(debug):aa75c8d

NOTICE:  BL3-1: Built : 06:16:13, Mar 12 2017

INFO:    BL3-1: Initializing runtime services

INFO:    BL3-1: Preparing for EL3 exit to normal world

INFO:    BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9





U-Boot 2017.01-rc1-g5df570f-dirty (Mar 12 2017 - 06:16:26 +0100) Allwinner Technology



CPU:   Allwinner H5 (SUN50I)

Model: OrangePi PC 2

DRAM:  1 GiB

MMC:   SUNXI SD/MMC: 0

*** Warning - bad CRC, using default environment



HDMI connected: Setting up a 1024x768 dvi console (overscan 0x0)

hdmi enabled

Error: no valid bmp image at 66000000

In:    serial

Out:   vga

Err:   vga

Net:   phy interface7

eth0: ethernet@1c30000

Hit any key to stop autoboot:  0 

6944 bytes read in 199 ms (33.2 KiB/s)

switch to partitions #0, OK

mmc0 is current device

Scanning mmc 0:1...


Found U-Boot script /boot/boot.scr

2459 bytes read in 221 ms (10.7 KiB/s)

## Executing script at 4fc00000

U-boot loaded from SD

Boot script loaded from mmc

116 bytes read in 184 ms (0 Bytes/s)

20836 bytes read in 289 ms (70.3 KiB/s)

4709076 bytes read in 556 ms (8.1 MiB/s)

11659272 bytes read in 790 ms (14.1 MiB/s)

## Loading init Ramdisk from Legacy Image at 4fe00000 ...

   Image Name:   uInitrd

   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)

   Data Size:    4709012 Bytes = 4.5 MiB

   Load Address: 00000000

   Entry Point:  00000000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 4fa00000

   Booting using the fdt blob at 0x4fa00000

   reserving fdt memory region: addr=4fa00000 size=6000

   Loading Ramdisk to 49b82000, end 49fffa94 ... OK

   Loading Device Tree to 0000000049b79000, end 0000000049b81fff ... OK



Starting kernel ...




Loading, please wait...

starting version 229

Begin: Loading essential drivers ... done.

Begin: Running /scripts/init-premount ... done.

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.

Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems

done.

Begin: Will now check root file system ... fsck from util-linux 2.27.1

[/sbin/fsck.ext4 (1) -- /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1 

/dev/mmcblk0p1: recovering journal

/dev/mmcblk0p1: clean, 151663/478608 files, 701982/1906176 blocks

done.

done.

Begin: Running /scripts/local-bottom ... done.

Begin: Running /scripts/init-bottom ... done.



Welcome to Ubuntu 16.04.2 LTS!



[  OK  ] Reached target User and Group Name Lookups.

[  OK  ] Reached target Remote File Systems (Pre).

[  OK  ] Set up automount Arbitrary Executab...ats File System Automount Point.

[  OK  ] Created slice System Slice.

[  OK  ] Created slice system-serial\x2dgetty.slice.

[  OK  ] Listening on udev Control Socket.

[  OK  ] Reached target Encrypted Volumes.

[  OK  ] Listening on udev Kernel Socket.

[  OK  ] Listening on Syslog Socket.

[  OK  ] Listening on fsck to fsckd communication Socket.

[  OK  ] Created slice User and Session Slice.

[  OK  ] Reached target Remote File Systems.

[  OK  ] Listening on Journal Audit Socket.

[  OK  ] Listening on Journal Socket (/dev/log).

[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.

[  OK  ] Reached target Slices.

[  OK  ] Listening on Journal Socket.

         Mounting Debug File System...

         Starting Set console keymap...

         Starting Remount Root and Kernel File Systems...

         Starting Load Kernel Modules...

         Starting Restore / save the current clock...

         Starting Create list of required st... nodes for the current kernel...

         Starting Nameserver information manager...

         Mounting Huge Pages File System...

[  OK  ] Started Forward Password Requests to Wall Directory Watch.

         Mounting POSIX Message Queue File System...

[  OK  ] Mounted Huge Pages File System.

[  OK  ] Mounted POSIX Message Queue File System.

[  OK  ] Mounted Debug File System.

[  OK  ] Started Remount Root and Kernel File Systems.

[  OK  ] Started Set console keymap.

[  OK  ] Started Load Kernel Modules.

[  OK  ] Started Restore / save the current clock.

[  OK  ] Started Create list of required sta...ce nodes for the current kernel.

[  OK  ] Started Nameserver information manager.

[  OK  ] Reached target Network (Pre).

         Starting Create Static Device Nodes in /dev...

         Mounting Configuration File System...

         Starting Apply Kernel Variables...

         Starting udev Coldplug all Devices...

         Starting Load/Save Random Seed...

         Activating swap /var/swap...

[  OK  ] Mounted Configuration File System.

[  OK  ] Started Create Static Device Nodes in /dev.

[  OK  ] Started Apply Kernel Variables.

[  OK  ] Started Load/Save Random Seed.

[  OK  ] Activated swap /var/swap.

[  OK  ] Reached target Swap.

         Starting udev Kernel Device Manager...

[  OK  ] Reached target Local File Systems (Pre).

         Mounting /tmp...

[  OK  ] Mounted /tmp.

[  OK  ] Started udev Coldplug all Devices.

[  OK  ] Reached target Local File Systems.

         Starting Armbian enhanced Log2Ram...

         Starting Raise network interfaces...

         Starting Tell Plymouth To Write Out Runtime Data...

         Starting Set console font and keymap...

[  OK  ] Started Entropy daemon using the HAVEGE algorithm.

         Starting Journal Service...

[  OK  ] Started udev Kernel Device Manager.

[  OK  ] Started Tell Plymouth To Write Out Runtime Data.

[  OK  ] Found device /dev/ttyS0.

[  OK  ] Started Dispatch Password Requests to Console Directory Watch.

[  OK  ] Started Journal Service.

         Starting Flush Journal to Persistent Storage...

[  OK  ] Started Flush Journal to Persistent Storage.

         Starting Create Volatile Files and Directories...

[  OK  ] Started Create Volatile Files and Directories.

[  OK  ] Started Armbian enhanced Log2Ram.

[  OK  ] Reached target Sound Card.

         Starting Update UTMP about System Boot/Shutdown...

[  OK  ] Reached target System Time Synchronized.

[  OK  ] Started ifup for eth0.

[  OK  ] Started Update UTMP about System Boot/Shutdown.

[  OK  ] Found device /sys/subsystem/net/devices/eth0.

[  OK  ] Reached target System Initialization.

[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.

[  OK  ] Started Trigger resolvconf update for networkd DNS.

[  OK  ] Reached target Paths.

[  OK  ] Started Daily apt activities.

[  OK  ] Started Daily Cleanup of Temporary Directories.

[  OK  ] Reached target Timers.

[  OK  ] Listening on D-Bus System Message Bus Socket.

[  OK  ] Reached target Sockets.

[  OK  ] Reached target Basic System.

         Starting Login Service...

[  OK  ] Started D-Bus System Message Bus.

         Starting LSB: Start/stop sysstat's sadc...

         Starting LSB: Starts LIRC daemon....

         Starting LSB: Armbian gathering hardware information...

         Starting LSB: Load kernel modules needed to enable cpufreq scaling...

         Starting Accounts Service...

         Starting LSB: No Display Manager...

[  OK  ] Started Regular background program processing daemon.

         Starting Network Manager...

         Starting Avahi mDNS/DNS-SD Stack...

         Starting Permit User Sessions...

         Starting System Logging Service...

         Starting Save/Restore Sound Card State...

[  OK  ] Started Set console font and keymap.

[  OK  ] Started Permit User Sessions.

[  OK  ] Started Save/Restore Sound Card State.

[  OK  ] Started LSB: Start/stop sysstat's sadc.

[  OK  ] Started Avahi mDNS/DNS-SD Stack.

[  OK  ] Started Login Service.

[  OK  ] Started LSB: Starts LIRC daemon..

[  OK  ] Started LSB: No Display Manager.

[  OK  ] Created slice system-getty.slice.

[  OK  ] Started System Logging Service.

[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.

         Starting LSB: set CPUFreq kernel parameters...

[  OK  ] Started Raise network interfaces.

[  OK  ] Started LSB: set CPUFreq kernel parameters.

         Starting LSB: Set sysfs variables from /etc/sysfs.conf...

[  OK  ] Started LSB: Set sysfs variables from /etc/sysfs.conf.

[  OK  ] Started LSB: Armbian gathering hardware information.

         Starting Authenticate and Authorize Users to Run Privileged Tasks...

[  OK  ] Started Network Manager.

         Starting Network Manager Wait Online...

[  OK  ] Reached target Network.

         Starting OpenBSD Secure Shell server...

[  OK  ] Started Authenticate and Authorize Users to Run Privileged Tasks.

[  OK  ] Started Accounts Service.

         Starting Network Manager Script Dispatcher Service...

[  OK  ] Started Network Manager Script Dispatcher Service.

         Starting Hostname Service...

[  OK  ] Started Hostname Service.

[  OK  ] Started OpenBSD Secure Shell server.


[  OK  ] Created slice User Slice of orpipc2.

         Starting User Manager for UID 1000...

[  OK  ] Started Session c1 of user orpipc2.

[  OK  ] Started User Manager for UID 1000.




         Mounting FUSE Control File System...

[  OK  ] Mounted FUSE Control File System.

         Starting Disk Manager...

[  OK  ] Started Network Manager Wait Online.

[  OK  ] Reached target Network is Online.

         Starting /etc/rc.local Compatibility...

         Starting LSB: Advanced IEEE 802.11 management daemon...

         Starting LSB: Start NTP daemon...

         Starting LSB: disk temperature monitoring daemon...

[  OK  ] Started /etc/rc.local Compatibility.

[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.

         Starting Hold until boot process finishes up...

         Starting Terminate Plymouth Boot Screen...

[  OK  ] Started LSB: disk temperature monitoring daemon.

[  OK  ] Started Hold until boot process finishes up.

[  OK  ] Started Terminate Plymouth Boot Screen.

[  OK  ] Started LSB: Start NTP daemon.

[  OK  ] Started Disk Manager.

[  OK  ] Started Getty on tty1.

[  OK  ] Started Serial Getty on ttyS0.

[  OK  ] Reached target Login Prompts.

         Starting Set console scheme...

[  OK  ] Reached target Multi-User System.

[  OK  ] Reached target Graphical Interface.

         Starting Update UTMP about System Runlevel Changes...

[  OK  ] Started Set console scheme.

[  OK  ] Started Update UTMP about System Runlevel Changes.




Ubuntu 16.04.2 LTS orangepipc2 ttyS0

The same as IgZero's problem.

This is my uart output (hdmi-dvi cable plugged, monitor have default 1920x1080 resolution):

 

Link to comment
Share on other sites

8 minutes ago, druidx said:

HDMI connected: Setting up a 1024x768 dvi console (overscan 0x0)


Yes, u-boot / EDID can't detect your screen properly ... probably due to hdmi-dvi cable?

 

Try to force it.

Link to comment
Share on other sites

10 minutes ago, Igor said:


Yes, u-boot / EDID can't detect your screen properly ... probably due to hdmi-dvi cable?

 

Try to force it.

How to force? I've tried to change /boot/boot.cmd (then compile), but nothing...

like this

setenv video-mode sunxi:1920x1080,monitor=dvi,hpd=0,edid=0
saveenv
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

& like that

setenv video-mode sunxi:1920x1080-24@60,monitor=dvi,hpd=0,edid=0
saveenv

 

Link to comment
Share on other sites

4 minutes ago, druidx said:

UART's log show that at first system try to set resulution and then read boot.scr.  ???


That's normal. Screen is detected before reading user boot script. We are doing hacks here ... saving to u-boot environment from u-boot script. Environment is read first, than screen is set or autodetect.

Link to comment
Share on other sites

1 minute ago, druidx said:

Haven't any more solution appeared yet?


We gave you everything what is known, even this is developing kernel without end user support. If you want that this is solved few months earlier click here. Remember, we do this in our free time.


Few months ago nobody had a picture on HDMI screen on this kernel ... Remember, this is a temporally video driver, so nobody will throw much time on it.

 

Link to comment
Share on other sites

My case is to change u-boot default resolution to 1024x768. The steps below configured successfully on orange pi pc plus and 10" hdmi monitor.

 

1. dd if=Armbian_5.25_Orangepipcplus_Debian_jessie_default_3.4.113.img of=/dev/sdb bs=1M

2. change root passwd
    add general user account
    nmtui to activate wifi internet connection

3. DEVICE_NAME=orangepipcplus
    apt-get update
    apt-get install -y linux-u-boot-${DEVICE_NAME}-dev \
    linux-image-dev-sun8i \
    linux-headers-dev-sun8i \
    linux-dtb-dev-sun8i \
    linux-jessie-root-${DEVICE_NAME}

4. connect serial console by esplink
    press any key to stop at u-boot prompt

5. setenv video-mode sunxi:1024x768-24@60,monitor=hdmi,hpd=0,edid=0
    saveenv
    reset

Link to comment
Share on other sites

Igor,

 

Please could you link me to github source/patch/issue for the temporary driver, so I might be able to do some debugging on this.
 

I'm having similar issues on pi zero+2-h5 and previously worked in Cambridge in one of the mali drivers teams, so can probably see whats going on at least and perhaps aim to contribute some driver code.

Link to comment
Share on other sites

I have the same problem with an orangepi one and ARMBIAN 5.60 stable Debian GNU/Linux 9 (stretch) 4.14.70-sunxi

 

I have a VGA Monitor connected via a HDMI-to-VGA adpater which runs well under Armbian 3.4 and h3disp set to 1024x768@60 which is the max resolution of this monitor. The adapter also runs fine with my normal monitor Hanns.G and with any PC I own and any resolution.

 

When I changed to Armbian 4.14, the resolution of the video output is always set to 1920x1080@60, regardless which parameter I change in /boot/armbianEnv.txt or /boot/boot.cmd recompile and boot twice. I also tried 800x600 and 640x480, nothing works.

 

Tnx L

 

Link to comment
Share on other sites

9 hours ago, lagerschaden said:

I found an error in the U-boot messages:


It's not exactly an error. Just that there is no boot environment set and (our) preset is used. If this bothers you, go to u-boot prompt and run: saveenv and it should be gone. This might not work on eMMC based install.

 

20 hours ago, lagerschaden said:

When I changed to Armbian 4.14, the resolution of the video output is always set to 1920x1080@60

 

Modern kernel has video autodetection which might not work properly yet. Especially when using some HDMI-VGA adaptors.

Link to comment
Share on other sites

I ended up working this out with the help of this post - specifically, if you add the following to /boot/armbianEnv.txt, you can force the video mode.

 

Some examples:

 

640x480

extraargs=drm_kms_helper.edid_firmware=HDMI-A-1:edid/640x480.bin video=HDMI-A-1:640x480-24@60

 

1080p

extraargs=drm_kms_helper.edid_firmware=HDMI-A-1:edid/1920x1080.bin video=HDMI-A-1:1920x1080@60

 

I didn't have to install any extra packages or anything using Armbian Debian Stretch / 4.14.78-sunxi, it just worked out of the box (edid files already installed/etc).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines