Closed Joulinar closed 3 years ago
Just for completeness: /sys/class/hwmon/hwmon0/temp1_input
is affected as well, which is functional on 5.10.5 32-bit kernel. vcgencmd measure_temp
works, but it would be good if at least one of the generic kernel tunables worked as well.
Same problem exists on 3B, 3B+ and 3A running 5.10.7-v8+
A 3B running 5.10.7-v7+ works OK, so it's a 32 vs 64 bit error.
This will get some attention next week.
I wonder if this is why the fan on my PoE hat does not work?
I re-installed the original kernel from the repo and fan is working again.
I think the problem here is simply that the 3 and the 4 are sharing a kernel build, and that the arm64 bcm2711_defconfig does not include CONFIG_BCM2835_THERMAL=y
. I can test the obvious fix tomorrow, but I thought I'd mention it now in case anyone else is in a position to try themselves.
The obvious fix has been pushed to rpi-5.10.y and rpi-5.11.y, and will be in future kernel releases.
And I thought the RPi 3 is using https://github.com/raspberrypi/linux/blob/rpi-5.4.y/arch/arm64/configs/bcmrpi3_defconfig, but of course both use the same as there is only a single 64-bit kernel shipped, so all makes sense then 😄.
Just to remember where this has been changed initially:
I hope the two builtins do not interfere with each other. If there is more SoC-specific, it could make sense to build separate kernels by times. But to not ship 5 or more kernels for every model with the official DEB package, 32-bit and 64-bit should probably be separated first 😉.
There's no possibility of interference - you've heard of Device Tree, haven't you 😉?
Okay, thanks for clarifying, yes of course I know about device trees, but I lack enough insights to be such about such things 😅. Thanks for the quick fix 👍.
A kernel with this fix is available via rpi-update.
ok thx for the fix. Looks good.
root@DietPi3:~# uname -a
Linux DietPi3 5.10.9-v8+ #1396 SMP PREEMPT Thu Jan 21 16:01:58 GMT 2021 aarch64 GNU/Linux
root@DietPi3:~# cat /sys/class/thermal/thermal_zone0/temp
46160
root@DietPi3:~#
Describe the bug Currently I'm not able to read CPU temperature on RPi3B+ while the exakt same image/sd card is working well on a RPi4B
To reproduce run
cat
onsys/class/thermal/thermal_zone0/temp
Expected behaviour CPU temp should be displayed as it is on RPi4B
Actual behaviour temperature file could not be read
System
Which model of Raspberry Pi? RPi3B+
Which OS and version (
cat /etc/rpi-issue
)? Raspberry Pi reference 2020-08-20 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7252c154838ec5b4576f29c996ac8fe3750cae12, stage4Which firmware version (
vcgencmd version
)? Jan 7 2021 18:33:15 Copyright (c) 2012 Broadcom version fb345a0c2d5544957f4ba1a2b9e968970e3312c4 (clean) (release) (start_cd)Which kernel version (
uname -a
)? Linux DietPi3 5.10.5-v8+ #1392 SMP PREEMPT Sat Jan 9 18:56:30 GMT 2021 aarch64 GNU/LinuxLogs If applicable, add the relevant output from
dmesg
or similar.dmesg logfile attached. Click to expand!
``` [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.10.5-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) #1392 SMP PREEMPT Sat Jan 9 18:56:30 GMT 2021 [ 0.000000] Machine model: Raspberry Pi 3 Model B Plus Rev 1.3 [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x000000003a400000, size 64 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003e5fffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000003e5fffff] [ 0.000000] Zeroed struct page in unavailable ranges: 512 pages [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003e5fffff] [ 0.000000] On node 0 totalpages: 255488 [ 0.000000] DMA zone: 3992 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 255488 pages, LIFO batch:63 [ 0.000000] percpu: Embedded 32 pages/cpu s91224 r8192 d31656 u131072 [ 0.000000] pcpu-alloc: s91224 r8192 d31656 u131072 alloc=32*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] CPU features: detected: ARM erratum 843419 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 251496 [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000 console=tty1 root=PARTUUID=ad09722e-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait net.ifnames=0 [ 0.000000] Kernel parameter elevator= does not have any effect anymore. Please use sysfs to set IO scheduler for individual devices. [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 914044K/1021952K available (10880K kernel code, 1908K rwdata, 3908K rodata, 3648K init, 1242K bss, 42372K reserved, 65536K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 36054 entries in 141 pages [ 0.000000] ftrace: allocated 141 pages with 4 groups [ 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] random: get_random_bytes called from start_kernel+0x3b8/0x578 with crng_init=0 [ 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.000003] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns [ 0.000143] Console: colour dummy device 80x25 [ 0.000545] printk: console [tty1] enabled [ 0.000582] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800) [ 0.000610] pid_max: default: 32768 minimum: 301 [ 0.000722] LSM: Security Framework initializing [ 0.000859] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.000889] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.001777] Disabling memory control group subsystem [ 0.002935] rcu: Hierarchical SRCU implementation. [ 0.003568] EFI services will not be available. [ 0.003884] smp: Bringing up secondary CPUs ... [ 0.004613] Detected VIPT I-cache on CPU1 [ 0.004665] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.005419] Detected VIPT I-cache on CPU2 [ 0.005448] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.006129] Detected VIPT I-cache on CPU3 [ 0.006153] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [ 0.006249] smp: Brought up 1 node, 4 CPUs [ 0.006317] SMP: Total of 4 processors activated. [ 0.006333] CPU features: detected: 32-bit EL0 Support [ 0.006348] CPU features: detected: CRC32 instructions [ 0.006363] CPU features: detected: 32-bit EL1 Support [ 0.023025] CPU: All CPU(s) started at EL2 [ 0.023090] alternatives: patching kernel code [ 0.024123] devtmpfs: initialized [ 0.033357] Enabled cp15_barrier support [ 0.033399] Enabled setend support [ 0.033918] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.033950] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.035615] pinctrl core: initialized pinctrl subsystem [ 0.036272] DMI not present or invalid. [ 0.036546] NET: Registered protocol family 16 [ 0.041575] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations [ 0.041819] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.042506] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.042614] audit: initializing netlink subsys (disabled) [ 0.042830] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1 [ 0.043240] thermal_sys: Registered thermal governor 'step_wise' [ 0.043394] cpuidle: using governor menu [ 0.043682] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.043819] ASID allocator initialised with 65536 entries [ 0.043914] Serial: AMBA PL011 UART driver [ 0.054655] bcm2835-mbox 3f00b880.mailbox: mailbox enabled [ 0.060239] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-01-07T18:33:15, variant start_cd [ 0.064244] raspberrypi-firmware soc:firmware: Firmware hash is fb345a0c2d5544957f4ba1a2b9e968970e3312c4 [ 0.087383] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1 [ 0.089461] vgaarb: loaded [ 0.089792] SCSI subsystem initialized [ 0.089956] usbcore: registered new interface driver usbfs [ 0.090008] usbcore: registered new interface driver hub [ 0.090096] usbcore: registered new device driver usb [ 0.090295] usb_phy_generic phy: supply vcc not found, using dummy regulator [ 0.091570] clocksource: Switched to clocksource arch_sys_counter [ 0.806208] VFS: Disk quotas dquot_6.6.0 [ 0.806290] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.806446] FS-Cache: Loaded [ 0.806609] CacheFiles: Loaded [ 0.813313] NET: Registered protocol family 2 [ 0.813907] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear) [ 0.813948] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.814016] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear) [ 0.814200] TCP: Hash tables configured (established 8192 bind 8192) [ 0.814371] UDP hash table entries: 512 (order: 2, 16384 bytes, linear) [ 0.814413] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) [ 0.814621] NET: Registered protocol family 1 [ 0.815225] RPC: Registered named UNIX socket transport module. [ 0.815243] RPC: Registered udp transport module. [ 0.815257] RPC: Registered tcp transport module. [ 0.815271] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.815293] PCI: CLS 0 bytes, default 64 [ 0.816483] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available [ 0.816612] kvm [1]: IPA Size Limit: 40 bits [ 0.817368] kvm [1]: Hyp mode initialized successfully [ 0.819985] Initialise system trusted keyrings [ 0.820263] workingset: timestamp_bits=46 max_order=18 bucket_order=0 [ 0.824833] zbud: loaded [ 0.826023] FS-Cache: Netfs 'nfs' registered for caching [ 0.826529] NFS: Registering the id_resolver key type [ 0.826565] Key type id_resolver registered [ 0.826579] Key type id_legacy registered [ 0.826668] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.827442] Key type asymmetric registered [ 0.827459] Asymmetric key parser 'x509' registered [ 0.827505] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249) [ 0.827766] io scheduler mq-deadline registered [ 0.827782] io scheduler kyber registered [ 0.830112] bcm2708_fb soc:fb: FB found 1 display(s) [ 0.854732] Console: switching to colour frame buffer device 240x67 [ 0.861755] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 1920x1080 [ 0.865340] bcm2835-rng 3f104000.rng: hwrng registered [ 0.865659] vc-mem: phys_addr:0x00000000 mem_base=0x3f000000 mem_size:0x3f600000(1014 MiB) [ 0.866323] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000 [ 0.866603] cacheinfo: Unable to detect cache hierarchy for CPU 0 [ 0.875194] brd: module loaded [ 0.884332] loop: module loaded [ 0.885399] Loading iSCSI transport class v2.0-870. [ 0.887189] libphy: Fixed MDIO Bus: probed [ 0.887774] usbcore: registered new interface driver r8152 [ 0.887865] usbcore: registered new interface driver lan78xx [ 0.887950] usbcore: registered new interface driver smsc95xx [ 0.888213] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 1.616279] Core Release: 2.80a [ 1.616320] Setting default values for core params [ 1.616374] Finished setting default values for core params [ 1.816639] Using Buffer DMA mode [ 1.816674] Periodic Transfer Interrupt Enhancement - disabled [ 1.816719] Multiprocessor Interrupt Enhancement - disabled [ 1.816764] OTG VER PARAM: 0, OTG VER FLAG: 0 [ 1.816804] Dedicated Tx FIFOs mode [ 1.817301] WARN::dwc_otg_hcd_init:1074: FIQ DMA bounce buffers: virt = ffffffc0119a9000 dma = 0x00000000fa810000 len=9024 [ 1.817404] FIQ FSM acceleration enabled for : Non-periodic Split Transactions Periodic Split Transactions High-Speed Isochronous Endpoints Interrupt/Control Split Transaction hack enabled [ 1.817559] dwc_otg: Microframe scheduler enabled [ 1.817584] WARN::hcd_init_fiq:497: MPHI regs_base at ffffffc0115a5000 [ 1.817688] dwc_otg 3f980000.usb: DWC OTG Controller [ 1.817744] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1 [ 1.817823] dwc_otg 3f980000.usb: irq 74, io mem 0x00000000 [ 1.817900] Init: Port Power? op_state=1 [ 1.817935] Init: Power Port (0) [ 1.818189] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10 [ 1.818252] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.819981] usb usb1: Product: DWC OTG Controller [ 1.821668] usb usb1: Manufacturer: Linux 5.10.5-v8+ dwc_otg_hcd [ 1.823363] usb usb1: SerialNumber: 3f980000.usb [ 1.825603] hub 1-0:1.0: USB hub found [ 1.827330] hub 1-0:1.0: 1 port detected [ 1.829655] dwc_otg: FIQ enabled [ 1.829663] dwc_otg: NAK holdoff enabled [ 1.829669] dwc_otg: FIQ split-transaction FSM enabled [ 1.829680] Module dwc_common_port init [ 1.830111] usbcore: registered new interface driver uas [ 1.831869] usbcore: registered new interface driver usb-storage [ 1.833700] mousedev: PS/2 mouse device common for all mice [ 1.836076] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer [ 1.839787] sdhci: Secure Digital Host Controller Interface driver [ 1.841468] sdhci: Copyright(c) Pierre Ossman [ 1.843644] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe [ 1.845476] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.848713] ledtrig-cpu: registered to indicate activity on CPUs [ 1.850662] hid: raw HID events driver (C) Jiri Kosina [ 1.852491] usbcore: registered new interface driver usbhid [ 1.854185] usbhid: USB HID core driver [ 1.859637] Initializing XFRM netlink socket [ 1.861424] NET: Registered protocol family 17 [ 1.863182] Key type dns_resolver registered [ 1.865341] registered taskstats version 1 [ 1.866996] Loading compiled-in X.509 certificates [ 1.869077] Key type ._fscrypt registered [ 1.870732] Key type .fscrypt registered [ 1.872382] Key type fscrypt-provisioning registered [ 1.882698] uart-pl011 3f201000.serial: cts_event_workaround enabled [ 1.884484] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 99, base_baud = 0) is a PL011 rev2 [ 1.887779] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver [ 1.890016] sdhost: log_buf @ (____ptrval____) (c2aa1000) [ 1.940326] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [ 1.944231] of_cfs_init [ 1.945981] of_cfs_init: OK [ 1.962626] Waiting for root device PARTUUID=ad09722e-02... [ 2.028206] mmc0: host does not support reading read-only switch, assuming write-enable [ 2.033591] mmc0: new high speed SDHC card at address aaaa [ 2.035692] Indeed it is in host mode hprt0 = 00021501 [ 2.047990] mmcblk0: mmc0:aaaa SC16G 14.8 GiB [ 2.104670] mmcblk0: p1 p2 [ 2.118376] random: fast init done [ 2.123185] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 2.125021] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 2.127629] devtmpfs: mounted [ 2.134536] Freeing unused kernel memory: 3648K [ 2.143671] Run /sbin/init as init process [ 2.145374] with arguments: [ 2.145381] /sbin/init [ 2.145387] with environment: [ 2.145393] HOME=/ [ 2.145399] TERM=linux [ 2.223610] usb 1-1: new high-speed USB device number 2 using dwc_otg [ 2.225545] Indeed it is in host mode hprt0 = 00001101 [ 2.431906] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3 [ 2.433719] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 2.436099] hub 1-1:1.0: USB hub found [ 2.437914] hub 1-1:1.0: 4 ports detected [ 2.727602] usb 1-1.1: new high-speed USB device number 3 using dwc_otg [ 2.753693] systemd[1]: System time before build time, advancing clock. [ 2.827903] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3 [ 2.829762] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 2.832212] hub 1-1.1:1.0: USB hub found [ 2.834042] hub 1-1.1:1.0: 3 ports detected [ 2.888666] NET: Registered protocol family 10 [ 2.891548] Segment Routing with IPv6 [ 2.958527] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid) [ 2.962945] systemd[1]: Detected architecture arm64. [ 2.998590] systemd[1]: Set hostname toAdditional context Issue happen on a fresh installation of RPi OS 64bit