andrum99
Posts: 1259
Joined: Fri Jul 20, 2012 2:41 pm

Re: Moving Linux Kernel to 5.4

Sat May 02, 2020 10:50 am

Picked up the 5.4.35 kernel from rpi-update BRANCH=master this morning. All running well on a Pi 3B+ with an Adafruit PiTFT plus 2.8" LCD w/touchscreen installed on top, showing a copy of HDMI output via fbtft SPI interface. Updated using rpi-update, rebooted and everything seems to be working. 👍

Edit: fiddled with config - turns out I don't have it configured to mirror HDMI output - it's set up as an independent frame buffer. Now running Kodi via HDMI port, independent of secondary framebuffer.

HDMI connected to 1080p TV @ 60Hz. Playing various videos - mostly BluRay rips that are 1920 wide, nominally 1080p depending on aspect ratio (some are super-wide screen). All works fine with gpumem set to 320 per rascas' recommendation while on 4.19.y.
Last edited by andrum99 on Sun May 03, 2020 8:16 am, edited 3 times in total.

User avatar
DougieLawson
Posts: 39565
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Moving Linux Kernel to 5.4

Sat May 02, 2020 11:09 am

MrEngman.
Have you started building your WiFi modules for 5.4?

Code: Select all

Running command 'sudo rpi-update' will load:

        kernel revision = 5.4.35+
        kernel build    = #1314

Checking for a 8188eu wifi driver module if you run command 'sudo rpi-update'.
A driver does not yet exist for this update.
Or have you pursuaded the RPF folks to build your stuff into their kernel & modules?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

MrEngman
Posts: 4051
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Moving Linux Kernel to 5.4

Sat May 02, 2020 5:33 pm

DougieLawson wrote:
Sat May 02, 2020 11:09 am
MrEngman.
Have you started building your WiFi modules for 5.4?

Code: Select all

Running command 'sudo rpi-update' will load:

        kernel revision = 5.4.35+
        kernel build    = #1314

Checking for a 8188eu wifi driver module if you run command 'sudo rpi-update'.
A driver does not yet exist for this update.
Or have you pursuaded the RPF folks to build your stuff into their kernel & modules?
Trying to get the drivers sorted out for kernel 5.4. 8188eu drivers are now available for 5.4.35+ #1314.

Currently just running on a Pi 0W and a Pi 3A+ but appear to be OK.

It would be really useful if RPF could include them in their images.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
DougieLawson
Posts: 39565
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Moving Linux Kernel to 5.4

Sat May 02, 2020 5:37 pm

MrEngman wrote:
Sat May 02, 2020 5:33 pm
DougieLawson wrote:
Sat May 02, 2020 11:09 am
MrEngman.
Have you started building your WiFi modules for 5.4?

Code: Select all

Running command 'sudo rpi-update' will load:

        kernel revision = 5.4.35+
        kernel build    = #1314

Checking for a 8188eu wifi driver module if you run command 'sudo rpi-update'.
A driver does not yet exist for this update.
Or have you pursuaded the RPF folks to build your stuff into their kernel & modules?
Trying to get the drivers sorted out for kernel 5.4. 8188eu drivers are now available for 5.4.35+ #1314.

Currently just running on a Pi 0W and a Pi 3A+ but appear to be OK.

It would be really useful if RPF could include them in their images.


MrEngman
Brilliant, thank you. I'm about to test that one on a RP1B.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

pboh
Posts: 13
Joined: Wed Oct 31, 2018 2:26 pm

Re: Moving Linux Kernel to 5.4

Sun May 03, 2020 6:20 am

DougieLawson wrote:
Sat May 02, 2020 5:37 pm
MrEngman wrote:
Sat May 02, 2020 5:33 pm
DougieLawson wrote:
Sat May 02, 2020 11:09 am
MrEngman.
Have you started building your WiFi modules for 5.4?

Code: Select all

Running command 'sudo rpi-update' will load:

        kernel revision = 5.4.35+
        kernel build    = #1314

Checking for a 8188eu wifi driver module if you run command 'sudo rpi-update'.
A driver does not yet exist for this update.
Or have you pursuaded the RPF folks to build your stuff into their kernel & modules?
Trying to get the drivers sorted out for kernel 5.4. 8188eu drivers are now available for 5.4.35+ #1314.

Currently just running on a Pi 0W and a Pi 3A+ but appear to be OK.

It would be really useful if RPF could include them in their images.


MrEngman
Brilliant, thank you. I'm about to test that one on a RP1B.
5.4.35-v7l+ and v8 working great for me on a few separate Rasbian installs with varying levels of customization (from stock onwards). The few anomalies I can't yet reconcile are (and the first of which being reason I replied to this particular post):

- I can't seem to get the 8822bu driver to load - whether it's hotplugged or connected at boot, this pastebin happens and the interface is never recognized: https://pastebin.com/uEj3iZm1

- as called out in another post in this thread, I can't seem to play most videos in Kodi - unless I disable CEC the HDMI on my displays flips (which is not the real problem, that's just an annoyance I can fix), but video does not play when the v3d-pi4 overlay is on (with or without rpivid-v4l2)

- on one particularly vanilla install of Rasbpian but with an older display, I see a lot of the following:

Code: Select all

[  241.111428] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:65:crtc-2] flip_done timed out
[  251.351430] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:32:HDMI-A-1] flip_done timed out
[  261.591437] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:65:crtc-2] flip_done timed out
In any case, no complaints here, just some added info in case it's helpful - quite likely I've missed something easy in all three cases :)

CyberDeath
Posts: 12
Joined: Sun Feb 09, 2020 12:30 pm

Re: Moving Linux Kernel to 5.4

Sun May 03, 2020 10:50 am

Ok so for me its not ok ... i was realy not positively suprised by 5.4 .
Everything look good but ... the temp in my OC system are higer (from 42 in idle with 4.19.118 , to 51 in 5.4.35)
And Kodi dont work. It runs ok ... but no sound from interface and when try to run TV or any sound it crash.
Im on alsa (no muxer in system) .. in system the sound is ok ... in kodi crash.
I have try fkms x kms , sound by new v4c driver like in first page ... hdmi driver 2 ... manualy set cec ... even force audio to analog ...
Nothing workd ...
After reinstal kernel to last stable (4.19.97) everithing ok.
So after 2h trying and mistake i restore rclone backup to last working state ( 4.19.118) and be waiting to kodi 19 (its optimalizet to 5.4 kernel)

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

Re: Moving Linux Kernel to 5.4

Sun May 03, 2020 11:58 am

pboh wrote:
Sun May 03, 2020 6:20 am
- as called out in another post in this thread, I can't seem to play most videos in Kodi - unless I disable CEC the HDMI on my displays flips (which is not the real problem, that's just an annoyance I can fix), but video does not play when the v3d-pi4 overlay is on (with or without rpivid-v4l2)
To confirm is the CEC problem with v3d-kms-vc4-pi4 overlay, but okay with v3d-fkms-vc4?
You fix it by disabling CEC in system/input/peripheral/CEC settings?
What do you mean by display flips? Mirrors/inverts, or just stops working?

CEC doesn't work yet with kms driver, but I wasn't aware of it breaking video.

tompreston
Posts: 1
Joined: Mon May 04, 2020 12:13 pm

Re: Moving Linux Kernel to 5.4

Mon May 04, 2020 12:21 pm

Hi,
I see a warning at boot related to HDMI on the rpi-5.4.y branch, commit dde08ebd8873

Code: Select all

dde08ebd8873 overlays: Make the i2c-gpio overlay safe again
The warning is:

Code: Select all

[    6.055586] WARNING: CPU: 1 PID: 135 at drivers/gpu/drm/vc4/vc4_hdmi_phy.c:414 vc5_hdmi_phy_init+0x7b4/0x2078 [vc4]
Full dmesg https://pastebin.com/4NYaaEff

The warning comes from the VC4_SET_FIELD macro, which checks that the register value is contained within the register mask. It looks like the warning is because phy_get_cp_current returns an 8-bit value, but the mask is only 6 bits. Either way the mask is applied so the 0xc8 turns into 0x08.

I need to find out what the register is supposed to be set to and what the effect of setting it to 0x08 is. Where is the datasheet containing BCM2711 HDMI registers? I don't seem them in any resources in the technical info page https://www.raspberrypi.org/documentati ... i/bcm2711/

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

Re: Moving Linux Kernel to 5.4

Mon May 04, 2020 1:35 pm

tompreston wrote:
Mon May 04, 2020 12:21 pm
I need to find out what the register is supposed to be set to and what the effect of setting it to 0x08 is. Where is the datasheet containing BCM2711 HDMI registers? I don't seem them in any resources in the technical info page https://www.raspberrypi.org/documentati ... i/bcm2711/
That peripheral doesn't have any public documentation.

You've got some replies on your github issue that mention that there already is a fix for this.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9278
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Moving Linux Kernel to 5.4

Mon May 04, 2020 1:49 pm

tompreston wrote:
Mon May 04, 2020 12:21 pm
Hi,
I see a warning at boot related to HDMI on the rpi-5.4.y branch, commit dde08ebd8873

Code: Select all

dde08ebd8873 overlays: Make the i2c-gpio overlay safe again
The warning is:

Code: Select all

[    6.055586] WARNING: CPU: 1 PID: 135 at drivers/gpu/drm/vc4/vc4_hdmi_phy.c:414 vc5_hdmi_phy_init+0x7b4/0x2078 [vc4]
Full dmesg https://pastebin.com/4NYaaEff

The warning comes from the VC4_SET_FIELD macro, which checks that the register value is contained within the register mask. It looks like the warning is because phy_get_cp_current returns an 8-bit value, but the mask is only 6 bits. Either way the mask is applied so the 0xc8 turns into 0x08.

I need to find out what the register is supposed to be set to and what the effect of setting it to 0x08 is. Where is the datasheet containing BCM2711 HDMI registers? I don't seem them in any resources in the technical info page https://www.raspberrypi.org/documentati ... i/bcm2711/
Double posting between the forums and github is annoying as it's the same people maintaining both.
You've got your answer on https://github.com/raspberrypi/linux/issues/3594. The fix is now merged to rpi-5.4.y.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

pboh
Posts: 13
Joined: Wed Oct 31, 2018 2:26 pm

Re: Moving Linux Kernel to 5.4

Mon May 04, 2020 3:06 pm

dom wrote:
Sun May 03, 2020 11:58 am
pboh wrote:
Sun May 03, 2020 6:20 am
- as called out in another post in this thread, I can't seem to play most videos in Kodi - unless I disable CEC the HDMI on my displays flips (which is not the real problem, that's just an annoyance I can fix), but video does not play when the v3d-pi4 overlay is on (with or without rpivid-v4l2)
To confirm is the CEC problem with v3d-kms-vc4-pi4 overlay, but okay with v3d-fkms-vc4?
You fix it by disabling CEC in system/input/peripheral/CEC settings?
What do you mean by display flips? Mirrors/inverts, or just stops working?

CEC doesn't work yet with kms driver, but I wasn't aware of it breaking video.
Ah, sorry, I was definitely lazy with my use of words there :) By 'flipping', I meant the HDMI source on the TV changed spuriously.

With v3d-fkms-pi: when the Pi comes up, if the TV is not on, it will be turned on to the correct input. If I load Kodi and start/stop videos from within, no further change to the TV's input occurs. Both video and audio play nicely. If the TV is on already, and on the Pi input, I see the startup process roll by and am eventually dropped at a command prompt.

With v3d-kms-vc4-pi4, if the TV is not on, it will be turned on to the correct input. If I load Kodi, almost instantly the HDMI input on the TV changes to another input (flips "off" of the Pi's input). If I manually go back to the Pi's input, I see the Kodi interface. If I choose anything which starts a video rendering 'thing' (I'm super weak at the interrelationship between all the video components, sorry), e.g. a movie, Youtube, whatever, the HDMI input on the TV "flips" off of the Pi to another input. I can manually change it back; however, no video plays (while audio is playing in the background). Kodi does not complain in its logs about not being able to find a renderer as I have seen in the past. When I exit Kodi, there is an error message waiting at shell for me about not being able to select HDMI via explicit mode, but I was rushing out of the house and failed to grab the exact text.

Again with the caveat that I know so little about mmal and ffmpeg and v4l and all the video things, what it seems like is when using vc4-pi, something tries to engage whatever component will render video, I see 'anomolous' CEC behavior as if the TV detects for a moment there is no longer HDMI asserted.

I would imagine this issue (if it's even an issue at all) is decoupled from the lack of being able to see video in Kodi but I might have commingled them accidentally. Based on a quick read I tried the rpivid-v4l2 overlay with no joy on video, but perhaps the answer is I just need to keep learning about the video components and it's a figure-it-out-myself sort of thing :) I am using rascas' Kodi build, by the way, which I think is GBM (I don't have any WM, DE, etc. installed).

Thanks for reading all of these reports and being so diligent about answering them - you all at the RPF are fantastic.

[orthogonally: still struggling with the Wifi as mentioned in my original reply, but will try to ping MrEngman offline and report back if there's anything beyond user error]

User avatar
CaptainMidnight
Posts: 95
Joined: Sun Nov 03, 2019 4:32 pm
Location: UK

Re: Moving Linux Kernel to 5.4

Tue May 05, 2020 2:13 pm

@dom

Hi, just been testing an upgrade of a test RPi4B2 ntp server which uses an u-bloc ntp HAT to the 5.4 kernel - the gps HAT is still operational but it appears the PPS functionality is now broken.

All rpi-update tests prior to the change to the 5.4 build have been successful i.e. 4.x continued operation of ntp server PPS functionality.

I do notice there appears to be a 'crash' or 'kernel panic' during the boot process and include the dmesg trace section below - has the 5.4 kernel removed PPS functionality?

Code: Select all

[    0.525293] ------------[ cut here ]------------
[    0.525309] WARNING: CPU: 0 PID: 1 at mm/page_alloc.c:4727 __alloc_pages_nodemask+0x2d4/0x338
[    0.525312] Modules linked in:
[    0.525318] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.35-v8+ #1314
[    0.525320] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[    0.525324] pstate: 20000005 (nzCv daif -PAN -UAO)
[    0.525327] pc : __alloc_pages_nodemask+0x2d4/0x338
[    0.525333] lr : __dma_direct_alloc_pages+0x180/0x230
[    0.525335] sp : ffffffc01002b860
[    0.525338] x29: ffffffc01002b860 x28: ffffff807ca24168
[    0.525342] x27: ffffff807ca24080 x26: ffffff807ca24080
[    0.525345] x25: 0000000000000cc1 x24: 0000000000000000
[    0.525348] x23: 000fffffffffffff x22: ffffffc010e28000
[    0.525352] x21: 0000000000000000 x20: 0000000000000034
[    0.525355] x19: 0000000000000cc1 x18: ffffffc010e28888
[    0.525358] x17: 00000000d28d0f0f x16: 0000000044ffcb52
[    0.525361] x15: ffffffc09002ba07 x14: ffffffffffffffff
[    0.525364] x13: ffffffc01000d000 x12: ffffffffffffffff
[    0.525367] x11: 0000000000000040 x10: 0000000000000000
[    0.525370] x9 : 0000000000000000 x8 : ffffffc010e28888
[    0.525374] x7 : 0000000000000000 x6 : 0000000000000000
[    0.525377] x5 : 0000000000000000 x4 : 0000000000000000
[    0.525380] x3 : 0000000000000000 x2 : 0000000000000000
[    0.525382] x1 : 0000000000000000 x0 : ffffffc010e28888
[    0.525386] Call trace:
[    0.525390]  __alloc_pages_nodemask+0x2d4/0x338
[    0.525394]  __dma_direct_alloc_pages+0x180/0x230
[    0.525397]  arch_dma_alloc+0xe0/0x190
[    0.525400]  dma_direct_alloc+0x80/0x98
[    0.525403]  dma_alloc_attrs+0x88/0xf8
[    0.525409]  bcm2708_fb_set_par+0x154/0x3b8
[    0.525413]  bcm2708_fb_probe+0x318/0x630
[    0.525418]  platform_drv_probe+0x54/0xb0
[    0.525420]  really_probe+0x110/0x390
[    0.525423]  driver_probe_device+0x60/0x108
[    0.525426]  device_driver_attach+0x74/0x80
[    0.525428]  __driver_attach+0xc0/0x100
[    0.525431]  bus_for_each_dev+0x78/0xe0
[    0.525433]  driver_attach+0x30/0x40
[    0.525436]  bus_add_driver+0x158/0x210
[    0.525439]  driver_register+0x68/0x118
[    0.525442]  __platform_driver_register+0x54/0x60
[    0.525449]  bcm2708_fb_init+0x20/0x28
[    0.525453]  do_one_initcall+0x54/0x2b8
[    0.525458]  kernel_init_freeable+0x200/0x2b8
[    0.525464]  kernel_init+0x18/0x110
[    0.525467]  ret_from_fork+0x10/0x1c
[    0.525473] ---[ end trace 76be8bbd4953795f ]---
As this is purely a test ntp server setup, is there any additional testing / debug logs that I can supply to try and narrow done the issue with the PPS functionality.......

Obviously, but to confirm, any regression to a prior 4.19 build results in a return of ntp PPS functionality.

CM
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

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

Re: Moving Linux Kernel to 5.4

Tue May 05, 2020 2:17 pm

The lack of PPS has already been traced to some missing kernel config settings for 2711 - see https://github.com/raspberrypi/linux/issues/3593 - which will be restored in the next release.

User avatar
CaptainMidnight
Posts: 95
Joined: Sun Nov 03, 2019 4:32 pm
Location: UK

Re: Moving Linux Kernel to 5.4

Tue May 05, 2020 2:21 pm

PhilE wrote:
Tue May 05, 2020 2:17 pm
The lack of PPS has already been traced to some missing kernel config settings for 2711 - see https://github.com/raspberrypi/linux/issues/3593 - which will be restored in the next release.
Thanks for the quick reply, I'll review that info.

CM
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

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

Re: Moving Linux Kernel to 5.4

Tue May 05, 2020 3:13 pm

CaptainMidnight wrote:
Tue May 05, 2020 2:13 pm
I do notice there appears to be a 'crash' or 'kernel panic' during the boot process and include the dmesg trace section below - has the 5.4 kernel removed PPS functionality?

Code: Select all

[    0.525293] ------------[ cut here ]------------
[    0.525309] WARNING: CPU: 0 PID: 1 at mm/page_alloc.c:4727 __alloc_pages_nodemask+0x2d4/0x338
[    0.525312] Modules linked in:
[    0.525318] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.35-v8+ #1314
[    0.525320] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[    0.525324] pstate: 20000005 (nzCv daif -PAN -UAO)
[    0.525327] pc : __alloc_pages_nodemask+0x2d4/0x338
[    0.525333] lr : __dma_direct_alloc_pages+0x180/0x230
[    0.525335] sp : ffffffc01002b860
[    0.525338] x29: ffffffc01002b860 x28: ffffff807ca24168
[    0.525342] x27: ffffff807ca24080 x26: ffffff807ca24080
[    0.525345] x25: 0000000000000cc1 x24: 0000000000000000
[    0.525348] x23: 000fffffffffffff x22: ffffffc010e28000
[    0.525352] x21: 0000000000000000 x20: 0000000000000034
[    0.525355] x19: 0000000000000cc1 x18: ffffffc010e28888
[    0.525358] x17: 00000000d28d0f0f x16: 0000000044ffcb52
[    0.525361] x15: ffffffc09002ba07 x14: ffffffffffffffff
[    0.525364] x13: ffffffc01000d000 x12: ffffffffffffffff
[    0.525367] x11: 0000000000000040 x10: 0000000000000000
[    0.525370] x9 : 0000000000000000 x8 : ffffffc010e28888
[    0.525374] x7 : 0000000000000000 x6 : 0000000000000000
[    0.525377] x5 : 0000000000000000 x4 : 0000000000000000
[    0.525380] x3 : 0000000000000000 x2 : 0000000000000000
[    0.525382] x1 : 0000000000000000 x0 : ffffffc010e28888
[    0.525386] Call trace:
[    0.525390]  __alloc_pages_nodemask+0x2d4/0x338
[    0.525394]  __dma_direct_alloc_pages+0x180/0x230
[    0.525397]  arch_dma_alloc+0xe0/0x190
[    0.525400]  dma_direct_alloc+0x80/0x98
[    0.525403]  dma_alloc_attrs+0x88/0xf8
[    0.525409]  bcm2708_fb_set_par+0x154/0x3b8
[    0.525413]  bcm2708_fb_probe+0x318/0x630
[    0.525418]  platform_drv_probe+0x54/0xb0
[    0.525420]  really_probe+0x110/0x390
[    0.525423]  driver_probe_device+0x60/0x108
[    0.525426]  device_driver_attach+0x74/0x80
[    0.525428]  __driver_attach+0xc0/0x100
[    0.525431]  bus_for_each_dev+0x78/0xe0
[    0.525433]  driver_attach+0x30/0x40
[    0.525436]  bus_add_driver+0x158/0x210
[    0.525439]  driver_register+0x68/0x118
[    0.525442]  __platform_driver_register+0x54/0x60
[    0.525449]  bcm2708_fb_init+0x20/0x28
[    0.525453]  do_one_initcall+0x54/0x2b8
[    0.525458]  kernel_init_freeable+0x200/0x2b8
[    0.525464]  kernel_init+0x18/0x110
[    0.525467]  ret_from_fork+0x10/0x1c
[    0.525473] ---[ end trace 76be8bbd4953795f ]---
This warning is unrelated to PPS. It is because you don't have any display attached. I wrote an issue for this yesterday but didn't get around to submitting it. I've done it now and its at https://github.com/raspberrypi/linux/issues/3598

User avatar
CaptainMidnight
Posts: 95
Joined: Sun Nov 03, 2019 4:32 pm
Location: UK

Re: Moving Linux Kernel to 5.4

Tue May 05, 2020 4:56 pm

trejan wrote:
Tue May 05, 2020 3:13 pm
This warning is unrelated to PPS. It is because you don't have any display attached. I wrote an issue for this yesterday but didn't get around to submitting it. I've done it now and its at https://github.com/raspberrypi/linux/issues/3598
Ah ok, thanks for the heads-up.

CM
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

pboh
Posts: 13
Joined: Wed Oct 31, 2018 2:26 pm

Re: Moving Linux Kernel to 5.4

Tue May 05, 2020 10:22 pm

pboh wrote:
Sun May 03, 2020 6:20 am
DougieLawson wrote:
Sat May 02, 2020 5:37 pm
MrEngman wrote:
Sat May 02, 2020 5:33 pm

Trying to get the drivers sorted out for kernel 5.4. 8188eu drivers are now available for 5.4.35+ #1314.

Currently just running on a Pi 0W and a Pi 3A+ but appear to be OK.

It would be really useful if RPF could include them in their images.


MrEngman
Brilliant, thank you. I'm about to test that one on a RP1B.
5.4.35-v7l+ and v8 working great for me on a few separate Rasbian installs with varying levels of customization (from stock onwards). The few anomalies I can't yet reconcile are (and the first of which being reason I replied to this particular post):

- I can't seem to get the 8822bu driver to load - whether it's hotplugged or connected at boot, this pastebin happens and the interface is never recognized: https://pastebin.com/uEj3iZm1
Wanted to revisit some of the issues I'm having wrt Wifi using #1314. Debated whether it was appropriate to spin another thread for this or not so please feel free to move if I should have.. but figured it was ok given the intersection of the driver work with the new kernel.

Having just completed a fresh install of Raspbian (both Lite and Desktop-Lite), I have issues with two separate USB Wifi devices. I've posted dmesg results from both below, in case they're helpful. Apologies if these are known and it's just part of development but just wanted to share my experience thusfar:

8812au: https://pastebin.com/5bLbB7MG
8822bu: https://pastebin.com/8UpJrQfj

On neither occasion do I get presented with a wifi interface (though if it's not obvious, the onboard wifi works fine depending on whether I have it overlayed out or not).

I'll try some other external USB wifi adaptors I have lying around tonight.

Thanks for all the hard work that goes into making all this work!

MrEngman
Posts: 4051
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Moving Linux Kernel to 5.4

Wed May 06, 2020 1:14 am

pboh wrote:
Tue May 05, 2020 10:22 pm
pboh wrote:
Sun May 03, 2020 6:20 am
DougieLawson wrote:
Sat May 02, 2020 5:37 pm

Brilliant, thank you. I'm about to test that one on a RP1B.
5.4.35-v7l+ and v8 working great for me on a few separate Rasbian installs with varying levels of customization (from stock onwards). The few anomalies I can't yet reconcile are (and the first of which being reason I replied to this particular post):

- I can't seem to get the 8822bu driver to load - whether it's hotplugged or connected at boot, this pastebin happens and the interface is never recognized: https://pastebin.com/uEj3iZm1
Wanted to revisit some of the issues I'm having wrt Wifi using #1314. Debated whether it was appropriate to spin another thread for this or not so please feel free to move if I should have.. but figured it was ok given the intersection of the driver work with the new kernel.

Having just completed a fresh install of Raspbian (both Lite and Desktop-Lite), I have issues with two separate USB Wifi devices. I've posted dmesg results from both below, in case they're helpful. Apologies if these are known and it's just part of development but just wanted to share my experience thusfar:

8812au: https://pastebin.com/5bLbB7MG
8822bu: https://pastebin.com/8UpJrQfj

On neither occasion do I get presented with a wifi interface (though if it's not obvious, the onboard wifi works fine depending on whether I have it overlayed out or not).

I'll try some other external USB wifi adaptors I have lying around tonight.

Thanks for all the hard work that goes into making all this work!
I'm still working on sorting out the wifi drivers I compile for kernel 5.4 and had yet to look at the 8822bu driver.

Tried with a 8822bu wifi on a Pi 0 W and get a similar error, although the initial error I see is with a kernel file:-

Code: Select all

[   19.094334] 8822bu: loading out-of-tree module taints kernel.
[   19.370622] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   19.370874] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   19.372368] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 22 2019 01:59:28 version 7.45.98.94 (r723000 CY) FWID 01-3b33decd
[   28.026213] ------------[ cut here ]------------
[   28.027723] WARNING: CPU: 0 PID: 122 at net/wireless/core.c:867 wiphy_register+0x9d4/0xc84 [cfg80211]
[   28.027785] Modules linked in: 8822bu(O+) brcmfmac brcmutil sha256_generic libsha256 cfg80211 raspberrypi_hwmon rfkill hwmon bcm2835_codec(C) snd_bcm2835(C) bcm2835_isp(C) bcm2835_v4l2(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 snd_pcm videobuf2_common snd_timer snd vc_sm_cma(C) videodev mc uio_pdrv_genirq fixed uio ip_tables x_tables ipv6 nf_defrag_ipv6
[   28.028018] CPU: 0 PID: 122 Comm: systemd-udevd Tainted: G         C O      5.4.35+ #1314
[   28.028031] Hardware name: BCM2835
[   28.028042] Backtrace:
[   28.028089] [<c0014c98>] (dump_backtrace) from [<c0014f88>] (show_stack+0x20/0x24)
[   28.028132]  r6:00000009 r5:00000000 r4:00000000 r3:de3cb0cb
[   28.028163] [<c0014f68>] (show_stack) from [<c072ad3c>] (dump_stack+0x20/0x28)
[   28.028199] [<c072ad1c>] (dump_stack) from [<c00237e8>] (__warn+0xdc/0x100)
[   28.028245] [<c002370c>] (__warn) from [<c00238bc>] (warn_slowpath_fmt+0xb0/0xc0)
[   28.028271]  r9:bf377710 r8:00000363 r7:bf3198cc r6:00000009 r5:c0a19028 r4:00000000
[   28.029686] [<c0023810>] (warn_slowpath_fmt) from [<bf3198cc>] (wiphy_register+0x9d4/0xc84 [cfg80211])
[   28.029763]  r9:0000001e r8:bf38b4c0 r7:0000003a r6:d46e5278 r5:c0a19028 r4:d46e51a0
[   28.033921] [<bf318ef8>] (wiphy_register [cfg80211]) from [<bf72e850>] (rtw_wiphy_register+0x50/0x60 [8822bu])
[   28.034164]  r10:dd431000 r9:bf8b2a28 r8:bf8b2a28 r7:dd433bdc r6:d46e4800 r5:dd433c88
[   28.034181]  r4:d46e51a0
[   28.039814] [<bf72e800>] (rtw_wiphy_register [8822bu]) from [<bf72ed00>] (rtw_cfg80211_ndev_res_register+0x24/0x78 [8822bu])
[   28.039895]  r4:dd431000 r3:dd434000
[   28.045521] [<bf72ecdc>] (rtw_cfg80211_ndev_res_register [8822bu]) from [<bf70eb7c>] (rtw_os_ndev_register+0x108/0x1b4 [8822bu])
[   28.045745]  r4:dd431000 r3:00000000
Unfortunately, my knowledge of this type of problem and coding is pretty much zero so hopefully someone with some understand of how the code works can suggest what to look at. I have saved the full output of dmesg.

In the meantime I will be looking for alternative 8822bu code that compiles for kernel 5.4 and doesn't cause this issue.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

ag123
Posts: 111
Joined: Sun Dec 18, 2016 7:54 am

Re: Moving Linux Kernel to 5.4

Wed May 06, 2020 12:40 pm

If you are feeling especially bold, you can try the kms driver. Rather than dtoverlay=vc4-fkms-v3d, switch to dtoverlay=vc4-kms-v3d-pi4 on a pi4, or dtoverlay=vc4-kms-v3d on Pi2/3 (not recommended on Pi0/1).

Note: kms won’t ever support applications that use firmware apis for display like dispmanx, or mmal/openmax video_render, including omxplayer, raspivid and non-gbm kodi. Similarly tvservice is not useful in this environment.
just some quick questions, would some of the 'old' firmware based vc functions still be available in 5.4? i.e. is kms 'mandatory' in the switch over to 5.4? do the new kms driver provide for the 'old' functionalities? e.g. i did use tvservice for an odd purpose, to turn off hdmi while running headless, it would be ok if there is an equivalent of tvservice for kms. i'd guess it would be the same for others mentioned.

i'm half-way thinking if i'd 'upgrade', i may make a new sd card for it just to be on the safe side, in case i'd need to 'downgrade' again.

ag123
Posts: 111
Joined: Sun Dec 18, 2016 7:54 am

Re: Moving Linux Kernel to 5.4

Wed May 06, 2020 12:51 pm

jamesh wrote:
Fri Apr 03, 2020 3:52 pm
dickon wrote:
Fri Apr 03, 2020 11:32 am
What's the advantage of this over whatever the traditional route has been? If it's ARM-side, surely that means more load?
Same as all the other stuff - standardised code, open source. The way I look at is the ARM are getting more powerful faster than the VC is getting more powerful (ARM has more developers working on it than Broadcom has developers working on VCx!!), so it's better to move stuff to the ARM.
It's also much better to avoid all that horrible copying to and from the GPU from ARM space.
GPUs do have use cases where they are relevant a lot of gpus and so do some of the 'neural' accelerators goes on the basis of large number of vector registers, so if there are say 100 register 'threads', multiplying and adding 100 numbers to 100 numbers and summing all that 100 (a + b x c) takes the same few (e.g. 1) clock cycles. it is a reason even Intel 'performance' superscalar processors e.g. the i7, i9 running at 4ghz etc didn't quite catch up with GPUs running at a mere 1 ghz. you can't beat 100,000 concurrent vector calculations in a same few clock cycles.

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

Re: Moving Linux Kernel to 5.4

Wed May 06, 2020 2:07 pm

ag123 wrote:
Wed May 06, 2020 12:40 pm
just some quick questions, would some of the 'old' firmware based vc functions still be available in 5.4? i.e. is kms 'mandatory' in the switch over to 5.4? do the new kms driver provide for the 'old' functionalities? e.g. i did use tvservice for an odd purpose, to turn off hdmi while running headless, it would be ok if there is an equivalent of tvservice for kms. i'd guess it would be the same for others mentioned.
kms is optional and non-default on 5.4 kernel. You won't lose any firmware features like tvservice if you upgrade to 5.4 and don't switch to kms.
kms may one day become the default on Pi4, but if so switching back to fkms or legacy display will still be an option for a very long time.

tvjon
Posts: 798
Joined: Mon Jan 07, 2013 9:11 am

Re: Moving Linux Kernel to 5.4

Wed May 06, 2020 2:14 pm

dom wrote:
Wed May 06, 2020 2:07 pm
[... back to fkms or legacy display will still be an option for a very long time.
That's a relief, thank you.

MrEngman
Posts: 4051
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Moving Linux Kernel to 5.4

Wed May 06, 2020 3:56 pm

pboh wrote:
Tue May 05, 2020 10:22 pm
pboh wrote:
Sun May 03, 2020 6:20 am
DougieLawson wrote:
Sat May 02, 2020 5:37 pm

Brilliant, thank you. I'm about to test that one on a RP1B.
5.4.35-v7l+ and v8 working great for me on a few separate Rasbian installs with varying levels of customization (from stock onwards). The few anomalies I can't yet reconcile are (and the first of which being reason I replied to this particular post):

- I can't seem to get the 8822bu driver to load - whether it's hotplugged or connected at boot, this pastebin happens and the interface is never recognized: https://pastebin.com/uEj3iZm1
Wanted to revisit some of the issues I'm having wrt Wifi using #1314. Debated whether it was appropriate to spin another thread for this or not so please feel free to move if I should have.. but figured it was ok given the intersection of the driver work with the new kernel.

Having just completed a fresh install of Raspbian (both Lite and Desktop-Lite), I have issues with two separate USB Wifi devices. I've posted dmesg results from both below, in case they're helpful. Apologies if these are known and it's just part of development but just wanted to share my experience thusfar:

8812au: https://pastebin.com/5bLbB7MG
8822bu: https://pastebin.com/8UpJrQfj

On neither occasion do I get presented with a wifi interface (though if it's not obvious, the onboard wifi works fine depending on whether I have it overlayed out or not).

I'll try some other external USB wifi adaptors I have lying around tonight.

Thanks for all the hard work that goes into making all this work!
Updated the 8822bu driver with new source and it appears to be working OK now. No more kernel panics etc.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26849
Joined: Sat Jul 30, 2011 7:41 pm

Re: Moving Linux Kernel to 5.4

Wed May 06, 2020 4:23 pm

ag123 wrote:
Wed May 06, 2020 12:51 pm
jamesh wrote:
Fri Apr 03, 2020 3:52 pm
dickon wrote:
Fri Apr 03, 2020 11:32 am
What's the advantage of this over whatever the traditional route has been? If it's ARM-side, surely that means more load?
Same as all the other stuff - standardised code, open source. The way I look at is the ARM are getting more powerful faster than the VC is getting more powerful (ARM has more developers working on it than Broadcom has developers working on VCx!!), so it's better to move stuff to the ARM.
It's also much better to avoid all that horrible copying to and from the GPU from ARM space.
GPUs do have use cases where they are relevant a lot of gpus and so do some of the 'neural' accelerators goes on the basis of large number of vector registers, so if there are say 100 register 'threads', multiplying and adding 100 numbers to 100 numbers and summing all that 100 (a + b x c) takes the same few (e.g. 1) clock cycles. it is a reason even Intel 'performance' superscalar processors e.g. the i7, i9 running at 4ghz etc didn't quite catch up with GPUs running at a mere 1 ghz. you can't beat 100,000 concurrent vector calculations in a same few clock cycles.
Except the VideoCore only has a 16 way SIMD operation, so NEON is a better bet once you take setup and copying to and from the GPU in to account. ANd since the VC isn't getting the same level of support as you see on ARM, it's unlikely to improve.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

opscrafts
Posts: 1
Joined: Thu May 07, 2020 4:58 pm

Re: Moving Linux Kernel to 5.4

Thu May 07, 2020 5:11 pm

Hi, after running rpi-update yesterday, my Waveshare 3.5inch RPi LCD stopped working - the screen was white after boot. Fixed it by removing the overlays provided by Waveshare and installing the ones available on https://github.com/swkim01/waveshare-dtoverlays. Just passing it on for the benefit of others.

Return to “Advanced users”