dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 9:51 am

gemani wrote:
Fri Jul 30, 2021 10:15 pm
Another issue with the new kernel is that qBittorrent becomes very unstable when downloading, it crashes frequently and causes logouts from the UI. I've reverted the kernel using the rpi-update command in this thread, and the problem goes away so it is definitely a kernel issue.
Do you have a gpu_mem setting? Do you still have the issue without it?

carldani
Posts: 51
Joined: Wed Jan 11, 2012 12:08 am

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 1:10 pm

I have CMA memory allocation errors since moving raspberrypi-kernel from 5.10.17 to 5.10.52. To rule out any weird interaction with raspberrypi-bootloader, I kept the latter on hold. That said, updating raspberrypi-bootloader as well doesn't help.

Code: Select all

--- firmware-2021-05-27-kernel-5.10.17.log      2021-08-02 14:42:24.628454646 +0200
+++ firmware-2021-05-27-kernel-5.10.52.log      2021-08-02 14:54:50.001502647 +0200
@@ -1,13 +1,13 @@
--- Logs begin at Thu 2019-02-14 11:11:59 CET, end at Mon 2021-08-02 14:41:42 CEST. --
+-- Logs begin at Thu 2019-02-14 11:11:59 CET, end at Mon 2021-08-02 14:54:07 CEST. --
 Booting Linux on physical CPU 0x0
-Linux version 5.10.17-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1421 SMP Thu May 27 14:00:13 BST 2021
+Linux version 5.10.52-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1440 SMP Tue Jul 27 09:55:21 BST 2021
 CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
 CPU: div instructions available: patching division code
 CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
 OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.2
 Memory policy: Data cache writealloc
-Reserved memory: created CMA memory pool at 0x000000000fc00000, size 256 MiB
-OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
+OF: reserved mem: failed to allocate memory for node 'linux,cma'
+cma: Reserved 8 MiB at 0x000000001f400000
 Zone ranges:
   DMA      [mem 0x0000000000000000-0x000000001fffffff]
   Normal   empty
@@ -18,24 +18,24 @@
   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
 Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff]
 On node 0 totalpages: 901120
-  DMA zone: 1536 pages used for memmap
+  DMA zone: 1152 pages used for memmap
   DMA zone: 0 pages reserved
   DMA zone: 131072 pages, LIFO batch:31
   HighMem zone: 770048 pages, LIFO batch:63
-percpu: Embedded 20 pages/cpu s50700 r8192 d23028 u81920
-pcpu-alloc: s50700 r8192 d23028 u81920 alloc=20*4096
+percpu: Embedded 20 pages/cpu s50764 r8192 d22964 u81920
+pcpu-alloc: s50764 r8192 d22964 u81920 alloc=20*4096
 pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
-Built 1 zonelists, mobility grouping on.  Total pages: 899584
-Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1280x720M@50,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=E4:5F:01:01:AD:FF vc_mem.mem_base=0x3ec00000 vc
+Built 1 zonelists, mobility grouping on.  Total pages: 899968
+Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1280x720M@50,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:F4:1D:1E vc_mem.mem_base=0x3ec00000 vc
 Kernel parameter elevator= does not have any effect anymore.
-                                         Please use sysfs to set IO scheduler for individual devices.
+                                                 Please use sysfs to set IO scheduler for individual devices.
 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
 Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
 mem auto-init: stack:off, heap alloc:off, heap free:off
-software IO TLB: mapped [mem 0x0000000008cc0000-0x000000000ccc0000] (64MB)
-Memory: 3214092K/3604480K available (10240K kernel code, 1358K rwdata, 3160K rodata, 2048K init, 890K bss, 128244K reserved, 262144K cma-reserved, 3080192K highmem)
+software IO TLB: mapped [mem 0x0000000019090000-0x000000001d090000] (64MB)
+Memory: 3479088K/3604480K available (10240K kernel code, 1364K rwdata, 3188K rodata, 2048K init, 891K bss, 117200K reserved, 8192K cma-reserved, 3080192K highmem)
 SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
-ftrace: allocating 33942 entries in 67 pages
+ftrace: allocating 34303 entries in 67 pages
 ftrace: allocated 67 pages with 3 groups
 rcu: Hierarchical RCU implementation.
         Rude variant of Tasks RCU enabled.
[... some stuff skipped...]
@@ -265,23 +259,48 @@
 rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
 rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
 rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
+snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
 mc: Linux media interface: v0.10
-videodev: Linux video capture interface: v2.00
+bcm2835_audio bcm2835_audio: card created with 4 channels
 vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
 bcm2835_vc_sm_cma_probe: Videocore shared memory driver
 [vc_sm_connected_init]: start
-vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
-vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
-vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
+bcm2835_audio bcm2835_audio: card created with 4 channels
 [vc_sm_connected_init]: installed successfully
+videodev: Linux video capture interface: v2.00
 bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
-bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
+bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
 bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
 bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
+i2c i2c-22: Added multiplexed i2c bus 0
+i2c i2c-22: Added multiplexed i2c bus 10
+cx231xx 1-1.2:1.1: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 6 interfaces
+cx231xx 1-1.2:1.1: can't change interface 3 alt no. to 3: Max. Pkt size = 0
+cx231xx 1-1.2:1.1: Identified as Hauppauge USB Live 2 (card=9)
+[drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
+i2c i2c-24: Added multiplexed i2c bus 26
+i2c i2c-24: Added multiplexed i2c bus 27
+checking generic (3e843000 384000) vs hw (0 ffffffffffffffff)
+fb0: switching to vc4drmfb from simple
+Console: switching to colour dummy device 80x30
+vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
+[drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
+vc4-drm gpu: [drm] HDMI-A-1: EDID is invalid:
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+[drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
+vc4-drm gpu: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-12)
+cx25840 23-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0-0)
 bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
-bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
 bcm2835-codec bcm2835-codec: Device registered as /dev/video10
 bcm2835-codec bcm2835-codec: Loaded V4L2 decode
+bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
 bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
 bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
 bcm2835-isp bcm2835-isp: Register output node 0 with media controller
/boot/config.txt:

Code: Select all

framebuffer_width=1280
framebuffer_height=720
hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=19
dtparam=i2c_arm=on
dtparam=i2c_vc=on
dtparam=spi=on
dtparam=audio=on
consoleblank=0
[pi4]
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
start_x=1
gpu_mem=512
enable_uart=1
dtoverlay=disable-bt
dtoverlay=disable-wifi
Unfortunately I only have remote access, so I can't really check if the video output changed.

trejan
Posts: 3622
Joined: Tue Jul 02, 2019 2:28 pm

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 1:14 pm

carldani wrote:
Mon Aug 02, 2021 1:10 pm
I have CMA memory allocation errors since moving raspberrypi-kernel from 5.10.17 to 5.10.52.
You need to reduce gpu_mem. 512MB is too much.

carldani
Posts: 51
Joined: Wed Jan 11, 2012 12:08 am

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 1:50 pm

trejan wrote:
Mon Aug 02, 2021 1:14 pm
carldani wrote:
Mon Aug 02, 2021 1:10 pm
I have CMA memory allocation errors since moving raspberrypi-kernel from 5.10.17 to 5.10.52.
You need to reduce gpu_mem. 512MB is too much.
Indeed, that was the problem. Thanks.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 2:31 pm

airon11 wrote:
Thu Jul 29, 2021 8:48 pm
Today I got the updated kernel to version 5.10.52 in my raspberry pi 4 and CEC commands with my tv stopped working ..my tv is actually not recognized from raspberry...same tv same cable as before updating the kernel ..
Any help or ideas? Thanks
Can you test with lastest rpi-update firmware which has a potential fix.

P09
Posts: 9
Joined: Wed Sep 04, 2019 7:25 am

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 4:18 pm

I had same issue after last update. Now fixed with rpi-update. Thanks.

gemani
Posts: 4
Joined: Sat Jul 14, 2012 10:57 am

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 6:25 pm

dom wrote:
Mon Aug 02, 2021 9:51 am
gemani wrote:
Fri Jul 30, 2021 10:15 pm
Another issue with the new kernel is that qBittorrent becomes very unstable when downloading, it crashes frequently and causes logouts from the UI. I've reverted the kernel using the rpi-update command in this thread, and the problem goes away so it is definitely a kernel issue.
Do you have a gpu_mem setting? Do you still have the issue without it?
I have just run vcgencmd get_mem gpu and it returns gpu=100M

As I mentioned, it is running fine now because I reverted the kernel.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 6:43 pm

gemani wrote:
Mon Aug 02, 2021 6:25 pm
I have just run vcgencmd get_mem gpu and it returns gpu=100M

As I mentioned, it is running fine now because I reverted the kernel.
It would be useful if you could return to latest kernel but change:

Code: Select all

dtoverlay=vc4-fkms-v3d
to

Code: Select all

dtoverlay=vc4-fkms-v3d,cma-256
and confirm if that fixes it.

RonR
Posts: 2389
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Moving Linux Kernel to 5.10

Mon Aug 02, 2021 8:36 pm

Network booting appears to be broken with the current update (no version works after 5.10.27): Network booting no longer works

iceman20k
Posts: 11
Joined: Fri Jul 30, 2021 7:10 am

Re: Moving Linux Kernel to 5.10

Tue Aug 03, 2021 3:20 pm

My CEC also doesn't work after latest kernel update. I have a general question that might be misplaced here: I am used to update my pi & raspbian via apt-get update & apt-get upgrade. If i use rpi-update now to receive that fix that dom mentioned, will i in some way "leave" the normal "update-path"? I do ask because rpi-update "warns" me that i should not use it as normal update process.

For my understanding, rpi-update just receives "newer", less "confirmed" fixes that come over apt-get upgrade anyway, just a bit later. I'm only afraid that i leave a "stable-branch" that could end in an "unsolveable" software/dependencies situation ;)
If i use rpi-update now once to get that cec-fix, can i go on using apt-get upgrade after that or will it stop working like "revert" changes or something.
I know its a general question and if anyone has a url/doc handy that describes the differences between rpi-update and apt-get upgrade i'm ready and thankful to read over it.
Last edited by iceman20k on Tue Aug 03, 2021 3:31 pm, edited 3 times in total.

trejan
Posts: 3622
Joined: Tue Jul 02, 2019 2:28 pm

Re: Moving Linux Kernel to 5.10

Tue Aug 03, 2021 3:22 pm

iceman20k wrote:
Tue Aug 03, 2021 3:20 pm
If i use rpi-update now to receive that fix that dom mentioned, will i in some way "leave" the normal "update-path"?
No. The next firmware/kernel update from apt will overwrite it.

iceman20k
Posts: 11
Joined: Fri Jul 30, 2021 7:10 am

Re: Moving Linux Kernel to 5.10

Tue Aug 03, 2021 3:29 pm

trejan wrote:
Tue Aug 03, 2021 3:22 pm
No. The next firmware/kernel update from apt will overwrite it.
Ok, thank you. Let's go then ;)

iceman20k
Posts: 11
Joined: Fri Jul 30, 2021 7:10 am

Re: Moving Linux Kernel to 5.10

Tue Aug 03, 2021 3:46 pm

dom wrote:
Mon Aug 02, 2021 2:31 pm
airon11 wrote:
Thu Jul 29, 2021 8:48 pm
Today I got the updated kernel to version 5.10.52 in my raspberry pi 4 and CEC commands with my tv stopped working ..my tv is actually not recognized from raspberry...same tv same cable as before updating the kernel ..
Any help or ideas? Thanks
Can you test with lastest rpi-update firmware which has a potential fix.
I can confirm that cec is working fine again after receiving the firmware via rpi-update. Great work, thank you!

Code: Select all

vcgencmd version:
Aug  2 2021 15:23:51
Copyright (c) 2012 Broadcom
version 480b86c1d59580e354f37a5aaa47883eb21646e6 (clean) (release) (start)
I have also set gpu_mem=128 and all 1080p videos seem to play fine.

gemani
Posts: 4
Joined: Sat Jul 14, 2012 10:57 am

Re: Moving Linux Kernel to 5.10

Tue Aug 03, 2021 5:16 pm

dom wrote:
Mon Aug 02, 2021 6:43 pm
gemani wrote:
Mon Aug 02, 2021 6:25 pm
I have just run vcgencmd get_mem gpu and it returns gpu=100M

As I mentioned, it is running fine now because I reverted the kernel.
It would be useful if you could return to latest kernel but change:

Code: Select all

dtoverlay=vc4-fkms-v3d
to

Code: Select all

dtoverlay=vc4-fkms-v3d,cma-256
and confirm if that fixes it.
Where is that?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5805
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.10

Tue Aug 03, 2021 5:39 pm

gemani wrote:
Tue Aug 03, 2021 5:16 pm
Where is that?
/boot/config.txt

Return to “Advanced users”