Jump to content

Recommended Posts

Posted

TL;DR:

  1. How to make HDMI screen with custom resolution work? Including boot log/boot splash screen.
  2. How to configure auto use of/auto switch to newly connected display? Means moving tty/X Session to connected display like it works on e.g. Ubuntu desktop.
  3. Why HDMI screens with non standard resolution works well on kernel v5.x but stop working on v6.x ones?
  4. Where are HDMI related I2C interfaces in Armbian?

 

Full version:
In theory host system (SBC, laptop, PC) should detect new HDMI device connection, load EDID data from screen and use it to configure video output (resolution, timings etc).
In practice it works well for Ubuntu desktop (laptop or PC) but not always works for SBC (Rockchip or Raspberry Pi4).

 

When I connect HDMI screen to SBC under Armbian I have following issues:

  1. Monitor is properly detected only if it was hooked up before system boot.
  2. I see valid edid files in device directories, but I do not see HDMI related I2C interfaces, so tools like `get-edid` do not work
  3. I do not see valid edid files in device dirs if HDMI screen connected after boot (no auto detection works?)
  4. screens with non standard resolutions (1024x600, 800x480 etc) do not work at all. Neither boot logs, not X session. fb device is here but  screen is blank, unable to set right fb parameters.
  5. I was able to make it working on kernel 6.6 by patching `/drivers/gpu/drm/drm_edid.c` and `/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c` (hardcoding custome modes and pre_pll_cfg_table configuration).
  6. The same hardware works under old 5.x kernels.


Does anyone have any ideas or tips on the following:

  1. What was changed in 6.x kernel that cause broken HDMI (EDID?) functionality?
  2. What is the right way to configure screens with non standard resolutions? Can I do it without patching of `/drivers/gpu/drm/drm_edid.c` and `/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c` sources? Which kernel configs should be enabled for proper EDID support?
  3. How to configure "auto detection" of "on the fly" connected display? E.g. like it works on desktop distros: connected display show main tty or X session.
  4. Where are HDMI related I2C interfaces? At the end, how OS got valid edid file out of screen?

 

I would be grateful for any hints. Even if they are links to instructions or patches for other platforms

 

A few words about my configurations:

  • Screens: usual desktop monitor with standard resolutions, LCD modules with 1024x600 and 800x480 resolutions. All them connected via HDMI cables, try different ones.
  • Desktop host: PC with integrated intel graphics. Ubuntu 24.04
  • SBC hosts: Raspberry PI 4 and Renegade like (RK3328) board. Fresh (v6.6.x kernels) and old (5.x kernel) Armbian images. Raspberry OS has similar behavior.
Posted (edited)

Few more experiments were done:

 

1. I connected the same screens to RPi4 (`bcm271`1 family) and Orange PI 3 LTS (`sun50iw6` family) boards under Armbian. The both used 6.6 kernel. Everything works fine, I see proper resolution in both kernel/u-boot logs and XSession.

Which means

 a) all screens and cables are OK

 b) armbian kernel for RPi4 seems to be more advanced that Raspbian one :)

 

2. I enabled drm debug output (`extraargs=video=HDMI-A-1:1024x600@60D drm.debug=0x4`) and got following logs:

 

[    3.073148] [drm] Initialized rockchip 1.0.0 for display-subsystem on minor 0
[    3.073850] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe]
[    3.073886] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:43:HDMI-A-1]
[    3.073923] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:43:HDMI-A-1] status updated from unknown to connected
[    3.074070] rockchip-drm display-subsystem: [drm:drm_sysfs_hotplug_event] generating hotplug event
[    3.201391] [drm:drm_detect_monitor_audio] Monitor has basic audio support
[    3.201460] rockchip-drm display-subsystem: [drm:update_display_info.part.0] [CONNECTOR:43:HDMI-A-1] HDMI: DVI dual 0, max TMDS clock 0 kHz
[    3.201502] rockchip-drm display-subsystem: [drm:update_display_info.part.0] [CONNECTOR:43:HDMI-A-1] ELD monitor HDMI
[    3.201534] rockchip-drm display-subsystem: [drm:update_display_info.part.0] [CONNECTOR:43:HDMI-A-1] HDMI: latency present 0 0, video latency 0 0, audio latency 0 0
[    3.201570] rockchip-drm display-subsystem: [drm:update_display_info.part.0] [CONNECTOR:43:HDMI-A-1] ELD size 28, SAD count 1
[    3.203289] rockchip-drm display-subsystem: [drm] User-defined mode not supported: "1024x600": 60 50250 1024 1068 1156 1344 600 603 609 625 0x68 0x9
[    3.204541] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "1024x600": 60 50250 1024 1068 1156 1344 600 603 609 625 0x68 0x9 (NOCLOCK)
[    3.204596] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x400": 70 28320 720 738 846 900 400 412 414 449 0x40 0x6 (NOCLOCK)
[    3.204637] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "832x624": 75 57284 832 864 928 1152 624 625 628 667 0x40 0xa (NOCLOCK)
[    3.204678] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x480i": 60 13500 720 739 801 858 480 488 494 525 0x40 0x101a (BAD)
[    3.204719] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x480i": 60 13500 720 739 801 858 480 488 494 525 0x40 0x101a (BAD)
[    3.204760] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x576i": 50 13500 720 732 795 864 576 580 586 625 0x40 0x101a (BAD)
[    3.204799] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x576i": 50 13500 720 732 795 864 576 580 586 625 0x40 0x101a (BAD)
[    3.204841] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "640x480": 60 25200 640 656 752 800 480 490 492 525 0x40 0xa (NOCLOCK)
[    3.204879] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x480i": 60 13514 720 739 801 858 480 488 494 525 0x40 0x101a (BAD)
[    3.204919] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x480i": 60 13514 720 739 801 858 480 488 494 525 0x40 0x101a (BAD)
[    3.204958] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x480": 60 27027 720 736 798 858 480 489 495 525 0x40 0xa (NOCLOCK)
[    3.204998] rockchip-drm display-subsystem: [drm:drm_mode_prune_invalid] Rejected mode: "720x480": 60 27027 720 736 798 858 480 489 495 525 0x40 0xa (NOCLOCK)
[    3.205061] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:43:HDMI-A-1] probed modes:
[    3.205098] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
[    3.205140] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080": 60 148352 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
[    3.205181] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080i": 60 74250 1920 2008 2052 2200 1080 1084 1094 1125 0x40 0x15
[    3.205222] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080i": 60 74250 1920 2008 2052 2200 1080 1084 1094 1125 0x40 0x15
[    3.205263] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080i": 60 74176 1920 2008 2052 2200 1080 1084 1094 1125 0x40 0x15
[    3.205305] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080": 50 148500 1920 2448 2492 2640 1080 1084 1089 1125 0x40 0x5
[    3.205346] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080": 50 148500 1920 2448 2492 2640 1080 1084 1089 1125 0x40 0x5
[    3.205390] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080i": 50 74250 1920 2448 2492 2640 1080 1084 1094 1125 0x40 0x15
[    3.205431] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1920x1080i": 50 74250 1920 2448 2492 2640 1080 1084 1094 1125 0x40 0x15
[    3.205472] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1280x1024": 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40 0x5
[    3.205513] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1280x720": 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
[    3.205554] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1280x720": 60 74176 1280 1390 1430 1650 720 725 730 750 0x40 0x5
[    3.205594] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1280x720": 50 74250 1280 1720 1760 1980 720 725 730 750 0x40 0x5
[    3.205635] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1280x720": 50 74250 1280 1720 1760 1980 720 725 730 750 0x40 0x5
[    3.205676] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1024x768": 75 78750 1024 1040 1136 1312 768 769 772 800 0x40 0x5
[    3.205717] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1024x768": 70 75000 1024 1048 1184 1328 768 771 777 806 0x40 0xa
[    3.205758] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "1024x768": 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
[    3.205799] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "800x600": 75 49500 800 816 896 1056 600 601 604 625 0x40 0x5
[    3.205839] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "800x600": 72 50000 800 856 976 1040 600 637 643 666 0x40 0x5
[    3.205880] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "800x600": 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
[    3.205920] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "800x600": 56 36000 800 824 896 1024 600 601 603 625 0x40 0x5
[    3.205961] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "720x576": 50 27000 720 732 796 864 576 581 586 625 0x40 0xa
[    3.206035] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "720x576": 50 27000 720 732 796 864 576 581 586 625 0x40 0xa
[    3.206081] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "720x576": 50 27000 720 732 796 864 576 581 586 625 0x40 0xa
[    3.206120] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "720x480": 60 27000 720 736 798 858 480 489 495 525 0x40 0xa
[    3.206161] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "720x480": 60 27000 720 736 798 858 480 489 495 525 0x40 0xa
[    3.206202] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "640x480": 75 31500 640 656 720 840 480 481 484 500 0x40 0xa
[    3.206243] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "640x480": 73 31500 640 664 704 832 480 489 492 520 0x40 0xa
[    3.206283] rockchip-drm display-subsystem: [drm:drm_helper_probe_single_connector_modes] Probed mode: "640x480": 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
[    3.206328] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe] [CONNECTOR:43:HDMI-A-1] enabled? yes
[    3.206370] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe] Not using firmware configuration
[    3.206402] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe] [CONNECTOR:43:HDMI-A-1] looking for cmdline mode
[    3.206435] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe] [CONNECTOR:43:HDMI-A-1] looking for preferred mode, tile 0
[    3.206465] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe] [CONNECTOR:43:HDMI-A-1] Found mode 1920x1080
[    3.206492] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe] picking CRTCs for 4096x4096 config
[    3.206527] rockchip-drm display-subsystem: [drm:drm_client_modeset_probe] [CRTC:38:crtc-0] desired mode 1920x1080 set (0,0)
[    3.206565] rockchip-drm display-subsystem: [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 0 primary plane
[    3.206609] rockchip-drm display-subsystem: [drm:drm_fbdev_dma_helper_fb_probe] surface width(1920), height(1080) and bpp(32)

 

DRM module see connected device, able to load EDID data and decode them. However it cannot use it: Rejected mode: `"1024x600": 60 50250 1024 1068 1156 1344 600 603 609 625 0x68 0x9 (NOCLOCK)`

Any idea what does `NOCLOCK` means and now to configure it properly?

Edited by MaxM

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