motadol
Posts: 2
Joined: Sun Jun 21, 2020 8:02 pm

vc4-fkms-v3d locks up when connected to particular TV

Sun Jun 21, 2020 9:17 pm

Summary: On my Raspberry Pi 4B, the vc4-fkms-v3d driver appears to cause the system to lock up when HDMI is connected to a particular model of TV. Let's call this the Sony TV. (Lock up == no network, no video.) When I unplug the monitor, it resumes. Other TVs/monitors work fine. For this particular TV, I can get it to display video by booting headless, using `tvservice -o`, connecting the TV, using `tvservice -e "CEA 5 HDMI"`, then `fbset -depth 16`. But then it locks up when changing modes.

Any help would be appreciated. I'm happy to provide more info - just let me know what commands to run. Thanks in advance!

Symptoms:
  • If I boot with the Sony TV connected:
    • I see the rainbow screen and the initial kernel messages.
    • At the point when the framebuffer gets reset, the screen goes blank and never returns. The machine is unresponsive and I cannot connect via SSH, even after waiting for 15 minutes. I believe this corresponds to the `switching to vc4drmfb from simple` line in `journalctl`.
    • Once I unplug the HDMI cable, I can then SSH soon after.
    • As long as the cable is unplugged, SSH is responsive.
    • If I plug in the HDMI cable again, SSH immediately stops working. I don't get disconnected; just no echo back of types keys.
    • Once I unplug the HDMI cable, SSH immediately resumes. All of my typed keys immediately appear.
    • If I plug in another TV or monitor after it has started up, it works fine.
  • If I boot headless or with a different monitor, everything works fine. It boots up normally.
    • However, I get the same issue as above if I unplug the "good" TV/monitor and then plug in the Sony TV: everything immediately freezes and I cannot SSH. Once I disconnect the Sony TV, it's working again.
  • If I boot with the Sony TV connected and `dtoverlay=vc4-fkms-v3d` commented out, it boots fine, but then I can't use emulationstation.
  • Modifying or removing `hdmi_force_hotplug`, `hdmi_group`, and/or `hdmi_mode` does not help.
  • If I boot with Lakka and the Sony TV, I get no video at all. (Other monitor or TV works fine.)
  • I can get the Sony TV to work in a limited fashion as follows:
    • Boot headless.
    • Connect via SSH.
    • Run `tvservice -o`.
    • Connect the Sony TV.
    • Run `tvservice -e "CEA 5 HDMI"`. Screen is still blank (known issue), but the mode changes on the TV. Other modes work, too.
    • Run `fbset -depth 16`. Video now works.
    • Emulationstation + snes9x works, too. It even successfully changed mode to 640x480.
    • However, upon exiting snes9x, it locked up again. Disconnecting the Sony TV fixed it.
    • When I SSH'd in and ran `tvservice -s`, it said it was running in 1080p (not 1080i). Perhaps this is helpful for debugging?
System info:
  • Hardware: Raspberry Pi 4B rev 1.2
  • OS: Raspberry Pi OS Lite Buster, fully updated via apt. (Same on Lakka, see below.)
  • Kernel: 4.19.118-v7l+
  • TV: Sony KDL-40S2010, which only supports 1080i
  • HDMI Port: 0 (next to USB-C)
  • Power supply: Vilros Pi 4 USB-C Power Supply With Switch [3 Amp]
  • /boot/config.txt:

    Code: Select all

    hdmi_force_hotplug=1
    hdmi_group=1
    hdmi_mode=5
    dtparam=audio=on
    [pi4]
    dtoverlay=vc4-fkms-v3d
    max_framebuffers=2
    [all]
    
  • /boot/cmdline.txt (default)

    Code: Select all

    console=serial0,115200 console=tty1 root=PARTUUID=29feba32-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
  • EDID dump:

    Code: Select all

    00ffffffffffff004dd900950101010129100103804628780a0dc9a05747
    982712484c20000001010101010101010101010101010101011d8018711c
    1620582c2500dfa42100009e8c0ad08a20e02d10103e960030a421000018
    000000fc00534f4e592054560a2020202020000000fd003a3e0f2e08000a
    202020202020013102031b76478502030406070123090707830100006603
    0c00100080011d007251d01e206e285500dfa42100001e8c0aa01451f016
    00267c430030a4210000988c0ad08a20e02d10103e9600dfa4210000188c
    0aa01451f01600267c4300dfa42100009800000000000000000000000000
    00000000000000000000000000000086
    

cleverca22
Posts: 581
Joined: Sat Aug 18, 2012 2:33 pm

Re: vc4-fkms-v3d locks up when connected to particular TV

Mon Jun 22, 2020 11:08 pm

are there any errors or warnings in `dmesg`?
have you tried looking at the kernel logs over the serial port?

User avatar
kerry_s
Posts: 741
Joined: Thu Jan 30, 2020 7:14 pm

Re: vc4-fkms-v3d locks up when connected to particular TV

Mon Jun 22, 2020 11:45 pm

according ti this:
https://www.manualslib.com/manual/32102 ... s2010.html

the display is a 1366x768, which for the raspberry pi os leaves you with a blank screen bug.

search the forum for the fix/settings for config.txt

motadol
Posts: 2
Joined: Sun Jun 21, 2020 8:02 pm

Re: vc4-fkms-v3d locks up when connected to particular TV

Tue Jun 23, 2020 3:03 am

kerry_s wrote:
Mon Jun 22, 2020 11:45 pm
according ti this:
https://www.manualslib.com/manual/32102 ... s2010.html

the display is a 1366x768, which for the raspberry pi os leaves you with a blank screen bug.

search the forum for the fix/settings for config.txt
Doh! I had no idea. Switching to 720p solved the problem for me:

Code: Select all

hdmi_group=1
hdmi_mode=4
I can't get 1366x768 to work, but 720p is good enough for now. Thanks for the help!

That said, it still seems that there is a bug in vc4-fkms-v3d that causes the whole machine to lock up if I use 1080i mode with this TV. Having a blank screen is expected; a complete machine lockup is not. I haven't seen that reported anywhere else. Where is best to report that bug?

User avatar
kerry_s
Posts: 741
Joined: Thu Jan 30, 2020 7:14 pm

Re: vc4-fkms-v3d locks up when connected to particular TV

Tue Jun 23, 2020 4:03 am

it's the tv, not the pi that's at fault here. my guess is there doing weird stuff for that resolution, which is something that only showed on laptops & only started appearing on tv's.

ya just have to get the numbers right, it works at 1366x768 once you put the right numbers in & select it in the gui.
example: i use 1600x900 resolution on a 1920x1080 display, but they don't have that on the list.
so i add this to config.txt:

Code: Select all

hdmi_group=2
hdmi_mode=83
then it's in the list & i can select it.
Attachments
2020-06-22-181247_731x432_scrot.png
2020-06-22-181247_731x432_scrot.png (233.78 KiB) Viewed 102 times

User avatar
kerry_s
Posts: 741
Joined: Thu Jan 30, 2020 7:14 pm

Re: vc4-fkms-v3d locks up when connected to particular TV

Tue Jun 23, 2020 7:31 am

this is the settings:

Code: Select all

hdmi_group=2
hdmi_cvt=1366 768 60
hdmi_mode=87

Return to “Troubleshooting”