raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.15k stars 1.68k forks source link

dtparam settings for power led no longer function since upgrade to `5.15.56-v7+ #1575`, RPi 3B+ #1742

Closed seamusdemora closed 2 years ago

seamusdemora commented 2 years ago

Is this the right place for my bug report? This repository contains the GPU firmware used on the Raspberry Pi. This software is the closed source part of the Raspberry Pi system, it includes booting (including network booting and USB booting), low-level power and clock control, FKMS and legacy HDMI control (not full KMS that is in the linux kernel), hardware legacy codecs (MPEG2, H264 and VC1), encode hardware including the ISP (image sensor pipeline) and camera control, audio output (analogue and HDMI audio).

If you believe that the issue you are seeing is within this area, this is the right place. If not, we have other repositories for the linux kernel at github.com/raspberrypi/linux and Raspberry Pi userland applications at github.com/raspberrypi/userland. If you have problems with the Raspbian distribution packages, report them in the github.com/RPi-Distro/repo. If you simply have a question, then the Raspberry Pi forums are the best place to ask it.

Describe the bug Prior to a recent upgrade that resulted in a kernel update to 5.15.56-v7+ #1575, the power led could be extinguished using the following lines in /boot/config.txt. Since this upgrade, these dtparam settings seem to have no effect:

dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off

To reproduce List the steps required to reproduce the issue.

Restore the firmware prior to the current version, and the power led stays OFF.

Expected behaviour Add a clear and concise description of what you expected to happen.

Power LED remains OFF after boot

Actual behaviour Add a clear and concise description of what actually happened.

Power LED remains ON after boot

System Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:

System Information

Raspberry Pi 3 Model B Plus Rev 1.3 PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)"

Raspberry Pi reference 2021-10-30 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 288b21fc27e128ea6b330777aca68e0061ebf4fe, stage2

Linux raspberrypi3b 5.15.56-v7+ #1575 SMP Fri Jul 22 20:28:11 BST 2022 armv7l GNU/Linux Revision : a020d3 Serial : 00000000eccd2fff Model : Raspberry Pi 3 Model B Plus Rev 1.3 Throttled flag : throttled=0x0 Camera : supported=0 detected=0, libcamera interfaces=0

Videocore information

Aug 9 2022 13:46:06 Copyright (c) 2012 Broadcom version 273b410636cf8854ca35af91fd738a3d5f8b39b6 (clean) (release) (start)

alloc failures: 0 compactions: 0 legacy block fails: 0

Filesystem information

Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 30395256 1862420 27266484 7% / devtmpfs 340548 0 340548 0% /dev tmpfs 472132 0 472132 0% /dev/shm tmpfs 188856 720 188136 1% /run tmpfs 5120 4 5116 1% /run/lock /dev/mmcblk0p1 258095 51553 206543 20% /boot //NetgearNAS-3/backup 11645104480 2073444956 9521659524 18% /mnt/NetgearNAS-3/backup //SynologyNAS-1/backups 28107205512 1392017716 26715187796 5% /mnt/SynologyNAS/backups //SynologyNAS-1/rpi_share 28107205512 1392017716 26715187796 5% /mnt/SynologyNAS/rpi_share tmpfs 94424 0 94424 0% /run/user/1000

Filename Type Size Used Priority /var/swap file 102396 1792 -2

Package version information

raspberrypi-ui-mods: Installed: (none) raspberrypi-sys-mods: Installed: 20220224 openbox: Installed: (none) lxpanel: Installed: (none) pcmanfm: Installed: (none) rpd-plym-splash: Installed: (none)

Networking Information

eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether m.m.m.m txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet x.x.x.x netmask x.x.x.x inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 10 bytes 1612 (1.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 10 bytes 1612 (1.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet x.x.x.x netmask x.x.x.x broadcast x.x.x.x inet6 y::y.y.y.y prefixlen 64 scopeid 0x20 ether m.m.m.m txqueuelen 1000 (Ethernet) RX packets 4438705 bytes 869583488 (829.2 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 714845 bytes 749886633 (715.1 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

USB Information

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M | Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M | Port 1: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=lan78xx, 480M

config.txt

aphy_params_current=819 arm_freq=1400 arm_freq_min=600 audio_pwm_mode=514 camera_auto_detect=1 config_hdmi_boost=5 core_freq=400 desired_osc_freq=0x331df0 desired_osc_freq_boost=0x3c45b0 disable_commandline_tags=2 disable_l2cache=1 disable_overscan=1 display_auto_detect=1 display_hdmi_rotate=-1 display_lcd_rotate=-1 dphy_params_current=547 dvfs=3 enable_tvout=1 force_eeprom_read=1 force_pwm_open=1 framebuffer_ignore_alpha=1 framebuffer_swap=1 gpu_freq=300 init_uart_clock=0x2dc6c00 lcd_framerate=60 mask_gpu_interrupt0=3072 mask_gpu_interrupt1=26370 max_framebuffers=2 over_voltage_avs=0x186a0 over_voltage_avs_boost=0x30d40 pause_burst_frames=1 program_serial_random=1 sdram_freq=450 total_mem=1024 hdmi_force_cec_address:0=65535 hdmi_force_cec_address:1=65535 hdmi_pixel_freq_limit:0=0x9a7ec80 device_tree=- overlay_prefix=overlays/ hdmi_cvt:0= hdmi_cvt:1= hdmi_edid_filename:0= hdmi_edid_filename:1= hdmi_timings:0= hdmi_timings:1=

cmdline.txt

coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=Composite-1:720x480@60i vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=00f24f4c-02 rootfstype=ext4 fsck.repair=yes rootwait

raspi-gpio settings

BANK0 (GPIO 0 to 27): GPIO 0: level=1 fsel=0 func=INPUT GPIO 1: level=1 fsel=0 func=INPUT GPIO 2: level=1 fsel=4 alt=0 func=SDA1 GPIO 3: level=1 fsel=4 alt=0 func=SCL1 GPIO 4: level=1 fsel=0 func=INPUT GPIO 5: level=1 fsel=0 func=INPUT GPIO 6: level=1 fsel=0 func=INPUT GPIO 7: level=1 fsel=0 func=INPUT GPIO 8: level=1 fsel=0 func=INPUT GPIO 9: level=0 fsel=0 func=INPUT GPIO 10: level=0 fsel=0 func=INPUT GPIO 11: level=0 fsel=0 func=INPUT GPIO 12: level=0 fsel=0 func=INPUT GPIO 13: level=0 fsel=0 func=INPUT GPIO 14: level=0 fsel=0 func=INPUT GPIO 15: level=1 fsel=0 func=INPUT GPIO 16: level=0 fsel=0 func=INPUT GPIO 17: level=0 fsel=0 func=INPUT GPIO 18: level=0 fsel=0 func=INPUT GPIO 19: level=0 fsel=0 func=INPUT GPIO 20: level=0 fsel=0 func=INPUT GPIO 21: level=0 fsel=0 func=INPUT GPIO 22: level=0 fsel=0 func=INPUT GPIO 23: level=0 fsel=0 func=INPUT GPIO 24: level=0 fsel=0 func=INPUT GPIO 25: level=1 fsel=1 func=OUTPUT GPIO 26: level=0 fsel=0 func=INPUT GPIO 27: level=0 fsel=0 func=INPUT BANK1 (GPIO 28 to 45): GPIO 28: level=1 fsel=0 func=INPUT GPIO 29: level=0 fsel=1 func=OUTPUT GPIO 30: level=0 fsel=7 alt=3 func=CTS0 GPIO 31: level=0 fsel=7 alt=3 func=RTS0 GPIO 32: level=1 fsel=7 alt=3 func=TXD0 GPIO 33: level=1 fsel=7 alt=3 func=RXD0 GPIO 34: level=1 fsel=7 alt=3 func=SD1_CLK GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0 GPIO 37: level=1 fsel=7 alt=3 func=SD1_DAT1 GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2 GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3 GPIO 40: level=0 fsel=4 alt=0 func=PWM0 GPIO 41: level=0 fsel=4 alt=0 func=PWM1 GPIO 42: level=1 fsel=4 alt=0 func=GPCLK1 GPIO 43: level=1 fsel=4 alt=0 func=GPCLK2 GPIO 44: level=1 fsel=0 func=INPUT GPIO 45: level=1 fsel=0 func=INPUT BANK2 (GPIO 46 to 53): GPIO 46: level=1 fsel=0 func=INPUT GPIO 47: level=1 fsel=1 func=OUTPUT GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK GPIO 49: level=1 fsel=4 alt=0 func=SD0_CMD GPIO 50: level=1 fsel=4 alt=0 func=SD0_DAT0 GPIO 51: level=1 fsel=4 alt=0 func=SD0_DAT1 GPIO 52: level=1 fsel=4 alt=0 func=SD0_DAT2 GPIO 53: level=1 fsel=4 alt=0 func=SD0_DAT3

vcdbg log messages

Failed to allocate -201253077 bytes for message buffer

dmesg log

[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.15.56-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1575 SMP Fri Jul 22 20:28:11 BST 2022 [ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3 [ 0.000000] random: crng init done [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] Reserved memory: created CMA memory pool at 0x1ec00000, size 256 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003b3fffff] [ 0.000000] percpu: Embedded 16 pages/cpu s35724 r8192 d21620 u65536 [ 0.000000] pcpu-alloc: s35724 r8192 d21620 u65536 alloc=16*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 240555 [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=Composite-1:720x480@60i vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=00f24f4c-02 rootfstype=ext4 fsck.repair=yes rootwait [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 681100K/970752K available (10240K kernel code, 1336K rwdata, 3076K rodata, 1024K init, 570K bss, 27508K reserved, 262144K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 33289 entries in 98 pages [ 0.000000] ftrace: allocated 98 pages with 3 groups [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Hierarchical RCU implementation. [ 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 10 jiffies. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns [ 0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns [ 0.000024] Switching to timer-based delay loop, resolution 52ns [ 0.000412] Console: colour dummy device 80x30 [ 0.001217] printk: console [tty1] enabled [ 0.001296] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000) [ 0.001357] pid_max: default: 32768 minimum: 301 [ 0.001542] LSM: Security Framework initializing [ 0.001802] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.001857] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.003404] cgroup: Disabling memory control group subsystem [ 0.003715] CPU: Testing write buffer coherency: ok [ 0.004293] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.005662] Setting up static identity map for 0x100000 - 0x10003c [ 0.005880] rcu: Hierarchical SRCU implementation. [ 0.006901] smp: Bringing up secondary CPUs ... [ 0.008079] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.009389] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.010676] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.010826] smp: Brought up 1 node, 4 CPUs [ 0.010931] SMP: Total of 4 processors activated (153.60 BogoMIPS). [ 0.010969] CPU: All CPU(s) started in HYP mode. [ 0.010997] CPU: Virtualization extensions available. [ 0.011953] devtmpfs: initialized [ 0.030384] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4 [ 0.030669] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.030738] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.042520] pinctrl core: initialized pinctrl subsystem [ 0.043933] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.048480] DMA: preallocated 1024 KiB pool for atomic coherent allocations [ 0.054130] audit: initializing netlink subsys (disabled) [ 0.054448] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1 [ 0.055074] thermal_sys: Registered thermal governor 'step_wise' [ 0.056039] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.056108] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.056414] Serial: AMBA PL011 UART driver [ 0.067092] bcm2835-mbox 3f00b880.mailbox: mailbox enabled [ 0.100118] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-08-09T13:46:06, variant start [ 0.110135] raspberrypi-firmware soc:firmware: Firmware hash is 273b410636cf8854ca35af91fd738a3d5f8b39b6 [ 0.159290] Kprobes globally optimized [ 0.164907] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1 [ 0.167259] SCSI subsystem initialized [ 0.167545] usbcore: registered new interface driver usbfs [ 0.167632] usbcore: registered new interface driver hub [ 0.167738] usbcore: registered new device driver usb [ 0.168132] usb_phy_generic phy: supply vcc not found, using dummy regulator [ 0.168419] usb_phy_generic phy: dummy supplies not allowed for exclusive requests [ 0.168720] pps_core: LinuxPPS API ver. 1 registered [ 0.168754] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 0.168815] PTP clock support registered [ 0.171333] clocksource: Switched to clocksource arch_sys_counter [ 0.252101] VFS: Disk quotas dquot_6.6.0 [ 0.252254] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.252486] FS-Cache: Loaded [ 0.252790] CacheFiles: Loaded [ 0.253643] simple-framebuffer 3eaa9000.framebuffer: framebuffer at 0x3eaa9000, 0x151800 bytes [ 0.253695] simple-framebuffer 3eaa9000.framebuffer: format=a8r8g8b8, mode=720x480x32, linelength=2880 [ 0.259912] Console: switching to colour frame buffer device 90x30 [ 0.268597] simple-framebuffer 3eaa9000.framebuffer: fb0: simplefb registered! [ 0.282970] NET: Registered PF_INET protocol family [ 0.286496] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.291484] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.298109] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.301817] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear) [ 0.305591] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.309423] TCP: Hash tables configured (established 8192 bind 8192) [ 0.313322] UDP hash table entries: 512 (order: 2, 16384 bytes, linear) [ 0.317016] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) [ 0.321009] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.325463] RPC: Registered named UNIX socket transport module. [ 0.329077] RPC: Registered udp transport module. [ 0.332673] RPC: Registered tcp transport module. [ 0.336140] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.823111] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available [ 1.833998] Initialise system trusted keyrings [ 1.837900] workingset: timestamp_bits=14 max_order=18 bucket_order=4 [ 1.851498] zbud: loaded [ 1.857148] FS-Cache: Netfs 'nfs' registered for caching [ 1.861657] NFS: Registering the id_resolver key type [ 1.865101] Key type id_resolver registered [ 1.868431] Key type id_legacy registered [ 1.871823] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.875106] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 1.879649] Key type asymmetric registered [ 1.882886] Asymmetric key parser 'x509' registered [ 1.886096] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247) [ 1.889256] io scheduler mq-deadline registered [ 1.892375] io scheduler kyber registered [ 1.907955] bcm2835-rng 3f104000.rng: hwrng registered [ 1.911607] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB) [ 1.918964] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000 [ 1.934691] brd: module loaded [ 1.947874] loop: module loaded [ 1.951795] Loading iSCSI transport class v2.0-870. [ 1.956934] usbcore: registered new interface driver lan78xx [ 1.960242] usbcore: registered new interface driver smsc95xx [ 1.963391] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 2.694694] Core Release: 2.80a [ 2.697702] Setting default values for core params [ 2.700718] Finished setting default values for core params [ 2.904090] Using Buffer DMA mode [ 2.907044] Periodic Transfer Interrupt Enhancement - disabled [ 2.910069] Multiprocessor Interrupt Enhancement - disabled [ 2.913124] OTG VER PARAM: 0, OTG VER FLAG: 0 [ 2.916231] Dedicated Tx FIFOs mode

[ 2.920656] WARN::dwc_otg_hcd_init:1074: FIQ DMA bounce buffers: virt = 9ed04000 dma = 0xded04000 len=9024 [ 2.929554] FIQ FSM acceleration enabled for : Non-periodic Split Transactions Periodic Split Transactions High-Speed Isochronous Endpoints Interrupt/Control Split Transaction hack enabled [ 2.943955] dwc_otg: Microframe scheduler enabled

[ 2.944093] WARN::hcd_init_fiq:457: FIQ on core 1

[ 2.949425] WARN::hcd_init_fiq:458: FIQ ASM at 807f974c length 36

[ 2.954605] WARN::hcd_init_fiq:497: MPHI regs_base at bb810000 [ 2.959894] dwc_otg 3f980000.usb: DWC OTG Controller [ 2.962731] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1 [ 2.965592] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000 [ 2.968397] Init: Port Power? op_state=1 [ 2.971129] Init: Power Port (0) [ 2.974159] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15 [ 2.979685] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 2.982630] usb usb1: Product: DWC OTG Controller [ 2.985516] usb usb1: Manufacturer: Linux 5.15.56-v7+ dwc_otg_hcd [ 2.988455] usb usb1: SerialNumber: 3f980000.usb [ 2.992194] hub 1-0:1.0: USB hub found [ 2.995099] hub 1-0:1.0: 1 port detected [ 2.998750] dwc_otg: FIQ enabled [ 2.998765] dwc_otg: NAK holdoff enabled [ 2.998778] dwc_otg: FIQ split-transaction FSM enabled [ 2.998797] Module dwc_common_port init [ 2.999146] usbcore: registered new interface driver usb-storage [ 3.002189] mousedev: PS/2 mouse device common for all mice [ 3.008862] sdhci: Secure Digital Host Controller Interface driver [ 3.011815] sdhci: Copyright(c) Pierre Ossman [ 3.015403] sdhci-pltfm: SDHCI platform and OF driver helper [ 3.021513] ledtrig-cpu: registered to indicate activity on CPUs [ 3.024721] hid: raw HID events driver (C) Jiri Kosina [ 3.027815] usbcore: registered new interface driver usbhid [ 3.030793] usbhid: USB HID core driver [ 3.039356] Initializing XFRM netlink socket [ 3.042361] NET: Registered PF_PACKET protocol family [ 3.045447] Key type dns_resolver registered [ 3.048910] Registering SWP/SWPB emulation handler [ 3.052520] registered taskstats version 1 [ 3.055361] Loading compiled-in X.509 certificates [ 3.059054] Key type ._fscrypt registered [ 3.061936] Key type .fscrypt registered [ 3.064665] Key type fscrypt-provisioning registered [ 3.079462] uart-pl011 3f201000.serial: cts_event_workaround enabled [ 3.082360] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2 [ 3.090464] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer [ 3.093754] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver [ 3.098412] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0 [ 3.101395] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated [ 3.121499] Indeed it is in host mode hprt0 = 00021501 [ 3.186481] sdhost: log_buf @ fb53e359 (ded03000) [ 3.239973] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [ 3.266033] of_cfs_init [ 3.269333] of_cfs_init: OK [ 3.272140] mmc1: new high speed SDIO card at address 0001 [ 3.275270] Waiting for root device PARTUUID=00f24f4c-02... [ 3.331400] usb 1-1: new high-speed USB device number 2 using dwc_otg [ 3.334278] mmc0: host does not support reading read-only switch, assuming write-enable [ 3.334411] Indeed it is in host mode hprt0 = 00001101 [ 3.342432] mmc0: new high speed SDHC card at address aaaa [ 3.346345] mmcblk0: mmc0:aaaa SM32G 29.7 GiB [ 3.400307] mmcblk0: p1 p2 [ 3.403886] mmcblk0: mmc0:aaaa SM32G 29.7 GiB [ 3.438696] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none. [ 3.444948] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 3.459205] devtmpfs: mounted [ 3.470557] Freeing unused kernel image (initmem) memory: 1024K [ 3.474297] Run /sbin/init as init process [ 3.477380] with arguments: [ 3.477392] /sbin/init [ 3.477404] with environment: [ 3.477415] HOME=/ [ 3.477426] TERM=linux [ 3.581732] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3 [ 3.588103] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3.592311] hub 1-1:1.0: USB hub found [ 3.595722] hub 1-1:1.0: 4 ports detected [ 3.911409] usb 1-1.1: new high-speed USB device number 3 using dwc_otg [ 4.041714] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3 [ 4.048312] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 4.052818] hub 1-1.1:1.0: USB hub found [ 4.056407] hub 1-1.1:1.0: 3 ports detected [ 4.077196] systemd[1]: System time before build time, advancing clock. [ 4.350482] NET: Registered PF_INET6 protocol family [ 4.355703] Segment Routing with IPv6 [ 4.359061] In-situ OAM (IOAM) with IPv6 [ 4.413082] dwc_otg_handle_wakeup_detected_intr lxstate = 2 [ 4.453534] systemd[1]: systemd 247.3-7+rpi1 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) [ 4.476962] systemd[1]: Detected architecture arm. [ 4.525134] systemd[1]: Set hostname to . [ 4.881435] usb 1-1.1.1: new high-speed USB device number 4 using dwc_otg [ 5.012300] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800, bcdDevice= 3.00 [ 5.018950] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 5.287911] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No External EEPROM. Setting MAC Speed [ 5.317253] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): int urb period 64 [ 5.812177] systemd[1]: Queued start job for default target Graphical Interface. [ 5.823194] systemd[1]: Created slice system-getty.slice. [ 5.832633] systemd[1]: Created slice system-modprobe.slice. [ 5.841919] systemd[1]: Created slice system-systemd\x2dfsck.slice. [ 5.850830] systemd[1]: Created slice User and Session Slice. [ 5.859490] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 5.868155] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 5.877791] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point. [ 5.890878] systemd[1]: Reached target Local Encrypted Volumes. [ 5.900567] systemd[1]: Reached target Paths. [ 5.909388] systemd[1]: Reached target Slices. [ 5.917762] systemd[1]: Reached target Swap. [ 5.933539] systemd[1]: Listening on Syslog Socket. [ 5.942319] systemd[1]: Listening on fsck to fsckd communication Socket. [ 5.950635] systemd[1]: Listening on initctl Compatibility Named Pipe. [ 5.960040] systemd[1]: Listening on Journal Audit Socket. [ 5.968742] systemd[1]: Listening on Journal Socket (/dev/log). [ 5.977640] systemd[1]: Listening on Journal Socket. [ 5.987394] systemd[1]: Listening on udev Control Socket. [ 5.995852] systemd[1]: Listening on udev Kernel Socket. [ 6.004220] systemd[1]: Condition check resulted in Huge Pages File System being skipped. [ 6.016073] systemd[1]: Mounting POSIX Message Queue File System... [ 6.029520] systemd[1]: Mounting RPC Pipe File System... [ 6.043372] systemd[1]: Mounting Kernel Debug File System... [ 6.057076] systemd[1]: Mounting Kernel Trace File System... [ 6.065790] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped. [ 6.080807] systemd[1]: Starting Restore / save the current clock... [ 6.097285] systemd[1]: Starting Set the console keyboard layout... [ 6.112277] systemd[1]: Starting Create list of static device nodes for the current kernel... [ 6.131000] systemd[1]: Starting Load Kernel Module configfs... [ 6.145662] systemd[1]: Starting Load Kernel Module drm... [ 6.167558] systemd[1]: Starting Load Kernel Module fuse... [ 6.185059] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped. [ 6.199007] systemd[1]: Starting File System Check on Root Device... [ 6.220386] systemd[1]: Starting Journal Service... [ 6.238147] systemd[1]: Starting Load Kernel Modules... [ 6.265177] systemd[1]: Starting Coldplug All udev Devices... [ 6.306314] fuse: init (API version 7.34) [ 6.318786] systemd[1]: Mounted POSIX Message Queue File System. [ 6.346679] systemd[1]: Mounted RPC Pipe File System. [ 6.362117] systemd[1]: Mounted Kernel Debug File System. [ 6.370483] systemd[1]: Mounted Kernel Trace File System. [ 6.381672] systemd[1]: Finished Restore / save the current clock. [ 6.391767] systemd[1]: Finished Create list of static device nodes for the current kernel. [ 6.406875] systemd[1]: modprobe@configfs.service: Succeeded. [ 6.419031] i2c_dev: i2c /dev entries driver [ 6.424990] systemd[1]: Finished Load Kernel Module configfs. [ 6.435168] systemd[1]: modprobe@drm.service: Succeeded. [ 6.440118] systemd[1]: Finished Load Kernel Module drm. [ 6.454818] systemd[1]: modprobe@fuse.service: Succeeded. [ 6.460016] systemd[1]: Finished Load Kernel Module fuse. [ 6.470942] systemd[1]: Finished Load Kernel Modules. [ 6.504140] systemd[1]: Mounting FUSE Control File System... [ 6.516988] systemd[1]: Mounting Kernel Configuration File System... [ 6.533626] systemd[1]: Started File System Check Daemon to report status. [ 6.575499] systemd[1]: Starting Apply Kernel Variables... [ 6.589953] systemd[1]: Mounted FUSE Control File System. [ 6.602115] systemd[1]: Mounted Kernel Configuration File System. [ 6.662165] systemd[1]: Finished Apply Kernel Variables. [ 6.690228] systemd[1]: Finished File System Check on Root Device. [ 6.699471] systemd[1]: Starting Remount Root and Kernel File Systems... [ 6.704333] systemd[1]: Started Journal Service. [ 6.887206] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null). Quota mode: none. [ 6.962454] systemd-journald[139]: Received client request to flush runtime journal. [ 7.001121] systemd-journald[139]: File /var/log/journal/be49a9402c954d689ba79ffd5f71ad67/system.journal corrupted or uncleanly shut down, renaming and replacing. [ 8.076477] mc: Linux media interface: v0.10 [ 8.081282] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned. [ 8.126753] bcm2835_vc_sm_cma_probe: Videocore shared memory driver

[ 8.133408] [vc_sm_connected_init]: installed successfully [ 8.206244] videodev: Linux video capture interface: v2.00 [ 8.280090] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 8.298526] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned. [ 8.316441] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned. [ 8.336959] bcm2835-codec bcm2835-codec: Device registered as /dev/video10 [ 8.337047] bcm2835-codec bcm2835-codec: Loaded V4L2 decode [ 8.345949] bcm2835-codec bcm2835-codec: Device registered as /dev/video11 [ 8.346018] bcm2835-codec bcm2835-codec: Loaded V4L2 encode [ 8.353785] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13 [ 8.354886] bcm2835-codec bcm2835-codec: Device registered as /dev/video12 [ 8.355080] bcm2835-codec bcm2835-codec: Loaded V4L2 isp [ 8.375778] bcm2835-codec bcm2835-codec: Device registered as /dev/video18 [ 8.375853] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx [ 8.388159] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14 [ 8.391397] bcm2835-codec bcm2835-codec: Device registered as /dev/video31 [ 8.391473] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image [ 8.391723] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15 [ 8.421852] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. [ 8.431820] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16 [ 8.431885] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 8.431915] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 8.431939] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 8.431963] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 8.440399] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [ 8.443823] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20 [ 8.446196] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21 [ 8.446829] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22 [ 8.447223] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23 [ 8.447259] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 8.447304] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 8.447349] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 8.447392] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 8.447659] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp [ 8.482926] bcm2835_audio bcm2835_audio: card created with 8 channels [ 9.187517] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 9.228363] checking generic (3eaa9000 151800) vs hw (0 ffffffff) [ 9.228401] fb0: switching to vc4 from simple [ 9.229148] Console: switching to colour dummy device 80x30 [ 9.245547] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4]) [ 9.248784] Registered IR keymap rc-cec [ 9.249053] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0 [ 9.249379] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input0 [ 9.357842] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 9.377195] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid [ 9.792496] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4]) [ 9.795785] Registered IR keymap rc-cec [ 9.796049] brcmfmac: F1 signature read @0x18000000=0x15264345 [ 9.796247] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0 [ 9.796724] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input1 [ 9.845577] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 9.846609] usbcore: registered new interface driver brcmfmac [ 9.853512] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2 [ 9.961464] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4]) [ 9.981642] Registered IR keymap rc-cec [ 9.981942] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0 [ 9.982268] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input2 [ 10.150136] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 10.150387] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 [ 10.166914] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60 [ 10.588361] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4]) [ 10.604931] Registered IR keymap rc-cec [ 10.605287] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0 [ 10.605625] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input3 [ 10.750475] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4]) [ 10.751194] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4]) [ 10.751921] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 10.752502] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 10.752985] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4]) [ 10.753365] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4]) [ 10.824691] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0 [ 10.825912] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes [ 10.972006] uart-pl011 3f201000.serial: no DMA platform data [ 10.987900] rtc-ds1307 1-0068: registered as rtc0 [ 10.989585] rtc-ds1307 1-0068: setting system clock to 2022-08-15T18:57:09 UTC (1660589829) [ 11.440355] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS [ 11.624288] 8021q: 802.1Q VLAN Support v1.8 [ 11.923082] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled [ 12.251602] 8021q: adding VLAN 0 to HW filter on device eth0 [ 17.883977] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 18.393670] Bluetooth: Core ver 2.22 [ 18.393782] NET: Registered PF_BLUETOOTH protocol family [ 18.393789] Bluetooth: HCI device and connection manager initialized [ 18.393809] Bluetooth: HCI socket layer initialized [ 18.393819] Bluetooth: L2CAP socket layer initialized [ 18.393836] Bluetooth: SCO socket layer initialized [ 18.405916] Bluetooth: HCI UART driver ver 2.3 [ 18.405938] Bluetooth: HCI UART protocol H4 registered [ 18.406008] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 18.406185] Bluetooth: HCI UART protocol Broadcom registered [ 18.885868] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 18.885890] Bluetooth: BNEP filters: protocol multicast [ 18.885907] Bluetooth: BNEP socket layer initialized [ 18.902601] NET: Registered PF_ALG protocol family [ 18.933812] cryptd: max_cpu_qlen set to 1000 [ 20.951785] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes [ 23.588560] FS-Cache: Netfs 'cifs' registered for caching [ 23.601483] Key type cifs.spnego registered [ 23.601513] Key type cifs.idmap registered [ 23.603917] Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers

[ 23.603941] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers [ 23.603956] CIFS: Attempting to mount \NetgearNAS-3\backup [ 23.618489] CIFS: Attempting to mount \SynologyNAS-1\backups [ 23.620247] CIFS: Attempting to mount \SynologyNAS-1\rpi_share [ 23.621996] FS-Cache: Duplicate cookie detected [ 23.622014] FS-Cache: O-cookie c=00000005 [p=00000003 fl=222 nc=0 na=1] [ 23.622025] FS-Cache: O-cookie d=95c02f89{CIFS.server} n=38b55a64 [ 23.622036] FS-Cache: O-key=[8] '020001bdc0a80166' [ 23.622082] FS-Cache: N-cookie c=00000006 [p=00000003 fl=2 nc=0 na=1] [ 23.622091] FS-Cache: N-cookie d=95c02f89{CIFS.server} n=7d9cbe0e [ 23.622099] FS-Cache: N-key=[8] '020001bdc0a80166' [ 33.732570] cam-dummy-reg: disabling [64983.526537] loop0: detected capacity change from 0 to 6463488 [64983.619239] loop0: p1 p2 [64983.621540] loop0: p1 p2 [64992.932453] EXT4-fs (loop0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none. [65113.066573] loop0: detected capacity change from 0 to 6463488 [65113.139605] loop0: p1 p2 [324186.198682] loop0: detected capacity change from 0 to 6463488 [324187.328954] loop0: p1 p2 [324188.733526] EXT4-fs (loop0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none. [324222.467344] loop0: detected capacity change from 0 to 6463488 [324222.530971] loop0: p1 p2 [496987.402100] loop0: detected capacity change from 0 to 6463488 [496995.653273] loop0: p1 p2 [496995.658627] loop0: p1 p2 [496996.660508] EXT4-fs (loop0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none. [497012.318769] loop0: detected capacity change from 0 to 6463488 [497012.383517] loop0: p1 p2 [497012.385550] loop0: p1 p2

NOTE: Output of raspinfo did not return to shell prompt.

Logs If applicable, add the relevant output from dmesg or similar.

Additional context Add any other relevant context for the problem.

writepatrick commented 2 years ago

same with Raspberry Pi 4 Model B.

pelwell commented 2 years ago

When did it last work?

pelwell commented 2 years ago

i.e. do you have a kernel version when it used to work?

orazioedoardo commented 2 years ago

@pelwell 5.15.32

pelwell commented 2 years ago

That took a while, but I can now see a change in behaviour with releases since Aug 08 2022. However, the new behaviour is correct and the old behaviour was wrong.

This isn't easy to say succinctly, so I'm going to explain it as a numbered list of statements that you can process in any order you like. Please refer to the facts by number if you dispute them (or simply want more information).

  1. The PWR LED on the affected boards is connected to the GPIO expander.
  2. The PWR LED is controlled by an active-low signal; driving the GPIO low turns the LED on, driving the GPIO high turns the LED off.
  3. By default, the PWR LED is declared to the kernel (by Device Tree) as being active-low.
  4. By default, the PWR LED is assigned (by Device Tree) the "default-on" trigger which puts the GPIO into the active state.
  5. If the "none" trigger is used, the kernel decides what to do based on the default-state property.
  6. On the Pi 4 family, default-state = "keep", which means use the value set by the firmware.
  7. On older Pis (3B, 3B+ etc.), default-state is not set, which means turn the LED off.

The following statements assume dtparam=pwr_led_trigger=none and dtparam=pwr_led_activelow=off have been specified.

  1. On an older Pi, the kernel will try to turn off the LED, which means driving the GPIO low.
  2. On a Pi 4, the kernel sees that the firmware has left the GPIO low (causing it to think the LED is off because it thinks the GPIO is active-high), so it will drive the GPIO low.

Now to complicate matters further:

  1. The GPIO expander is actually driven by the firmware, under the direction of the kernel.
  2. The kernel has two methods to change a GPIO's state - by making it an output with a specific value, or assuming it is an output and just setting the value.
  3. In the case of the GPIO expander, the two methods above result in different messages to he firmware.
  4. The "none" trigger just uses the "make it an output..." method, but the "default-on" trigger goes on to also use the "just set the value" method.

And finally:

  1. Firmware prior to Aug 08 2022 has a bug in the "make it an output..." method which causes it to ignore the polarity (active-high or active-low),
  2. Newer firmware fixes the bug.

Combining 8&9, 14&15, dtparam=pwr_led_trigger=none and dtparam=pwr_led_activelow=off we get:

The safest way to turn off the PWR LED on all Pis with either old or new firmware is to use the default-on method but declare the output as being active-high:

dtparam=pwr_led_trigger=default-on   # The default
dtparam=pwr_led_activelow=off

This uses the "set a value" method, overriding the incorrect GPIO level set by the buggy "make it an output..." path in the older firmware.

If you think you have results that contradict these findings then please state: a. which Pi you are running, b, the firmware version (vcgencmd version), and c. the relevant config.txt settings.

writepatrick commented 2 years ago

@pelwell Thank you for the detailed explanation! Even that I barely understand it. I get the concept. It seems like it was never intended to be used the way it was by most users (but worked somehow)

I tried it now and „default-on“ works like a charm on my pi4. Since it was a „bug“ in the firmware the logic should be now fixed for the next updates.

I am really happy that I found this here and was fixed immediately. Great work!

seamusdemora commented 2 years ago

If you think you have results that contradict these findings then please state: a. which Pi you are running, b, the firmware version (vcgencmd version), and c. the relevant config.txt settings.

pi@raspberrypi1bp:~ $ cat /proc/device-tree/model && echo
Raspberry Pi Model B Plus Rev 1.2
pi@raspberrypi1bp:~ $ vcgencmd version
Dec  1 2021 15:07:06
Copyright (c) 2012 Broadcom
version 71bd3109023a0c8575585ba87cbb374d2eeb038f (clean) (release) (start)

fm /boot/config.txt:

This does not work (pwr led remains illuminated after boot completes):

dtparam=act_led_trigger=mmc0
dtparam=act_led_activelow=off
dtparam=pwr_led_trigger=default-on # The default
dtparam=pwr_led_activelow=off

This still works as before (pwr led turns OFF after boot completes):

dtparam=act_led_trigger=mmc0 dtparam=act_led_activelow=off dtparam=pwr_led_trigger=none

FWIW, your recommended settings control the pwr led properly on the 3B+, and 4B units I tested.

pelwell commented 2 years ago

Here is a complete (or as complete as I'm going to give) list of the Pi models and their PWR LED support:

Only the last group of 4 models are affected by the firmware bug that has just been fixed.

You should probably bookmark this post for all of your PWR LED needs.

seamusdemora commented 2 years ago

If I read all of this correctly, the following (from an earlier reply) is not a configuration that will extinguish the power led??

The safest way to turn off the PWR LED on all Pis with either old or new firmware is to use the default-on method but declare the output as being active-high:

dtparam=pwr_led_trigger=default-on # The default dtparam=pwr_led_activelow=off

Just as a counter-suggestion, if this were included in the documentation, there would be no need to bookmark this post. And since extinguishing the power led is a question that comes up from time-to-time, that might serve the needs of all those users?

ar51an commented 2 years ago

That took a while, but I can now see a change in behaviour with releases since Aug 08 2022. However, the new behaviour is correct and the old behaviour was wrong.

Yes the last kernel version where trigger=none used to work was 5.15.55-v8+ and it worked for years this way.

The safest way to turn off the PWR LED on all Pis with either old or new firmware is to use the default-on method but declare the output as being active-high: dtparam=pwr_led_trigger=default-on # The default dtparam=pwr_led_activelow=off

Thank you. Tested on RP4b with kernel 5.15.61-v8+ and it worked.

The correct way is to only specify below line in config.txt: dtparam=pwr_led_activelow=off

Removing trigger=none line sets the default trigger to "default-on": dtparam=pwr_led_trigger=none

Edit: One observation shouldn't this behavior you mentioned for switching off pwr led be consistent for both act and pwr led. ACT led's default trigger is "mmc0" and if we change it to "default-on" and specify activelow=off it stays on. Only way to switch off ACT led is still the wrong/old way using trigger=none and activelow=off. I tested it on RP4b with kernel ver 5.15.61-v8+

dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
Arathonk commented 1 year ago

Hi! So I'm on Libreelec and since the new update I can't get the red led to be off, Normally it would turn of after booting, now it doesn't work, I tried editing the config file but I don't know what I'm doing wrong. Libreelec 10.0.4(Kodi build 19.5.0) RaspPi 4.

Config file text:

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)

Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)

################################################################################

Bootloader configuration

config.txt version v1 (do not remove or change this line!)

################################################################################

For more options and information see

http://rpf.io/configtxt

################################################################################

Default GPU memory split, 76MB are needed for H264 decoder

gpu_mem=76

Don't send initial active source message.

Avoids bringing CEC (enabled TV) out of standby and channel switch when

rebooting.

hdmi_ignore_cec_init=1

################################################################################

Include distribution specific config file if it exists.

################################################################################ [all] include distroconfig.txt

uncomment to enable infrared remote recevier connected to GPIO 18

dtoverlay=gpio-ir,gpio_pin=18

Turn off Power LED

dtparam=pwr_led_trigger=none dtparam=pwr_led_activelow=off

Turn off Activity LED

dtparam=act_led_activelow=off

Turn off Ethernet ACT LED

dtparam=eth_led0=4

Turn off Ethernet LNK LED

dtparam=eth_led1=4

dtparam=i2c=on enable_uart=1

ar51an commented 1 year ago

I can't get the red led to be off ... Turn off Power LED

dtparam=pwr_led_trigger=none dtparam=pwr_led_activelow=off

Solution is mentioned in multiple comments of this PR. Remove below line from your config.txt dtparam=pwr_led_trigger=none

pelwell commented 1 year ago

In the 6.2 kernel there was a non-trivial upstream DT change, and as part of the rework of the downstream patches the LED default-state values have been changed to "off", which makes dtparam=pwr_led_trigger=none work without the need to make the GPIO active-low. Back-porting at least this aspect of the change to rpi-6.1.y would not be difficult, so I may do it before it becomes the master branch (assuming Greg KH eventually makes 6.1 the next LTS).

pelwell commented 1 year ago

#5335 implements the default-state change on rpi-6.1.y.

ar51an commented 1 year ago

@pelwell Thank you for the heads up and quick turn around

ar51an commented 1 year ago

Validated on kernel 6.1.13-v8+. Works fine for both pwr and act. Thank you for making it consistent for pwr and act led. That's all needed for switching off pwr & act leds in kernel 6.1.*

dtparam=pwr_led_trigger=none dtparam=act_led_trigger=none

PThePy commented 1 year ago

That took a while, but I can now see a change in behaviour with releases since Aug 08 2022. However, the new behaviour is correct and the old behaviour was wrong.

This isn't easy to say succinctly, so I'm going to explain it as a numbered list of statements that you can process in any order you like. Please refer to the facts by number if you dispute them (or simply want more information).

1. The PWR LED on the affected boards is connected to the GPIO expander.

2. The PWR LED is controlled by an active-low signal; driving the GPIO _low_ turns the LED _on_, driving the GPIO _high_ turns the LED _off_.

3. By default, the PWR LED is declared to the kernel (by Device Tree) as being active-low.

4. By default, the PWR LED is assigned (by Device Tree) the "default-on" trigger which puts the GPIO into the active state.

5. If the "none" trigger is used, the kernel decides what to do based on the `default-state` property.

6. On the Pi 4 family, `default-state = "keep"`, which means use the value set by the firmware.

7. On older Pis (3B, 3B+ etc.), `default-state` is not set, which means turn the LED off.

The following statements assume dtparam=pwr_led_trigger=none and dtparam=pwr_led_activelow=off have been specified. 8. On an older Pi, the kernel will try to turn off the LED, which means driving the GPIO low. 9. On a Pi 4, the kernel sees that the firmware has left the GPIO low (causing it to think the LED is off because it thinks the GPIO is active-high), so it will drive the GPIO low.

Now to complicate matters further: 10. The GPIO expander is actually driven by the firmware, under the direction of the kernel. 11. The kernel has two methods to change a GPIO's state - by making it an output with a specific value, or assuming it is an output and just setting the value. 12. In the case of the GPIO expander, the two methods above result in different messages to he firmware. 13. The "none" trigger just uses the "make it an output..." method, but the "default-on" trigger goes on to also use the "just set the value" method.

And finally: 14. Firmware prior to Aug 08 2022 has a bug in the "make it an output..." method which causes it to ignore the polarity (active-high or active-low), 15. Newer firmware fixes the bug.

Combining 8&9, 14&15, dtparam=pwr_led_trigger=none and dtparam=pwr_led_activelow=off we get:

* old Pi, old firmware -> kernel thinks GPIO low+LED off, actually GPIO high+LED off

* Pi 4, old firmware -> kernel thinks GPIO low+LED off, actually GPIO high+LED off

* old Pi, new firmware -> kernel thinks GPIO low+LED off, actually GPIO low+LED on

* Pi 4, new firmware -> kernel thinks GPIO low+LED off, actually GPIO low+LED on

The safest way to turn off the PWR LED on all Pis with either old or new firmware is to use the default-on method but declare the output as being active-high:

dtparam=pwr_led_trigger=default-on   # The default
dtparam=pwr_led_activelow=off

This uses the "set a value" method, overriding the incorrect GPIO level set by the buggy "make it an output..." path in the older firmware.

If you think you have results that contradict these findings then please state: a. which Pi you are running, b, the firmware version (vcgencmd version), and c. the relevant config.txt settings.

After hours of research, thank you. After the upgrade to bullseye the red pw led woudn't turn off even though I've corrected the dtparam=pwr_led_trigger parameter to default-on. After uprading my kernel using sudo rpi-update to 6.1.19-v8+ it works together with the dtparam=pwr_led_trigger=default-on option. Finally

pelwell commented 1 year ago

So as not to confuse anyone reading this thread, the information you have quoted above is now out-of-date. As of the current 6.1 (and last 5.15) kernels, the LED definitions have been changed such that a trigger of none means off and a trigger of default-on always means on. There is no need to change the active-low settings.

toy commented 9 months ago

@Arathonk The problem with dtparam=eth_led0 and dtparam=eth_led1 not taken into account should be caused by config.txt being moved to /boot/firmware/config.txt and /boot/config.txt being a symlink to it. So if during editing /boot/config.txt symlink gets replaced with a file, it contains config that is not processed. See https://github.com/raspberrypi/firmware/issues/1855

pelwell commented 9 months ago

Not a bad theory, apart from the bit about needing a time machine since the change of config.txt directory only appeared in October's Bookworm release.

toy commented 9 months ago

@pelwell Ah, then it must be something else