Monitor shows nothing when plugged in HDMI cable after boot complete

I have a custom carrier board with L4T 35.5.

Case 1
HDMI and hotplug is OK with HDMI cable plugged in before booting.

Case 2
If HDMI cable is not plugged in before booting but after boot completed,
the monitor shows nothing when plugged in HDMI cable.

This is /var/log/Xorg.0.log of Case 1.

[    19.038] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    19.038] (--) NVIDIA(GPU-0): DFP-0: Internal DisplayPort
[    19.038] (--) NVIDIA(GPU-0): DFP-0: 2380.0 MHz maximum pixel clock
[    19.038] (--) NVIDIA(GPU-0): 
[    19.135] (--) NVIDIA(GPU-0): ViewSonic VX2476 Series (DFP-1): connected
[    19.135] (--) NVIDIA(GPU-0): ViewSonic VX2476 Series (DFP-1): Internal TMDS
[    19.135] (--) NVIDIA(GPU-0): ViewSonic VX2476 Series (DFP-1): 165.0 MHz maximum pixel clock
[    19.135] (--) NVIDIA(GPU-0): 
[    21.338] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    21.338] (--) NVIDIA(GPU-0): DFP-0: Internal DisplayPort
[    21.338] (--) NVIDIA(GPU-0): DFP-0: 2380.0 MHz maximum pixel clock
[    21.338] (--) NVIDIA(GPU-0): 
[    21.435] (--) NVIDIA(GPU-0): ViewSonic VX2476 Series (DFP-1): connected
[    21.435] (--) NVIDIA(GPU-0): ViewSonic VX2476 Series (DFP-1): Internal TMDS
[    21.435] (--) NVIDIA(GPU-0): ViewSonic VX2476 Series (DFP-1): 165.0 MHz maximum pixel clock
[    21.435] (--) NVIDIA(GPU-0): 

This is /var/log/Xorg.0.log of Case 2.

[    18.025] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    18.025] (--) NVIDIA(GPU-0): DFP-0: Internal DisplayPort
[    18.025] (--) NVIDIA(GPU-0): DFP-0: 2380.0 MHz maximum pixel clock
[    18.025] (--) NVIDIA(GPU-0): 
[    18.036] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    18.036] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS
[    18.036] (--) NVIDIA(GPU-0): DFP-1: 165.0 MHz maximum pixel clock
[    18.036] (--) NVIDIA(GPU-0): 

The gdm3 was running in the Case 1 & Case 2.

root@nano:~# ps x | grep gdm
   1125 ?        Ssl    0:00 /usr/sbin/gdm3
   1139 ?        Sl     0:00 gdm-session-worker [pam/gdm-autologin]
   1494 tty2     Sl+    0:00 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty
 -verbose 3
root@nano:~# lsmod | grep nvidia
nvidia_modeset       1093632  3
nvidia               1327104  7 nvidia_modeset

And GPIO3 PM.00 (HDMI hot plug detect) is low when plug in HDMI and high when unplug HDMI in Case 1 and Case 2.

How can I get the GNOME desktop environment in Case 2?

dmesg-case1.txt (85.5 KB)
dmesg-case2.txt (85.4 KB)

Xorg.0.log-Case1.txt (19.4 KB)
Xorg.0.log-Case2.txt (20.0 KB)

Do you know that you have to configure device tree to make HDMI supported and hotplug supported…?

Yes, I know. I had already done that.
HDMI and hotplug functions are working well in my Case 1.

我可能用中文問比較清楚一點…請問你的case1到底是測什麼?

HDMI and hotplug is OK with HDMI cable plugged in before booting.

請問你的hotplug有沒有用的判斷依據是什麼?
case1的xorg log看起來一直沒有螢幕connected. 請問檔名是不是寫錯了?

可以請你在螢幕有亮的狀況下跑xrandr然後把結果分享一下嗎?

抱歉,xorg log 檔名寫錯。 已更正。

Case 1: 開機前插著HDMI,可進入 GNOME 桌面,熱插拔 HDMI,螢幕可正常顯示。
Case 2: 開機時不插HDMI,開機完成後插入HDMI,螢幕無任何顯示,螢幕OSD顯示無訊號。熱插拔 HDMI,螢幕無任何顯示。

xrandr 結果稍後給。

請你用xrandr的結果判斷hotplug有沒有成功 不要用螢幕能不能顯示判斷.

0. 開機時不接HDMI

1. 開機完成後接上HDMI

a@nano:~$ export DISPLAY=:0
a@nano:~$ [   52.918442] WARNING: CPU: 0 PID: 0 at drivers/gpio/gpio-tegra186.c:937 tegra186_gpio_irq+0x1ac/0x1f0
[   52.928247] ---[ end trace 335ab4ff5e8f8d6c ]---
a@nano:~$ xrandr 
Screen 0: minimum 8 x 8, current 640 x 480, maximum 32767 x 32767
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)

2. 插拔HDMI,螢幕無顯示

3. 先接上HDMI,然後再執行 xrandr

a@nano:~$ xrandr
Screen 0: minimum 8 x 8, current 640 x 480, maximum 32767 x 32767
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  59.94    50.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1600x900      60.00  
   1440x900      59.89  
   1400x1050     59.98  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93

4. 螢幕可顯示 GNOME 桌面

5. 插拔HDMI,螢幕可顯示 GNOME 桌面

看起來的結論是完成第3步驟,也就是插著 HDMI 接著執行 xrandr,接下來的 HDMI 就都可以正常顯示畫面。

只要你的xrandr結果還是DP-0/DP1 你現在用的就是DP mode. 你沒有做完我提到的這個

Do you know that you have to configure device tree to make HDMI supported and hotplug supported…?

在這個狀況下Hotplug GPIO是在AUX mode下動作, 不是GPIO mode.

抱歉,我不知道 Hotplug GPIO AUX mode 跟 GPIO mode 是什麼意思。有文件可以看嗎?

我有做了底下2個步驟,“make HDMI supported and hotplug supported” 的意思是指這些嗎?

  1. 用 Jetson_Orin_NX_and_Orin_Nano_series_Pinmux_Config_Template 產生 Support HDMI dts.

  2. Patch dts

--- a/tegra234-mb2-bct-scr-p3767-0000.dts
+++ b/tegra234-mb2-bct-scr-p3767-0000.dts
@@ -5,6 +5,11 @@
/ {
tfc {
+ reg@322 { /* GPIO_M_SCR_00_0 */
+ exclusion-info = <2>;
+ value = <0x38009696>;
+ };
--- a/Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3768-0000-a0.dtsi
+++ b/Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3768-0000-a0.dtsi
@@ -274,6 +274,7 @@
 
        display@13800000 {
                status = "okay";
+               os_gpio_hotplug_a = <&tegra_main_gpio TEGRA234_MAIN_GPIO(M, 0) GPIO_ACTIVE_HIGH>;
        };

這裡先簡單說明一下

→ 你作的東西不夠, 這些東西不足夠讓display run in HDMI mode.

有四個東西要改, 你改了其中三個

  1. pinmux → 這個其實沒做什麼 就是讓HDMI HPD pinmux in GPIO.

  2. tegra234-mb2-bct-scr-p3767-0000.dts 這個是firewall setting

  3. os_gpio_hotplug_a 這個是設定hotplug gpio

  4. 決定driver要跑HDMI mode還是DP mode是透過一個DCB image來決定. 寫在device tree裡面
    我們已經提供好現成的 dtsi file-> tegra234-dcb-p3767-0000-hdmi.dtsi
    你可以直接把你device tree裡面原本的 tegra234-dcb-p3767-0000-dp.dtsi替換成上面這個之後進行整機重燒即可

dcb相關文件:
https://docs.nvidia.com/jetson/archives/r35.5.0/DeveloperGuide/SD/Kernel/DisplayConfigurationAndBringUp/OrinDisplayconfig.html?highlight=dcb

照著你說的4個步驟修改後,HDMI功能正常了。謝謝。Thanks a lot.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.