Vanfanel
Posts: 503
Joined: Sat Aug 18, 2012 5:58 pm

Re: Moving Linux Kernel to 5.10

Sat Feb 06, 2021 7:05 pm

Hi there!

I am on kernel 5.10.7-v8+, and I use the vc4-hdmi audio device ONLY. Of course I have this overlay in config.txt:

Code: Select all

dtoverlay=vc4-kms-v3d
The problem I am seeing is that alsactl fails for both store and restore values:

For STORE:

Code: Select all

pi@raspberrypi:~ $ sudo alsactl store
alsactl: get_control:256: Cannot read control '3,0,0,Playback Channel Map,0': Invalid argument
and for RESTORE it fails because it could not create

Code: Select all

/var/lib/alsa/asound.state
:

Code: Select all

pi@raspberrypi:~ $ sudo alsactl restore
alsactl: load_state:1683: Cannot open /var/lib/alsa/asound.state for reading: No such file or directory
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
These are the exact contents in my /usr/share/alsa/cards/vc4-hdmi.conf file:

Code: Select all

# Configuration for the VC4-HDMI sound card using software IEC958
# subframe conversion

<confdir:pcm/hdmi.conf>
vc4-hdmi.pcm.hdmi.0 {
        @args [ CARD AES0 AES1 AES2 AES3 ]
        @args.CARD { 
                type string
        }
        @args.AES0 { 
                type integer
        }
        @args.AES1 { 
                type integer
        }
        @args.AES2 { 
                type integer
        }
        @args.AES3 { 
                type integer
        }
        type iec958
        slave { 
                format IEC958_SUBFRAME_LE
                pcm {   
                        type hooks
                        slave.pcm {
                                type hw
                                card $CARD
                                device 0
                        }
                        hooks.0 {
                                type ctl_elems
                                hook_args [
                                {
                                        name "IEC958 Playback Default"
                                        optional true
                                        lock true
                                        preserve true
                                        value [ $AES0 $AES1 $AES2 $AES3 ]
                                }
                                ]
                        }
                }
        }
        status [ $AES0 $AES1 $AES2 $AES3 ]
}

# default with plug
vc4-hdmi.pcm.default {
        @args [ CARD ]
        @args.CARD {
                type string
        }
        type plug
        slave.pcm {
                type softvol
                slave.pcm {
                        @func concat
                        strings [ "hdmi:" $CARD ]
                }
                control {
                        name "PCM Playback Volume"
                        card $CARD
                }
        }
}
Any idea on what could be going on? Maybe /usr/share/alsa/cards/vc4-hdmi.conf should be somehow adapted to 5.10.x?

User avatar
rpdom
Posts: 20206
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Moving Linux Kernel to 5.10

Sun Feb 07, 2021 9:37 am

The w1_therm driver appears broken on the 5.10.11+ kernel. It is giving silly readings as soon as the temperature went below 0°C

Code: Select all

pi@raspberrypi:~$ cat /sys/bus/w1/devices/28-0316852f6eff/w1_slave 
f6 ff 4b 46 7f ff 0c 10 7a : crc=7a YES
f6 ff 4b 46 7f ff 0c 10 7a t=4095375
It was working fine on the previous apt kernel update.

[edit]Reverting to the 5.4.83+ kernel has got it working again

Code: Select all

pi@raspberrypi:~$ cat /sys/bus/w1/devices/28-0316852f6eff/w1_slave 
f6 ff 4b 46 7f ff 0c 10 7a : crc=7a YES
f6 ff 4b 46 7f ff 0c 10 7a t=-625
Raspberry Pi 1A Running Raspberry Pi OS Buster. Fully updated with apt (not rpi-update).
Unreadable squiggle

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4549
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.10

Sun Feb 07, 2021 10:59 am

The w1 regression has already been spotted and fixed upstream. See https://github.com/raspberrypi/linux/pull/4126

There's likely to be a race between that PR and it being auto-backported because of its Fixes tag. One way or the other it will be in future kernel builds.

User avatar
rpdom
Posts: 20206
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Moving Linux Kernel to 5.10

Sun Feb 07, 2021 11:13 am

PhilE wrote:
Sun Feb 07, 2021 10:59 am
The w1 regression has already been spotted and fixed upstream.
Thank you.

Fortunately it only affect one of my Raspberrys and I'll hold back on the updates on that one until the fix filters through.
Unreadable squiggle

User avatar
harrypnyce
Posts: 5
Joined: Mon Jul 01, 2019 10:37 pm

Re: Moving Linux Kernel to 5.10

Sun Feb 07, 2021 7:15 pm

harrypnyce wrote:
Mon Jan 25, 2021 7:59 pm

Code: Select all

kernel 5.4.83 -> 5.10.9
This 5.10.11 kernel has been pretty sweet thus far. Seeing measurable reduction (~50MB) in memory usage, i assume from Wireguard being moved to kernel space? This has been a Pi-hole, DNS (Unbound) and VPN (Wireguard) appliance for a number of years now, it just keeps getting better. Although, I'm tempted to begin testing the 64-bit RaspiOS... can't help but tinker.

Code: Select all

user@pihole
-------------
OS: Raspbian GNU/Linux 10 (buster) armv7l
Host: Raspberry Pi 3 Model B Plus Rev 1.3
Kernel: 5.10.11-v7+
CPU: BCM2835 (4) @ 1.400GHz
Memory: 106MiB / 973MiB

tigernero
Posts: 232
Joined: Fri Dec 30, 2016 5:51 pm

Re: Moving Linux Kernel to 5.10

Sun Feb 07, 2021 7:21 pm

after upgrade to kernel 5.10.11 i can't install wireguard on my p0. previously with kernel 5.4 I managed with wireguard site procedure compiling code, but now it tells me that kernel 5.10.x already has wireguard included and does not complete the compilation. on 64-bit Debian based reposity system by enabling budget backport I can solve, but on p0 armv6 I can't install 64bit version. how can i get wireguard on kernel 5.10.11 p0? didn't it already have to be included in the kernel?

iandk
Posts: 95
Joined: Tue Sep 10, 2019 4:42 pm

Re: Moving Linux Kernel to 5.10

Sun Feb 07, 2021 10:32 pm



I‘ve been using a Pi 4 as a NAS for quite some time now and it‘s been running great. 

But there was quite a read/write performance regression with some recent update. 



I guess it‘s related to the Kernel upgrade. 
I tested this by installing an older version of the 64Bit Raspberry Pi OS which is still running
5.4.51-v8+. 



With this kernel version there were no issues at all. 


But after upgrading the Kernel version and the other preinstalled base packages the transfer rate dropped to around 75MB/s via Samba and I a spiking IO wait

I tested this with two different drives and Pis and it’s definitely related to one of the latest (kernel) updates.

Do you need any log files or something?

User avatar
RamaSpaceShip
Posts: 229
Joined: Sun Apr 26, 2020 12:19 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 7:14 am

tigernero wrote:
Sun Feb 07, 2021 7:21 pm
after upgrade to kernel 5.10.11 i can't install wireguard on my p0. previously with kernel 5.4 I managed with wireguard site procedure compiling code, but now it tells me that kernel 5.10.x already has wireguard included and does not complete the compilation. on 64-bit Debian based reposity system by enabling budget backport I can solve, but on p0 armv6 I can't install 64bit version. how can i get wireguard on kernel 5.10.11 p0? didn't it already have to be included in the kernel?
"Kernel 5.10.x already has wireguard included" seems to be very clear to me, isn't it?
So you just have to install the wireguard tools. No need to install another wireguard kernel driver.

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 9:15 am

RamaSpaceShip wrote:
Mon Feb 08, 2021 7:14 am
tigernero wrote:
Sun Feb 07, 2021 7:21 pm
after upgrade to kernel 5.10.11 i can't install wireguard on my p0. previously with kernel 5.4 I managed with wireguard site procedure compiling code, but now it tells me that kernel 5.10.x already has wireguard included and does not complete the compilation. on 64-bit Debian based reposity system by enabling budget backport I can solve, but on p0 armv6 I can't install 64bit version. how can i get wireguard on kernel 5.10.11 p0? didn't it already have to be included in the kernel?
"Kernel 5.10.x already has wireguard included" seems to be very clear to me, isn't it?
So you just have to install the wireguard tools. No need to install another wireguard kernel driver.

wireguard-tools is not in the Raspberry Pi Operating System repositories.
Take what I advise as advice not the utopian holy grail, and it is gratis !!

tigernero
Posts: 232
Joined: Fri Dec 30, 2016 5:51 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 9:33 am

http://raspbian.raspberrypi.org/raspbia ... _armhf.deb

i found this in the repositories

Code: Select all

http://raspbian.raspberrypi.org/raspbian/pool/main/w/wireguard/wireguard-tools_1.0.20200827-1_armhf.deb

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 9:50 am

tigernero wrote:
Mon Feb 08, 2021 9:33 am
http://raspbian.raspberrypi.org/raspbia ... _armhf.deb

i found this in the repositories

Code: Select all

http://raspbian.raspberrypi.org/raspbian/pool/main/w/wireguard/wireguard-tools_1.0.20200827-1_armhf.deb

That is a .deb package, open Terminal:

Code: Select all

apt-cache policy wireguard-tools
Take what I advise as advice not the utopian holy grail, and it is gratis !!

tigernero
Posts: 232
Joined: Fri Dec 30, 2016 5:51 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 11:10 am

The speech is that with kernel 5.4.x I followed the kernel compilation procedure

Code: Select all

1) sudo su

2) apt install raspberrypi-kernel-headers libelf-dev libmnl-dev build-essential git

3) git clone https://git.zx2c4.com/wireguard-linux-compat

4) git clone https://git.zx2c4.com/wireguard-tools

We compile and install the modules we need

5) make -C wireguard-linux-compat/src -j$(nproc)

6) sudo make -C wireguard-linux-compat/src install

and I got both wireguard-linux-compact and wireguard-tool, after updating 5.4.x to 5.10.x the wireguard was kept.

But if I want to install from scratch on 5.10.x kernel wireguard that is not possible because the kernel compilation tells me that I have 5.10 kernel which already has wireguard, but how to get it if there is no wireguard tool?

With apt-cache policy wireguard-tools I don't have any packages available unfortunately

User avatar
RamaSpaceShip
Posts: 229
Joined: Sun Apr 26, 2020 12:19 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 11:31 am

To get the wireguard tools, one way is to use debian backports. Do this as root:
echo "deb http://deb.debian.org/debian buster-backports main" | tee --append /etc/apt/sources.list
bash -c 'printf "Package: *\nPin: release a=buster-backports\nPin-Priority: 90\n" > /etc/apt/preferences.d/limit-backports'
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
apt update
apt install wireguard-tools

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 12:12 pm

RamaSpaceShip wrote:
Mon Feb 08, 2021 11:31 am
To get the wireguard tools, one way is to use debian backports. Do this as root:
echo "deb http://deb.debian.org/debian buster-backports main" | tee --append /etc/apt/sources.list
bash -c 'printf "Package: *\nPin: release a=buster-backports\nPin-Priority: 90\n" > /etc/apt/preferences.d/limit-backports'
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
apt update
apt install wireguard-tools

One has to be careful in using Debian ARMHF Backports as they are compiled for ARMv7, if running an ARMv6 BCM2835 they may cause issues.
Take what I advise as advice not the utopian holy grail, and it is gratis !!

tigernero
Posts: 232
Joined: Fri Dec 30, 2016 5:51 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 1:36 pm

the above procedure doesn't work for armv6, the debian backport would work for armv7 but at that point I would put debian based 64 bit raspbian and use the backport. the p0 is armv6 and the backport doesn't work.

I get pissed off because up to 5.4 the compilation worked and if I do it and update kernel to 5.10 it still works.

if I install from 5.10 kernel without going through 5.4 it doesn't work anymore because the compilation already detects 5.10 kernels.

I have to try to compile only wireguard-tool and see if it always tells me that I have 5.10 kernel

tigernero
Posts: 232
Joined: Fri Dec 30, 2016 5:51 pm

Re: Moving Linux Kernel to 5.10

Mon Feb 08, 2021 1:52 pm

I SOLVED!!!!!

if you start wanting wireguard with kernel 5.10.x don't compile wireguard-linux-compact as wireguard is already included in the kernel, in fact compiling it warns you that the kernel already has the version included.
which is why wireguard-tools only needs to be compiled for p0 and all raspberry

with these commands

Code: Select all

1) sudo su

2) apt install raspberrypi-kernel-headers libelf-dev libmnl-dev build-essential git

3) git clone https://git.zx2c4.com/wireguard-tools

We compile and install the modules we need

4) cd /wireguard-tools/src/

5) sudo make

6) make install
while if you want to stay on kernel 5.4 you must also compile wireguard-linux-compact together with wireguard-tools

Code: Select all

1) sudo su

2) apt install raspberrypi-kernel-headers libelf-dev libmnl-dev build-essential git

3) git clone https://git.zx2c4.com/wireguard-linux-compat

4) git clone https://git.zx2c4.com/wireguard-tools

We compile and install the modules we need

5) cd /wireguard-linux-compat/src

6) make

7) make install

We compile and install the wg tool (8)

8) cd /wireguard-tools/src

9) make

10) make install

this works for both raspberrypi.org 32 base and debian base 64 bit version

deltasjimmy
Posts: 10
Joined: Mon Oct 26, 2020 10:50 am

Re: Moving Linux Kernel to 5.10

Tue Feb 09, 2021 3:55 pm

Do the RPi Team plan to pre-build downloadable OSs for 5.10 kernel on the website?

User avatar
rpdom
Posts: 20206
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Moving Linux Kernel to 5.10

Tue Feb 09, 2021 4:21 pm

deltasjimmy wrote:
Tue Feb 09, 2021 3:55 pm
Do the RPi Team plan to pre-build downloadable OSs for 5.10 kernel on the website?
The next set of images released should have the 5.10 kernels included as that is the standard version in use now.

It's just a matter of waiting until there are sufficient changes to justify building and testing a new set of images.
Unreadable squiggle

becrux
Posts: 2
Joined: Tue Feb 09, 2021 4:49 pm

Re: Moving Linux Kernel to 5.10

Tue Feb 09, 2021 4:56 pm

iandk wrote:
Sun Feb 07, 2021 10:32 pm


I‘ve been using a Pi 4 as a NAS for quite some time now and it‘s been running great. 

But there was quite a read/write performance regression with some recent update. 



I guess it‘s related to the Kernel upgrade. 
I tested this by installing an older version of the 64Bit Raspberry Pi OS which is still running
5.4.51-v8+. 



With this kernel version there were no issues at all. 


But after upgrading the Kernel version and the other preinstalled base packages the transfer rate dropped to around 75MB/s via Samba and I a spiking IO wait

I tested this with two different drives and Pis and it’s definitely related to one of the latest (kernel) updates.
Same issue in my case, RPi2.

Updated four days ago, the Samba transfer speed dropped to an unacceptable level.

And I got some failures when booting my RPi and USB disks are connected, blk_update_request I/O error, dev_sda. But the drives are fine, I've double checked them, and after the revert to 5.4 both disks are fine, and the network speed is back to normal. No idea why that happens, unfortunately.

One info more: if I booted the RPi without the USB drives, and then mounted them manually, everything was fine. :?:

iandk
Posts: 95
Joined: Tue Sep 10, 2019 4:42 pm

Re: Moving Linux Kernel to 5.10

Tue Feb 09, 2021 9:23 pm

becrux wrote:
Tue Feb 09, 2021 4:56 pm
iandk wrote:
Sun Feb 07, 2021 10:32 pm


I‘ve been using a Pi 4 as a NAS for quite some time now and it‘s been running great. 

But there was quite a read/write performance regression with some recent update. 



I guess it‘s related to the Kernel upgrade. 
I tested this by installing an older version of the 64Bit Raspberry Pi OS which is still running
5.4.51-v8+. 



With this kernel version there were no issues at all. 


But after upgrading the Kernel version and the other preinstalled base packages the transfer rate dropped to around 75MB/s via Samba and I a spiking IO wait

I tested this with two different drives and Pis and it’s definitely related to one of the latest (kernel) updates.
Same issue in my case, RPi2.

Updated four days ago, the Samba transfer speed dropped to an unacceptable level.

And I got some failures when booting my RPi and USB disks are connected, blk_update_request I/O error, dev_sda. But the drives are fine, I've double checked them, and after the revert to 5.4 both disks are fine, and the network speed is back to normal. No idea why that happens, unfortunately.

One info more: if I booted the RPi without the USB drives, and then mounted them manually, everything was fine. :?:
Good to hear that others have the same issue.

If you have GitHub, would you mind commenting, that you are experiencing the same issue?
https://github.com/raspberrypi/linux/issues/4133

User avatar
graysky
Posts: 201
Joined: Fri Apr 05, 2013 11:43 am
Location: /run/user/1000

Re: Moving Linux Kernel to 5.10

Wed Feb 10, 2021 11:50 am

iandk wrote:
Tue Feb 09, 2021 9:23 pm
If you have GitHub, would you mind commenting, that you are experiencing the same issue?
I don't think metoo posts to the already opened issue will help the developers diagnose this any faster.

iandk
Posts: 95
Joined: Tue Sep 10, 2019 4:42 pm

Re: Moving Linux Kernel to 5.10

Wed Feb 10, 2021 11:54 am

graysky wrote:
Wed Feb 10, 2021 11:50 am
iandk wrote:
Tue Feb 09, 2021 9:23 pm
If you have GitHub, would you mind commenting, that you are experiencing the same issue?
I don't think metoo posts to the already opened issue will help the developers diagnose this any faster.
That was not my intention.

But this kind of issues often seem to be related to a specific configuration.
Even tho I made sure that it‘s reproducible It‘s good to hear that others are experiencing the same

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

Re: Moving Linux Kernel to 5.10

Wed Feb 10, 2021 2:12 pm

graysky wrote:
Wed Feb 10, 2021 11:50 am
I don't think metoo posts to the already opened issue will help the developers diagnose this any faster.
I think adding to a github issue is fine if it is clear it is the same issue.

Treat it as you would if creating your own issue (describe fully the setup, what you are doing to see the issue and any logs).
New information is useful ("if I booted the RPi without the USB drives, and then mounted them manually, everything was fine." is interesting, especially if others on the github issue can confirm).

Never just report "me too" or "I have the same".
And carefully read the description. If bug report if about a blank screen issue when using the kms driver,
don't say "me too" when you are having a problem without using the kms driver.

becrux
Posts: 2
Joined: Tue Feb 09, 2021 4:49 pm

Re: Moving Linux Kernel to 5.10

Wed Feb 10, 2021 3:35 pm

dom wrote:
Wed Feb 10, 2021 2:12 pm
graysky wrote:
Wed Feb 10, 2021 11:50 am
I don't think metoo posts to the already opened issue will help the developers diagnose this any faster.
I think adding to a github issue is fine if it is clear it is the same issue.

Treat it as you would if creating your own issue (describe fully the setup, what you are doing to see the issue and any logs).
New information is useful ("if I booted the RPi without the USB drives, and then mounted them manually, everything was fine." is interesting, especially if others on the github issue can confirm).

Never just report "me too" or "I have the same".
And carefully read the description. If bug report if about a blank screen issue when using the kms driver,
don't say "me too" when you are having a problem without using the kms driver.
Agree. I could add my "me too" comment, but I don't think that this will help.

Unfortunately I don't have any traces, cause I needed my RPi2 up & working as soon as possible, so I just backup-ed my /etc dir, I cleared the whole installation, the latest Raspbian image still equips kernel 5.4, I've locked the raspberry-kernel update and restored the working behaviour.

So, no issue data, really sorry.

bschatzow
Posts: 19
Joined: Thu Jan 30, 2020 1:18 pm

Re: Moving Linux Kernel to 5.10

Wed Feb 10, 2021 3:55 pm

I have an issue with this kernel in Home Assistant. I was told that there latest OS build 5.11 is based on this kernel. My system lock up after 3 to 12 hours. I boot on an SSD drive using the 64 bit version. I had no issues with Home Assistant prior to them switch to the 5.x Linux Kernel. How can I troubleshoot this to try and see what is causing the system lockups?
Bill

Return to “Advanced users”