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

Moving Linux kernel to 4.9

Fri Dec 09, 2016 6:01 pm

EDIT1: The next branch has now been updated to 4.9.0 as that has reached stable.
EDIT2: The master branch of rpi-update has now updated to 4.9 kernel tree.
EDIT3: We have now also bumped apt-get to 4.9. Thanks to users who helped with testing!

We are planning to move to the 4.9 kernel in the near future.
One advantage is there is a lot more raspberry pi specific support in the newer upstream kernels which reduces the number of downstream raspberry pi patches and so reduces maintenance effort.
The 4.9 kernel is planned to be an LTS kernel (long term support).

Obviously a newer kernel will bring additional kernel features and support for more devices (e.g. USB devices like wifi and dvb).
You can read up on what appeared in 4.5, 4.6 ,4.7, 4.8 and 4.9.

We will do this in a few stages. Starting now, we are updating the "next" firmware branch to the 4.8 kernel.
We are using this as an interim step to help with regression testing.
Also 4.8 kernel has been significantly tested in LibreELEC builds.

Currently 4.9 is at 4.9-rc8. The "stable" 4.9.0 is likely to here in a few weeks and we'll switch to 4.9 then.

Assuming testing is positive, we'll update the master rpi-update firmware branch.

Eventually the 4.9 kernel will appear in "apt-get upgrade" and on new raspbian images in the future.

Update with:

Code: Select all

sudo BRANCH=next rpi-update
and reboot. Ideally nothing much will change.
Please report if there are any regressions compared to the 4.4 kernel.

Obviously this release is for testers who like to live on the bleeding edge. It's not intended for beginners, or users who need stability.
Backing up is always advisable. There may be regressions. There may be improvements. But we won't know without testers trying it and reporting back.

Note: The "next" firmware branch also supports the new USB/network boot modes.
However if you don't enable the new modes, that should be harmless.

User avatar
bstrobl
Posts: 94
Joined: Wed Jun 04, 2014 8:31 pm
Location: Germany

Re: Moving Linux kernel to 4.9

Mon Dec 12, 2016 12:56 pm

Can you give us a rough idea as to how many downstream patches need to be applied now as compared to the 4.4 series? http://elinux.org/RPi_Upstreaming seems to not have been updated in a while.

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

Re: Moving Linux kernel to 4.9

Mon Dec 12, 2016 5:35 pm

bstrobl wrote:Can you give us a rough idea as to how many downstream patches need to be applied now as compared to the 4.4 series? http://elinux.org/RPi_Upstreaming seems to not have been updated in a while.
114 currently on 4.9. About 20 are support for I2S audio cards, and there are a number of pending upstream patches (I2C and vchiq) that will disappear at some point.
211 currently on 4.8.
I'd estimate several hundred on 4.4 (it's harder to tell with a merged rather than rebased tree).

User avatar
bstrobl
Posts: 94
Joined: Wed Jun 04, 2014 8:31 pm
Location: Germany

Re: Moving Linux kernel to 4.9

Mon Dec 12, 2016 5:55 pm

dom wrote:
bstrobl wrote:Can you give us a rough idea as to how many downstream patches need to be applied now as compared to the 4.4 series? http://elinux.org/RPi_Upstreaming seems to not have been updated in a while.
114 currently on 4.9. About 20 are support for I2S audio cards, and there are a number of pending upstream patches (I2C and vchiq) that will disappear at some point.
211 currently on 4.8.
I'd estimate several hundred on 4.4 (it's harder to tell with a merged rather than rebased tree).
Wow, quite an improvement then. Means using a mainline kernel for most things isn't far off :) .

ejolson
Posts: 1007
Joined: Tue Mar 18, 2014 11:47 am

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 2:48 am

dom wrote:We are planning to move to the 4.9 kernel in the near future.
Thank you for keeping the Raspbian kernel up to date. For me this is the biggest advantage of the Raspberry Pi over similarly priced ARM-based single-board computers. There are lots of behind-the-scenes improvements in Linux with respect to filesystems, resource allocation and security that are important for a system used to teach computer science. Please keep up the good work!

DaveSemm
Posts: 152
Joined: Thu Jun 21, 2012 1:16 pm

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 9:37 am

Where can I find details about what changes in 4.9 were made for the Pi Zero? Were these just bug fixes, or will they improve performance, add new features, or do something else interesting for the Zero?

smirta
Posts: 2
Joined: Thu Dec 15, 2016 11:34 am

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 11:42 am

We are running raspberry pis as clients in an LTSP environment with Ubuntu 16.04. The kernel 4.4.0-1034-raspi2 doesn't boot anymore with this release. Please let us know if you need debugging information.

https://github.com/linuxola/ltspi

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

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 1:45 pm

DaveSemm wrote:Where can I find details about what changes in 4.9 were made for the Pi Zero? Were these just bug fixes, or will they improve performance, add new features, or do something else interesting for the Zero?
We would have ported any Pi zero specific fixes to 4.4 tree. Most of the changes from newer kernels apply to generic code. See the Phoronix links in original post.
The Pi zero does use the upstream USB dwc2 driver when running in gadget mode (e.g. connected by USB to a PC) so there may be improved support there.

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

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 1:46 pm

smirta wrote:We are running raspberry pis as clients in an LTSP environment with Ubuntu 16.04. The kernel 4.4.0-1034-raspi2 doesn't boot anymore with this release. Please let us know if you need debugging information.
Not really sure what you are asking. rpi-update kernels are designed for Raspbian. They shouldn't be used when running with a different distribution with a custom kernel (which 4.4.0-1034-raspi2 sounds like).
See notes here: https://github.com/Hexxeh/rpi-update/

smirta
Posts: 2
Joined: Thu Dec 15, 2016 11:34 am

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 2:32 pm

No questions asked. Just FYI because of
Please report if there are any regressions compared to the 4.4 kernel.
We are booting the Raspberry Pis with PXE and then we load the raspberry pi kernel from Ubuntu Xenial. We are only using the firmware to be able to boot from network.

So, when we install a new system, we download the firmware from the next branch (https://github.com/raspberrypi/firmware/tree/next/boot). And with the latest commit we also need to flash the pis with a raspbian sd-card and rpi-update so that the firmware bootcode.bin etc is still working. That's the only moment raspbian and sd-cards are being used in our environment. I've tried this and I just wanted to let you know, that it's not working. I'm aware that you focus on Raspbian. We are using Ubuntu because of user acceptance reasons.

I've just noticed that there is probably a confusion why I am posting in this thread. I found this thread via this commit here: https://github.com/raspberrypi/firmware ... b4c3561f18

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

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 7:03 pm

The next branch has now been updated to 4.9.0 as that has reached stable.

User avatar
DougieLawson
Posts: 28795
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 9:09 pm

dom wrote:The next branch has now been updated to 4.9.0 as that has reached stable.
And I thought I was nicely ahead of the game when I updated my RPi3 with official screen to 4.8.13-v7+ yesterday.

My other ten raspberries are sticking on 4.4.35 until the new year.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

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

cjan
Posts: 421
Joined: Sun May 06, 2012 12:00 am

Re: Moving Linux kernel to 4.9

Thu Dec 15, 2016 11:25 pm

does VC4 GL any improve than 4.4 or just the same?

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

Re: Moving Linux kernel to 4.9

Fri Dec 16, 2016 10:36 am

cjan wrote:does VC4 GL any improve than 4.4 or just the same?
You'll have to test it to be sure. I've sanity tested it still works.
Generally 4.4 has had backports of major upstream changes for VC4 GL, but as there have been changes to upstream APIs these backports often required fixing up.
So it's possible the 4.9 patches are somewhat "cleaner" and could work better.

notro
Posts: 681
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: Moving Linux kernel to 4.9

Fri Dec 16, 2016 6:22 pm

bstrobl wrote:
dom wrote:
bstrobl wrote:Can you give us a rough idea as to how many downstream patches need to be applied now as compared to the 4.4 series? http://elinux.org/RPi_Upstreaming seems to not have been updated in a while.
114 currently on 4.9. About 20 are support for I2S audio cards, and there are a number of pending upstream patches (I2C and vchiq) that will disappear at some point.
211 currently on 4.8.
I'd estimate several hundred on 4.4 (it's harder to tell with a merged rather than rebased tree).
Wow, quite an improvement then. Means using a mainline kernel for most things isn't far off :) .
Here's a list of the downstream only drivers: https://github.com/raspberrypi/linux/wiki/Upstreaming

The biggest problem with mainline that I have seen, is the lousy sd card performance. That might have changed with 4.8 when a switch to drivers/mmc/host/sdhci-iproc.c was made. I haven't tried it, but afaict it doesn't support dma, at least the device tree node doesn't have any dma channels set.

cjan
Posts: 421
Joined: Sun May 06, 2012 12:00 am

Re: Moving Linux kernel to 4.9

Fri Dec 16, 2016 11:05 pm

ok, move to 4.9 and no VC4 enabled.
chromium play youtube crashed.

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

Re: Moving Linux kernel to 4.9

Mon Dec 19, 2016 1:10 pm

cjan wrote:ok, move to 4.9 and no VC4 enabled.
chromium play youtube crashed.
Yes I can reproduce this one. Similar code in Kodi works with 4.9, so it may be Chromium sandbox issue.
I've asked the expert to take a look.

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

Re: Moving Linux kernel to 4.9

Tue Dec 20, 2016 4:10 pm

dom wrote:I've asked the expert to take a look.
There will be a fix for this in next update of chromium.
For now launching with

Code: Select all

chromium-browser --no-sandbox
should work.

dukla2000
Posts: 187
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: Moving Linux kernel to 4.9

Wed Dec 21, 2016 12:37 am

dom wrote:...Obviously this release is for testers who like to live on the bleeding edge. It's not intended for beginners, or users who need stability.
Backing up is always advisable. There may be regressions. There may be improvements. But we won't know without testers trying it and reporting back.
Hi dom
Installed 4.9 tonight, bascially no major issues yet. Onboard wifi, USB-DVB all good (with omxplayer, sound over HDMI, midori, claws ...).

Did notice

Code: Select all

[    0.000000] arm_arch_timer: WARNING: Invalid trigger for IRQ16, assuming level low
[    0.000000] arm_arch_timer: WARNING: Please fix your firmware
[    0.000000] arm_arch_timer: WARNING: Invalid trigger for IRQ17, assuming level low
[    0.000000] arm_arch_timer: WARNING: Please fix your firmware
in dmesg for each CPU - think its new but can't notice any consequent problems.

Did think it was time to try the onboard bluetooth again (with wifi) - removed dtoverlay=pi3-disable-bt from config.txt but don't get any bluetooth controller. All is fine with the BT/USB dongle in though. A long time since I tried onboard BT though so could be unrelated to current 4.9 updates.

Code: Select all

chris@dukla:~ $ hciconfig
chris@dukla:~ $ hcitool dev
Devices:
chris@dukla:~ $ hciconfig -a
chris@dukla:~ $
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

kergoat
Posts: 2
Joined: Sat Dec 31, 2016 7:31 am

Re: Moving Linux kernel to 4.9

Sat Dec 31, 2016 7:40 am

hello

i try kernel 4.9 on pi 3 B. i have a pb with domoticz serveur V3.5877 i cant connect on ip_addr_server:8080. i try to stop / start service domoticz all is ok , no error message. but cant connetc to server. move back to kernel 4.4.38-v7, all is ok

@+

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

Re: Moving Linux kernel to 4.9

Sat Dec 31, 2016 1:53 pm

kergoat wrote: i try kernel 4.9 on pi 3 B. i have a pb with domoticz serveur V3.5877 i cant connect on ip_addr_server:8080. i try to stop / start service domoticz all is ok , no error message. but cant connetc to server. move back to kernel 4.4.38-v7, all is ok
I can't do much with the limited information here. What hardware (e.g. USB or GPIO) do you have connnected?
If you unplug any optional hardware, do you still see the webserver running on 4.4 and not running on 4.9?
Assuming that is true could you describe what you have to do to a clean raspbian image to see this effect?
e.g. which packages you need to install and minimal configuration to see the problem.

kergoat
Posts: 2
Joined: Sat Dec 31, 2016 7:31 am

Re: Moving Linux kernel to 4.9

Mon Jan 02, 2017 7:40 pm

hello
it s only the domoticz serveur no hardware attach to usb or gpio.

fresh install via noobs. kernel 4.4.38 i update in kernel 4.9 via sudo BRANCH=next rpi-update. i cant connect on the domoticz server port 8080.
i move back to kernel 4.4 via rpi-update reboot its ok i can connect to the server. i move back to 4.9 and i cant reach the server .

for info it s only on my raspberry pi 3 , i have a pi zero and its okay the domoticz server work on 4.9.0 !

bye

aplocher
Posts: 14
Joined: Mon Aug 15, 2016 1:05 am

Re: Moving Linux kernel to 4.9

Tue Jan 03, 2017 6:40 am

Hello, should `uname -a` report the kernel version as 4.9?

Code: Select all

pi@BC-DONG-01:~ $ sudo BRANCH=next rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Your firmware is already up to date
pi@BC-DONG-01:~ $ uname -a 
Linux BC-DONG-01 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/Linux
pi@BC-DONG-01:~ $ uptime
 22:38:55 up 6 min,  2 users,  load average: 0.00, 0.07, 0.05
pi@BC-DONG-01:~ $ 

aplocher
Posts: 14
Joined: Mon Aug 15, 2016 1:05 am

Re: Moving Linux kernel to 4.9

Tue Jan 03, 2017 6:46 am

Sorry, that was a Pi Zero, just tried it on a Pi3 and it worked as expected:

Code: Select all

pi@BC-CAMRCV-01:~ $ sudo BRANCH=next rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
#############################################################
WARNING: This update bumps to rpi-4.9.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=167934
##############################################################
Would you like to proceed? (y/N)
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    354      0 --:--:-- --:--:-- --:--:--   354
100 52.8M  100 52.8M    0     0   753k      0  0:01:11  0:01:11 --:--:-- 2117k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 4.9.0+
 *** depmod 4.9.0-v7+
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 39fd851b080518658b04e14628119a2f578b7a2f
 *** A reboot is needed to activate the new firmware
pi@BC-CAMRCV-01:~ $ sudo reboot
Connection to bc-camrcv-01 closed by remote host.
Connection to bc-camrcv-01 closed.
adam@BC-LINPC-02:/var/log$ ssh pi@bc-camrcv-01
pi@bc-camrcv-01's password: 

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Jan  2 22:44:04 2017

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@BC-CAMRCV-01:~ $ sudo uname -a
Linux BC-CAMRCV-01 4.9.0-v7+ #939 SMP Thu Dec 15 18:07:48 GMT 2016 armv7l GNU/Linux

aplocher
Posts: 14
Joined: Mon Aug 15, 2016 1:05 am

Re: Moving Linux kernel to 4.9

Tue Jan 03, 2017 7:45 am

D'oh, me again, now I'm having the same problem on my Pi3. The problem is I did a apt-get update/dist-upgrade and it downgraded the kernel. Then rpi-update still thinks it's updated to 4.9 (which I guess it's not) so rpi-update isn't allowing it reinstall:

Code: Select all

pi@BC-CAMRCV-01:~ $ sudo apt-get dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
  libllvm3.7
Use 'apt-get autoremove' to remove it.
Done
The following packages will be upgraded:
  libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 raspberrypi-bootloader raspberrypi-kernel raspberrypi-sys-mods
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 66.3 MB of archives.
After this operation, 36.9 kB of additional disk space will be used.
Do you want to continue? [Y/n] 

...

pi@BC-CAMRCV-01:~ $ sudo reboot
Connection to bc-camrcv-01 closed by remote host.
Connection to bc-camrcv-01 closed.

adam@BC-LINPC-02:/var/log$ ssh pi@bc-camrcv-01
pi@bc-camrcv-01's password: 

pi@BC-CAMRCV-01:~ $ sudo uname -a
Linux BC-CAMRCV-01 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
pi@BC-CAMRCV-01:~ $ sudo BRANCH=next rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Your firmware is already up to date

So I guess the moral of this story is: don't do a apt-get (dist-?)upgrade after the rpi-update...

Return to “Advanced users”

Who is online

Users browsing this forum: Rion, warp10 and 19 guests