pi4(4GB) work in headless and disable_fw_kms_setup=1,but Xorg.0.log still show (II) modeset(0): Output HDMI-1 connected

Open
#1,802 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
linux, raspberry-pi

Research direction

Start by comparing /boot/config.txt, /proc/cmdline, and /var/log/Xorg.0.log between the Pi 4 4GB and 8GB headless setups, focusing on hdmi_force_hotplug, disable_fw_kms_setup, and the video=HDMI-A-1 setting. Reproduce the configuration and verify that headless HDMI detection, page-flip errors, and the VNC resolution behave correctly without a monitor.

Written by the indexing model from the issue text.

Description

I have a pi4 (4GB) running the latest 2023-02-21-raspios-bullseye-arm64 with a recent kernel upgrade to 6.1.19-v8+
uname -a
Linux raspberrypi4 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux
Part of /boot/config.txt
#hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=82
dtoverlay=vc4-kms-v3d
cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:30:9A:CA vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 boot=overlay console=ttyS0,115200 console=tty1 root=PARTUUID=1cad5af1-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

Recently I noticed that /var/log/Xorg.0.log keeps coming up
[ 400.962] (WW) modeset(0): flip queue failed: Device or resource busy
[ 400.962] (WW) modeset(0): Page flip failed: Device or resource busy
[ 400.962] (EE) modeset(0): present flip failed
[ 401.067] (WW) modeset(0): flip queue failed: Device or resource busy
[ 401.067] (WW) modeset(0): Page flip failed: Device or resource busy
[ 401.067] (EE) modeset(0): present flip failed
[ 402.573] (WW) modeset(0): flip queue failed: Device or resource busy
[ 402.573] (WW) modeset(0): Page flip failed: Device or resource busy
[ 402.573] (EE) modeset(0): present flip failed
[ 403.961] (WW) modeset(0): flip queue failed: Device or resource busy
[ 403.961] (WW) modeset(0): Page flip failed: Device or resource busy
[ 403.962] (EE) modeset(0): present flip failed
[ 404.069] (WW) modeset(0): flip queue failed: Device or resource busy
[ 404.069] (WW) modeset(0): Page flip failed: Device or resource busy
[ 404.069] (EE) modeset(0): present flip failed
It is suspected that it is related to the kernel upgrade to 6.1.19-v8+. If the monitor is connected, the above log will not be generated.
problem
1.headless and #hdmi_force_hotplug=1, which should not detect hdmi, but /var/log/Xorg.0.log always shows (II) modeset(0): Output HDMI-1 connected,and cmdline has video= HDMIA-1 :1920x1080M@60
2.In /boot/config.txt, set disable_fw_kms_setup=1, cmdline no longer has video=HDMI-A-1:1920x1080M@60, Xorg.0.log no longer generates Page flip failed log, But Xorg.0.log still shows (II) modeset(0): Output HDMI-1 connected, and because hdmi show connected, the vnc resolution does not work.

cat /etc/xdg/autostart/vnc_xrandr.desktop
[Desktop Entry]
Type=Application
Name=vnc_xrandr
Comment=Set resolution for VNC
NoDisplay=true
Exec=sh -c "if ! (xrandr | grep -q -w connected) ; then /usr/bin/xrandr --fb 1920x1080 ; fi"

When I put the sd card of pi4 (4GB) on another pi4 (8GB) and ran it headless, the resolution of vnc did not have the above problem, as follows:
1.If #hdmi_force_hotplug=1 or disable_fw_kms_setup=1, Then cmdline does not have video=HDMI-A-1:1920x1080M@60,Xorg.0.log shows (II) modeset(0): output HDMI-1 has been disconnected, vnc resolution is 1920x1080
2.if hdmi_force_hotplug=1 and #disable_fw_kms_setup=1, cmdline has video=HDMI-A-1:1920x1080M@60D, Xorg.0.log shows (II) modeset(0): Output HDMI-1 connected, vnc resolution is 1920x1080, but Xorg.0.log will keep generating Page flip failed log.

There is one more difference between pi4 (4GB) and pi4 (8GB) regarding the hdmi_force_hotplug parameter
pi4 (4GB) (disable_fw_kms_setup=1), if #hdmi_force_hotplug=1, cmdline has video=HDMI-A-1:1920x1080M@60. if hdmi_force_hotplug=1, cmdline has video=HDMI-A-1:1920x1080M@60D.
pi4 (8GB) (disable_fw_kms_setup=1), if #hdmi_force_hotplug=1, cmdline does not have video=HDMI-A-1:1920x1080M@60. if hdmi_force_hotplug=1, cmdline has video=HDMI-A-1:1920x1080M@60D.

Dominant language
No language data
Stars
5.6k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/firmware

All issues in raspberrypi/firmware

Similar issues

More Embedded & IoT issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.