raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.21k stars 5.02k forks source link

Full KMS video driver does not support same HDMI-CEC features as fake KMS #5254

Open cihlarma opened 2 years ago

cihlarma commented 2 years ago

Describe the bug

With dtoverlay=vc4-fkms-v3d my CEC-capable TV automatically turns on and changes to the correct input source when the Raspberry Pi is turned on. With dtoverlay=vc4-kms-v3d this does not happen.

Steps to reproduce the behaviour

  1. Flash the latest RPi OS onto an SD card (tested with 2022-09-22-raspios-bullseye-armhf)
  2. Boot
  3. Observe the TV not turning on automatically
  4. Change dtoverlay=vc4-kms-v3d in config.txt to dtoverlay=vc4-fkms-v3d
  5. Reboot
  6. Observe the TV now turning on automatically

Device (s)

Raspberry Pi 4 Mod. B

System

$ cat /etc/rpi-issue 
Raspberry Pi reference 2022-09-22
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 8a42abcd1dbd8c9c1fdfca4e0c3778255b2f9cc4, stage4

$ vcgencmd version
Oct 26 2022 11:09:05 
Copyright (c) 2012 Broadcom
version c72ad6b26ff40c91ef776b847436094ee63fabee (clean) (release) (start)

$ uname -a
Linux raspberrypi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux

Logs

Full boot dmesg output ``` [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083] [ 0.000000] Linux version 5.15.76-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 [ 0.000000] random: crng init done [ 0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.2 [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003fffffff] [ 0.000000] DMA32 [mem 0x0000000040000000-0x00000000fbffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000002fffffff] [ 0.000000] node 0: [mem 0x0000000040000000-0x00000000fbffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff] [ 0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges [ 0.000000] percpu: Embedded 28 pages/cpu s77336 r8192 d29160 u114688 [ 0.000000] pcpu-alloc: s77336 r8192 d29160 u114688 alloc=28*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected PIPT I-cache on CPU0 [ 0.000000] CPU features: detected: Spectre-v2 [ 0.000000] CPU features: detected: Spectre-v3a [ 0.000000] CPU features: detected: Spectre-v4 [ 0.000000] CPU features: detected: Spectre-BHB [ 0.000000] CPU features: kernel page table isolation forced ON by KASLR [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI) [ 0.000000] CPU features: detected: ARM erratum 1742098 [ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 951552 [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:7D:A2:9B vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=82b0393a-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles [ 0.000000] Unknown kernel command line parameters "splash", will be passed to user space. [ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear) [ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] software IO TLB: mapped [mem 0x0000000016c00000-0x000000001ac00000] (64MB) [ 0.000000] Memory: 3374040K/3866624K available (11520K kernel code, 1956K rwdata, 4148K rodata, 3840K init, 975K bss, 164904K reserved, 327680K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 38059 entries in 149 pages [ 0.000000] ftrace: allocated 149 pages with 4 groups [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] Root IRQ handler: gic_handle_irq [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 10) [ 0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns [ 0.000000] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns [ 0.000344] Console: colour dummy device 80x25 [ 0.000396] printk: console [tty1] enabled [ 0.000458] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000) [ 0.000484] pid_max: default: 32768 minimum: 301 [ 0.000628] LSM: Security Framework initializing [ 0.000860] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.000930] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.002228] cgroup: Disabling memory control group subsystem [ 0.005129] rcu: Hierarchical SRCU implementation. [ 0.006282] EFI services will not be available. [ 0.006818] smp: Bringing up secondary CPUs ... [ 0.007933] Detected PIPT I-cache on CPU1 [ 0.008020] CPU1: Booted secondary processor 0x0000000001 [0x410fd083] [ 0.009228] Detected PIPT I-cache on CPU2 [ 0.009280] CPU2: Booted secondary processor 0x0000000002 [0x410fd083] [ 0.010448] Detected PIPT I-cache on CPU3 [ 0.010497] CPU3: Booted secondary processor 0x0000000003 [0x410fd083] [ 0.010649] smp: Brought up 1 node, 4 CPUs [ 0.010672] SMP: Total of 4 processors activated. [ 0.010684] CPU features: detected: 32-bit EL0 Support [ 0.010695] CPU features: detected: 32-bit EL1 Support [ 0.010707] CPU features: detected: CRC32 instructions [ 0.043579] CPU: All CPU(s) started at EL2 [ 0.043658] alternatives: patching kernel code [ 0.045336] devtmpfs: initialized [ 0.056453] Enabled cp15_barrier support [ 0.056506] Enabled setend support [ 0.056535] KASLR enabled [ 0.056739] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.056775] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.066068] pinctrl core: initialized pinctrl subsystem [ 0.066899] DMI not present or invalid. [ 0.067599] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.071443] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations [ 0.071748] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.072703] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.072806] audit: initializing netlink subsys (disabled) [ 0.073102] audit: type=2000 audit(0.072:1): state=initialized audit_enabled=0 res=1 [ 0.073668] thermal_sys: Registered thermal governor 'step_wise' [ 0.073977] cpuidle: using governor menu [ 0.074326] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.074529] ASID allocator initialised with 32768 entries [ 0.074703] Serial: AMBA PL011 UART driver [ 0.087955] bcm2835-mbox fe00b880.mailbox: mailbox enabled [ 0.112420] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-10-26T11:09:05, variant start [ 0.116432] raspberrypi-firmware soc:firmware: Firmware hash is c72ad6b26ff40c91ef776b847436094ee63fabee [ 0.167407] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1 [ 0.171646] vgaarb: loaded [ 0.172065] SCSI subsystem initialized [ 0.172287] usbcore: registered new interface driver usbfs [ 0.172340] usbcore: registered new interface driver hub [ 0.172417] usbcore: registered new device driver usb [ 0.172885] usb_phy_generic phy: supply vcc not found, using dummy regulator [ 0.173085] usb_phy_generic phy: dummy supplies not allowed for exclusive requests [ 0.173391] pps_core: LinuxPPS API ver. 1 registered [ 0.173404] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [ 0.173427] PTP clock support registered [ 0.174978] clocksource: Switched to clocksource arch_sys_counter [ 0.263580] VFS: Disk quotas dquot_6.6.0 [ 0.263701] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.263873] FS-Cache: Loaded [ 0.264125] CacheFiles: Loaded [ 0.265475] simple-framebuffer 3e3cf000.framebuffer: framebuffer at 0x3e3cf000, 0x7f8000 bytes [ 0.265494] simple-framebuffer 3e3cf000.framebuffer: format=a8r8g8b8, mode=1920x1080x32, linelength=7680 [ 0.265998] Console: switching to colour frame buffer device 240x67 [ 0.277444] simple-framebuffer 3e3cf000.framebuffer: fb0: simplefb registered! [ 0.288006] NET: Registered PF_INET protocol family [ 0.288541] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.292061] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear) [ 0.292125] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.292151] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.292390] TCP bind hash table entries: 32768 (order: 7, 524288 bytes, linear) [ 0.292956] TCP: Hash tables configured (established 32768 bind 32768) [ 0.293202] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear) [ 0.293284] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear) [ 0.293624] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.294716] RPC: Registered named UNIX socket transport module. [ 0.294735] RPC: Registered udp transport module. [ 0.294746] RPC: Registered tcp transport module. [ 0.294757] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.294779] PCI: CLS 0 bytes, default 64 [ 0.297682] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available [ 0.298034] kvm [1]: IPA Size Limit: 44 bits [ 0.299252] kvm [1]: vgic interrupt IRQ9 [ 0.299519] kvm [1]: Hyp mode initialized successfully [ 1.158614] Initialise system trusted keyrings [ 1.159087] workingset: timestamp_bits=46 max_order=20 bucket_order=0 [ 1.165908] zbud: loaded [ 1.167821] FS-Cache: Netfs 'nfs' registered for caching [ 1.168514] NFS: Registering the id_resolver key type [ 1.168558] Key type id_resolver registered [ 1.168569] Key type id_legacy registered [ 1.168678] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.168691] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 1.169911] Key type asymmetric registered [ 1.169927] Asymmetric key parser 'x509' registered [ 1.170011] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247) [ 1.170281] io scheduler mq-deadline registered [ 1.170294] io scheduler kyber registered [ 1.178947] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges: [ 1.179025] brcm-pcie fd500000.pcie: No bus range found for /scb/pcie@7d500000, using [bus 00-ff] [ 1.179115] brcm-pcie fd500000.pcie: MEM 0x0600000000..0x063fffffff -> 0x00c0000000 [ 1.179199] brcm-pcie fd500000.pcie: IB MEM 0x0000000000..0x00bfffffff -> 0x0400000000 [ 1.229076] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC) [ 1.229478] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00 [ 1.229497] pci_bus 0000:00: root bus resource [bus 00-ff] [ 1.229516] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff]) [ 1.229604] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400 [ 1.229860] pci 0000:00:00.0: PME# supported from D0 D3hot [ 1.234033] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330 [ 1.234159] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit] [ 1.234654] pci 0000:01:00.0: PME# supported from D0 D3cold [ 1.250504] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff] [ 1.250532] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit] [ 1.250573] pci 0000:00:00.0: PCI bridge to [bus 01] [ 1.250595] pci 0000:00:00.0: bridge window [mem 0x600000000-0x6000fffff] [ 1.263082] iproc-rng200 fe104000.rng: hwrng registered [ 1.263580] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB) [ 1.265081] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000 [ 1.277887] brd: module loaded [ 1.287639] loop: module loaded [ 1.288438] Loading iSCSI transport class v2.0-870. [ 1.293596] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000 [ 1.351136] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus [ 1.352304] usbcore: registered new interface driver r8152 [ 1.352370] usbcore: registered new interface driver lan78xx [ 1.352422] usbcore: registered new interface driver smsc95xx [ 1.354039] pci 0000:00:00.0: enabling device (0000 -> 0002) [ 1.354078] xhci_hcd 0000:01:00.0: enabling device (0000 -> 0002) [ 1.354188] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 1.354219] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1 [ 1.355003] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000740000000890 [ 1.355661] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 1.355684] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2 [ 1.355706] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed [ 1.356069] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15 [ 1.356089] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.356105] usb usb1: Product: xHCI Host Controller [ 1.356118] usb usb1: Manufacturer: Linux 5.15.76-v8+ xhci-hcd [ 1.356131] usb usb1: SerialNumber: 0000:01:00.0 [ 1.356862] hub 1-0:1.0: USB hub found [ 1.356933] hub 1-0:1.0: 1 port detected [ 1.357925] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15 [ 1.357946] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.357961] usb usb2: Product: xHCI Host Controller [ 1.357973] usb usb2: Manufacturer: Linux 5.15.76-v8+ xhci-hcd [ 1.357985] usb usb2: SerialNumber: 0000:01:00.0 [ 1.358632] hub 2-0:1.0: USB hub found [ 1.358718] hub 2-0:1.0: 4 ports detected [ 1.360480] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 1.360805] dwc_otg: FIQ enabled [ 1.360816] dwc_otg: NAK holdoff enabled [ 1.360826] dwc_otg: FIQ split-transaction FSM enabled [ 1.360839] Module dwc_common_port init [ 1.361418] usbcore: registered new interface driver uas [ 1.361532] usbcore: registered new interface driver usb-storage [ 1.361748] mousedev: PS/2 mouse device common for all mice [ 1.367156] sdhci: Secure Digital Host Controller Interface driver [ 1.367177] sdhci: Copyright(c) Pierre Ossman [ 1.367834] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.371507] ledtrig-cpu: registered to indicate activity on CPUs [ 1.372097] hid: raw HID events driver (C) Jiri Kosina [ 1.372264] usbcore: registered new interface driver usbhid [ 1.372277] usbhid: USB HID core driver [ 1.372601] ashmem: initialized [ 1.381261] NET: Registered PF_PACKET protocol family [ 1.381397] Key type dns_resolver registered [ 1.383061] registered taskstats version 1 [ 1.383123] Loading compiled-in X.509 certificates [ 1.383830] Key type ._fscrypt registered [ 1.383844] Key type .fscrypt registered [ 1.383854] Key type fscrypt-provisioning registered [ 1.395784] uart-pl011 fe201000.serial: there is not valid maps for state default [ 1.396095] uart-pl011 fe201000.serial: cts_event_workaround enabled [ 1.396274] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 19, base_baud = 0) is a PL011 rev2 [ 1.405297] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer [ 1.405782] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver [ 1.407019] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0 [ 1.407037] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated [ 1.434843] of_cfs_init [ 1.435048] of_cfs_init: OK [ 1.472485] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA [ 1.472831] Waiting for root device PARTUUID=82b0393a-02... [ 1.539992] mmc1: new high speed SDIO card at address 0001 [ 1.572133] mmc0: new ultra high speed DDR50 SDXC card at address 0001 [ 1.573168] mmcblk0: mmc0:0001 JC2RT 59.6 GiB [ 1.576531] mmcblk0: p1 p2 [ 1.577140] mmcblk0: mmc0:0001 JC2RT 59.6 GiB [ 1.597044] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none. [ 1.597162] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 1.598002] devtmpfs: mounted [ 1.606095] Freeing unused kernel memory: 3840K [ 1.607204] Run /sbin/init as init process [ 1.607219] with arguments: [ 1.607228] /sbin/init [ 1.607237] splash [ 1.607247] with environment: [ 1.607256] HOME=/ [ 1.607265] TERM=linux [ 1.611047] usb 1-1: new high-speed USB device number 2 using xhci_hcd [ 1.761627] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21 [ 1.761662] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 1.761677] usb 1-1: Product: USB2.0 Hub [ 1.764043] hub 1-1:1.0: USB hub found [ 1.764380] hub 1-1:1.0: 4 ports detected [ 1.929252] systemd[1]: System time before build time, advancing clock. [ 2.059046] usb 1-1.4: new full-speed USB device number 3 using xhci_hcd [ 2.120743] NET: Registered PF_INET6 protocol family [ 2.122602] Segment Routing with IPv6 [ 2.122648] In-situ OAM (IOAM) with IPv6 [ 2.167225] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=24.11 [ 2.167263] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 2.167281] usb 1-1.4: Product: USB Receiver [ 2.167295] usb 1-1.4: Manufacturer: Logitech [ 2.179401] input: Logitech USB Receiver as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C52B.0001/input/input0 [ 2.198675] systemd[1]: systemd 247.3-7+rpi1+deb11u1 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified) [ 2.199741] systemd[1]: Detected architecture arm64. [ 2.201865] systemd[1]: Set hostname to . [ 2.243998] hid-generic 0003:046D:C52B.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:01:00.0-1.4/input0 [ 2.254377] input: Logitech USB Receiver Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:046D:C52B.0002/input/input1 [ 2.254943] input: Logitech USB Receiver Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:046D:C52B.0002/input/input2 [ 2.315572] input: Logitech USB Receiver System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:046D:C52B.0002/input/input3 [ 2.316219] hid-generic 0003:046D:C52B.0002: input,hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:01:00.0-1.4/input1 [ 2.324906] hid-generic 0003:046D:C52B.0003: hiddev97,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:01:00.0-1.4/input2 [ 2.913977] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed. [ 3.113521] systemd[1]: Queued start job for default target Graphical Interface. [ 3.119571] systemd[1]: Created slice system-getty.slice. [ 3.121085] systemd[1]: Created slice system-modprobe.slice. [ 3.122185] systemd[1]: Created slice system-systemd\x2dfsck.slice. [ 3.123152] systemd[1]: Created slice User and Session Slice. [ 3.123813] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 3.125218] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point. [ 3.125955] systemd[1]: Reached target Slices. [ 3.126216] systemd[1]: Reached target Swap. [ 3.127518] systemd[1]: Listening on Syslog Socket. [ 3.128354] systemd[1]: Listening on fsck to fsckd communication Socket. [ 3.128811] systemd[1]: Listening on initctl Compatibility Named Pipe. [ 3.130192] systemd[1]: Listening on Journal Audit Socket. [ 3.131136] systemd[1]: Listening on Journal Socket (/dev/log). [ 3.132290] systemd[1]: Listening on Journal Socket. [ 3.133453] systemd[1]: Listening on udev Control Socket. [ 3.134347] systemd[1]: Listening on udev Kernel Socket. [ 3.135553] systemd[1]: Condition check resulted in Huge Pages File System being skipped. [ 3.140409] systemd[1]: Mounting POSIX Message Queue File System... [ 3.145104] systemd[1]: Mounting RPC Pipe File System... [ 3.150752] systemd[1]: Mounting Kernel Debug File System... [ 3.156436] systemd[1]: Mounting Kernel Trace File System... [ 3.157055] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped. [ 3.164351] systemd[1]: Starting Restore / save the current clock... [ 3.169875] systemd[1]: Starting Set the console keyboard layout... [ 3.175819] systemd[1]: Starting Create list of static device nodes for the current kernel... [ 3.181875] systemd[1]: Starting Load Kernel Module configfs... [ 3.188161] systemd[1]: Starting Load Kernel Module drm... [ 3.194147] systemd[1]: Starting Load Kernel Module fuse... [ 3.200216] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped. [ 3.205514] systemd[1]: Starting File System Check on Root Device... [ 3.216476] systemd[1]: Starting Journal Service... [ 3.225494] systemd[1]: Starting Load Kernel Modules... [ 3.232045] systemd[1]: Starting Coldplug All udev Devices... [ 3.253818] systemd[1]: Mounted POSIX Message Queue File System. [ 3.254910] systemd[1]: Mounted RPC Pipe File System. [ 3.256236] systemd[1]: Mounted Kernel Debug File System. [ 3.257394] systemd[1]: Mounted Kernel Trace File System. [ 3.259946] systemd[1]: Finished Restore / save the current clock. [ 3.263455] systemd[1]: Finished Create list of static device nodes for the current kernel. [ 3.265865] systemd[1]: modprobe@configfs.service: Succeeded. [ 3.267707] systemd[1]: Finished Load Kernel Module configfs. [ 3.286917] systemd[1]: Mounting Kernel Configuration File System... [ 3.308017] systemd[1]: Started File System Check Daemon to report status. [ 3.322602] systemd[1]: Mounted Kernel Configuration File System. [ 3.333512] fuse: init (API version 7.34) [ 3.341354] i2c_dev: i2c /dev entries driver [ 3.344062] systemd[1]: modprobe@fuse.service: Succeeded. [ 3.345869] systemd[1]: Finished Load Kernel Module fuse. [ 3.361761] systemd[1]: Mounting FUSE Control File System... [ 3.365163] systemd[1]: Finished Load Kernel Modules. [ 3.377574] systemd[1]: Starting Apply Kernel Variables... [ 3.411810] systemd[1]: Mounted FUSE Control File System. [ 3.457816] systemd[1]: Finished Apply Kernel Variables. [ 3.480104] systemd[1]: modprobe@drm.service: Succeeded. [ 3.481704] systemd[1]: Finished Load Kernel Module drm. [ 3.544245] systemd[1]: Finished File System Check on Root Device. [ 3.549731] systemd[1]: Starting Remount Root and Kernel File Systems... [ 3.563757] systemd[1]: Started Journal Service. [ 3.705414] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null). Quota mode: none. [ 3.784827] systemd-journald[141]: Received client request to flush runtime journal. [ 3.802195] systemd-journald[141]: File /var/log/journal/b8a56e8dea714af7a468ac4d823ae9f7/system.journal corrupted or uncleanly shut down, renaming and replacing. [ 4.972321] gpio-fan gpio-fan@0: GPIO fan initialized [ 5.146090] mc: Linux media interface: v0.10 [ 5.262072] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned. [ 5.284259] bcm2835_vc_sm_cma_probe: Videocore shared memory driver [ 5.284302] [vc_sm_connected_init]: start [ 5.314648] [vc_sm_connected_init]: installed successfully [ 5.406659] videodev: Linux video capture interface: v2.00 [ 5.445597] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode [ 5.450016] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode [ 5.460323] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0 [ 5.521396] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 5.526047] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 5.544871] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned. [ 5.549787] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned. [ 5.555424] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. [ 5.563502] rpivid feb10000.codec: Device registered as /dev/video19 [ 5.567318] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13 [ 5.567952] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14 [ 5.568427] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15 [ 5.568845] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16 [ 5.568887] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 5.568926] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 5.568945] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 5.568961] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 5.586678] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [ 5.641108] bcm2835_audio bcm2835_audio: card created with 8 channels [ 5.675009] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20 [ 5.690749] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned. [ 5.697645] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21 [ 5.699481] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22 [ 5.700051] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23 [ 5.700086] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 5.700110] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 5.700128] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 5.700145] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 5.700480] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp [ 5.939908] bcm2835-codec bcm2835-codec: Device registered as /dev/video10 [ 5.939998] bcm2835-codec bcm2835-codec: Loaded V4L2 decode [ 5.947692] bcm2835-codec bcm2835-codec: Device registered as /dev/video11 [ 5.947762] bcm2835-codec bcm2835-codec: Loaded V4L2 encode [ 5.964648] bcm2835-codec bcm2835-codec: Device registered as /dev/video12 [ 5.964710] bcm2835-codec bcm2835-codec: Loaded V4L2 isp [ 5.983150] bcm2835-codec bcm2835-codec: Device registered as /dev/video18 [ 5.983228] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx [ 6.009104] bcm2835-codec bcm2835-codec: Device registered as /dev/video31 [ 6.009169] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image [ 6.782793] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 6.838429] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 6.851624] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid [ 6.918183] checking generic (3e3cf000 7f8000) vs hw (0 ffffffffffffffff) [ 6.918222] fb0: switching to vc4 from simple [ 7.003170] Console: switching to colour dummy device 80x25 [ 7.035891] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4]) [ 7.060514] Registered IR keymap rc-cec [ 7.105264] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0 [ 7.164266] brcmfmac: F1 signature read @0x18000000=0x15264345 [ 7.173697] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 7.287469] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input5 [ 7.302227] usbcore: registered new interface driver brcmfmac [ 7.433562] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 7.439604] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60 [ 7.657514] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4]) [ 7.667633] Registered IR keymap rc-cec [ 7.734104] rc rc1: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1 [ 7.826814] input: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input6 [ 7.990340] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4]) [ 7.990869] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4]) [ 7.991610] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 7.992013] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 7.992378] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 7.992665] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 7.993013] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 8.020832] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1 [ 8.149430] Console: switching to colour frame buffer device 240x67 [ 8.149493] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device [ 8.522540] uart-pl011 fe201000.serial: no DMA platform data [ 8.725451] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS [ 8.746170] logitech-djreceiver 0003:046D:C52B.0003: hiddev96,hidraw0: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:01:00.0-1.4/input2 [ 8.871457] input: Logitech Wireless Device PID:404d Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:046D:C52B.0003/0003:046D:404D.0004/input/input7 [ 8.872846] input: Logitech Wireless Device PID:404d Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:046D:C52B.0003/0003:046D:404D.0004/input/input8 [ 8.873530] hid-generic 0003:046D:404D.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech Wireless Device PID:404d] on usb-0000:01:00.0-1.4/input2:1 [ 8.935699] input: Logitech Wireless Device PID:4009 Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:046D:C52B.0003/0003:046D:4009.0005/input/input12 [ 8.943229] hid-generic 0003:046D:4009.0005: input,hidraw2: USB HID v1.11 Mouse [Logitech Wireless Device PID:4009] on usb-0000:01:00.0-1.4/input2:2 [ 9.578530] 8021q: 802.1Q VLAN Support v1.8 [ 9.923440] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled [ 10.058887] input: Logitech K400 Plus as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:046D:C52B.0003/0003:046D:404D.0004/input/input16 [ 10.064596] logitech-hidpp-device 0003:046D:404D.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech K400 Plus] on usb-0000:01:00.0-1.4/input2:1 [ 10.119526] input: Logitech M315/M235 as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:046D:C52B.0003/0003:046D:4009.0005/input/input17 [ 10.120215] logitech-hidpp-device 0003:046D:4009.0005: input,hidraw2: USB HID v1.11 Mouse [Logitech M315/M235] on usb-0000:01:00.0-1.4/input2:2 [ 10.128982] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay) [ 10.130383] bcmgenet fd580000.ethernet eth0: Link is Down [ 14.309826] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 [ 14.309907] MAI: soc_pcm_open() failed (-19) [ 14.310834] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 [ 14.310911] MAI: soc_pcm_open() failed (-19) [ 14.312140] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 [ 14.312211] MAI: soc_pcm_open() failed (-19) [ 14.321530] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 [ 14.321593] MAI: soc_pcm_open() failed (-19) [ 14.321941] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 [ 14.321982] MAI: soc_pcm_open() failed (-19) [ 14.322340] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19 [ 14.322391] MAI: soc_pcm_open() failed (-19) [ 15.279575] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 16.228635] Bluetooth: Core ver 2.22 [ 16.228741] NET: Registered PF_BLUETOOTH protocol family [ 16.228747] Bluetooth: HCI device and connection manager initialized [ 16.228764] Bluetooth: HCI socket layer initialized [ 16.228772] Bluetooth: L2CAP socket layer initialized [ 16.228791] Bluetooth: SCO socket layer initialized [ 16.241774] Bluetooth: HCI UART driver ver 2.3 [ 16.241798] Bluetooth: HCI UART protocol H4 registered [ 16.241869] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 16.242054] Bluetooth: HCI UART protocol Broadcom registered [ 16.721251] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 16.721273] Bluetooth: BNEP filters: protocol multicast [ 16.721288] Bluetooth: BNEP socket layer initialized [ 16.742755] NET: Registered PF_ALG protocol family [ 16.932436] Bluetooth: RFCOMM TTY layer initialized [ 16.932475] Bluetooth: RFCOMM socket layer initialized [ 16.932508] Bluetooth: RFCOMM ver 1.11 [ 17.119152] ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net.ipv6.neigh.wlan0.retrans_time - use net.ipv6.neigh.wlan0.retrans_time_ms instead [ 31.711049] cam-dummy-reg: disabling ```

Additional context

config.txt ``` # For more options and information see # http://rpf.io/configtxt # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output #hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable infrared communication. #dtoverlay=gpio-ir,gpio_pin=17 #dtoverlay=gpio-ir-tx,gpio_pin=18 # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on # Automatically load overlays for detected cameras camera_auto_detect=1 # Automatically load overlays for detected DSI displays display_auto_detect=1 # Enable DRM VC4 V3D driver dtoverlay=vc4-kms-v3d max_framebuffers=2 # Disable compensation for displays with overscan disable_overscan=1 [cm4] # Enable host mode on the 2711 built-in XHCI USB controller. # This line should be removed if the legacy DWC2 controller is required # (e.g. for USB device mode) or if USB support is not required. otg_mode=1 [all] [pi4] # Run as fast as firmware / board allows arm_boost=1 [all] gpu_mem=256 [all] dtoverlay=gpio-fan,gpiopin=14,temp=75000 [pi4] arm_64bit=1 hdmi_enable_4kp60=1 ```

Related: documentation/#2699

6by9 commented 2 years ago

It's not a function that the kernel driver should undertake (it was the firmware under legacy and vc4-fkms-v3d). libcec should be able to do that for you though - IIRC Kodi makes use of it in that way. I can't recall if you need to setup udev rules or not.

cihlarma commented 2 years ago

Where in the userspace should this be implemented then? Should this be done by the graphical environment, or perhaps by a script run as a service by systemd at boot?

popcornmix commented 2 years ago

I'd recommend cec-ctl rather than libcec (which is largely unmaintained).

Jibun-no-Kage commented 2 years ago

Odd thing about cec-ctl there are times if does not seem to work. For example, I have a Vizio TV that just seems to refuse to work with cec-ctl but works fine with libcec, i.e. cec-client. Makes no sense but true.

SteelQuantum commented 10 months ago

I'd recommend cec-ctl rather than libcec (which is largely unmaintained).

Thank you for that tip. I tried, but unfortunately I didn't get cec-ctl working either. It seems to have similar types of problems that I have in cec-client now.

I'm new here, and it's possible that I just haven't realized some basic things that I should know. Also I may have posted this to a wrong place - please notice me if so. Anyway I have searched the forums a lot and tested everything quite patiently.

I have been reading these discussions here and in Raspberry Pi forum to get a solution to a problem with libcec with Full KMS. It really seems to me like that, when I switch from kms to fake kms (fkms) in /boot/config.txt, cec-client works with absolutely no errors, just like it's supposed according to the manual. I have understood that probably libcec isn't just working well with Full KMS, but what about cec-ctl?

When Full kms is enabled, cec-client first seems to communicate with the TV: It wakes up with 'on 0' and switches the active source from the TV cable broadcast to the Raspberry Pi with 'as'. But when I switch the TV with its own remote control to another HDMI or to any other source, CEC seems mess up. After that the communication with the TV fails, and will not recover to the original.

My LG television uses CEC version 1.3a, so it might be also a compatibility problem with the versions. But it still works with the Fake KMS, so there's still something different in CEC functionality between the Fake and the Full KMS. And 1.3a isn't really so old, is it? :) I'd like to test this with a TV that supports CEC 2.0 later. My goal is to get this working with new and old televisions, so trying TV with the CEC 2.0 support wouldn't be the solution, but just a part of the troubleshooting.

Cec-client with Full KMS:

When switching the TV to another HDMI from the TV itself, cec-client immediately prints out this: 'DEBUG: [ 48301] changing physical address to FFFF DEBUG: [ 48301] SetDevicePhysicalAddress - not setting invalid physical address ffff'

'scan' command shows that the TV's power status has changed from 'on' to 'unknown', and it also shows up in the cec output: TV (0): power status changed from 'on' to 'unknown'

After that I try to switch the Raspberry Pi to the active source with 'as', cec-client starts flooding these messages eternally: DEBUG: [ 340915] TransmitImageViewOn - 'image view on' already sent NOTICE: [ 340915] << Recorder 1 (1) -> broadcast (F): active source (1000) TRAFFIC: [ 340915] << 1f:82:10:00 ERROR: [ 340915] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64 TRAFFIC: [ 340915] << 1f:82:10:00 ERROR: [ 340915] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64 DEBUG: [ 340915] failed to make 'Recorder 1' the active source. will retry later DEBUG: [ 341915] TransmitImageViewOn - 'image view on' already sent

After that has happened, the game is over: I can switch the TV manually to the Raspberry Pi's HDMI input, so that cec-client calms down. I can also still switch the tv on with 'on 0'. But the problem is that, 'as' command is not working anymore.

Cec-ctl with Full KMS

I found your reply that cec-ctl is not using libcec, which is probably in the center of this problem, so of course I gave it an opportunity: sudo cec-ctl -d/dev/cec0 --playback -S --cec-version-1.4 Shows the topology 'almost' correctly, and shows that the TV is on. I have also tested the same with cec 2.0, but there was no change. This is the only point in the outcome that shows something incorrect: CEC Version : Tx, OK, Rx, Timeout Physical Address : Tx, OK, Rx, Timeout

sudo cec-ctl -d/dev/cec0 --to 0 --image-view-on --cec-version-1.4 This wakes the TV up, at least on the second try.

sudo cec-ctl -d/dev/cec0 --to 0 --active-source phys-addr=1.0.0.0 --cec-version-1.4 This doesn't do anything. Also there's two things wrong in the outprint: 1) Physical Address : f.f.f.f 2) Logical Address : Not Allocated

Here's some information on my Raspberry Pi 3 Model B:

$ uname -a Linux rpi3 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

$ cat /etc/rpi-issue Raspberry Pi reference 2023-12-05 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 446f3e34c8ceb33dfe7bd38578f1cd6b6afe19da, stage2

$ vcgencmd version Mar 17 2023 10:52:42 Copyright (c) 2012 Broadcom version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start)

I'd be grateful for any help.

popcornmix commented 10 months ago

I might be tempted to add: vc4.force_hotplug=1 (assuming you are using first hdmi port - HDMI_A_0) to cmdline.txt (on same line). Reboot and see if anything is different.

But this is just a guess.

SteelQuantum commented 10 months ago

I might be tempted to add: vc4.force_hotplug=1 (assuming you are using first hdmi port - HDMI_A_0) to cmdline.txt (on same line). Reboot and see if anything is different.

But this is just a guess.

Thank you so much! That was the solution.

Cec-client is now working properly and switches the source rapidly by the command to the Raspberry Pi from any other source.

For some reason, cec-ctl is not working, but that's not a problem anymore. I'll go with cec-client or libcec-python.