Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[FAQ] Newer kernels for Debian stable

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

[FAQ] Newer kernels for Debian stable

#1 Post by Head_on_a_Stick »

The kernel supplied with the Debian stable is usually six months old on the release date and is not updated (apart from bug fixes) from that point onward.

This means that any hardware introduced after the release date will not be optimally supported (if at all) by Debian's stock kernel.

To update the kernel version we can use the backports repository:
Backports are packages taken from the next Debian release (called "testing"), adjusted and recompiled for usage on Debian stable.
https://backports.debian.org/

To install a backported kernel, first add the repositories to your sources using this command:

Code: Select all

# apt edit-sources
The line to add is:

Code: Select all

deb http://deb.debian.org/debian buster-backports main contrib non-free
Add that line then save the file and update the package database:

Code: Select all

# apt update
The kernel can now be installed, we will use the metapackage that always depends on the latest version (so that it is kept updated):

Code: Select all

# apt install -t buster-backports linux-image-amd64
^ That's for amd64 (x86_64) processors, linux-image-686 & linux-image-686-pae are also available for older machines.

If Debian is being used to boot the system then the GRUB menu should be automatically updated to add the new kernel; the old kernel can be found in the Advanced Options sub-menu if there are any problems with the backport.

If Debian is being booted from another operating system's bootloader then the configuration will have to be updated to pick up the new kernel.

Forum member and MX Linux developer @stevepusser is hosting fresh backports of the latest kernel version and also backports of Mesa and the xserver-xorg-video- packages for nouveau, amdgpu & intel:

http://forums.debian.net/viewtopic.php?p=684553#p684553
Last edited by Head_on_a_Stick on 2019-09-30 14:24, edited 2 times in total.
deadbang

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [FAQ] Newer kernels for Debian stable

#2 Post by stevepusser »

I'm also trying to create an OBS repo with a backported kernel, mesa, firmware, and drivers, where a user can just add it and its key, and everything in it is seen as an upgrade. But it's taking some time. Currently I'm porting over the 4.18.10 kernel from Buster instead of the 4.18.6 in stretch-backports.

https://build.opensuse.org/project/show ... re-support
MX Linux packager and developer

User avatar
fred44nl
Posts: 215
Joined: 2018-07-14 08:54
Has thanked: 1 time

Re: [FAQ] Newer kernels for Debian stable

#3 Post by fred44nl »

very interesting :)

however how about the "Shiny New Stuff Syndrome" ??
I mean to say, when the machine is running nicely without hardly any problems, why go to backports ??

and how about this topic:

http://forums.debian.net/viewtopic.php?f=20&t=139001

what kernel will this give ??
Debian 10 - Buster on Compulab Fitlet2
Debian 12 - Bookworm on Acer Spin 1

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: [FAQ] Newer kernels for Debian stable

#4 Post by Head_on_a_Stick »

fred44nl wrote:I mean to say, when the machine is running nicely without hardly any problems, why go to backports ??
Backports should only be used if there is a specific need, this is especially true of the kernel because new features are added all the time and each new feature introduces the risk of another bug. The backported kernel is also delayed in respect of updates, which is bad.

So the stable kernel version should always be preferred if possible.
fred44nl wrote:http://forums.debian.net/viewtopic.php?f=20&t=139001

what kernel will this give ??
The kernel will probably be bumped but it will be a minor version change (from 4.9.0-8 to 4.9.0-9) which will only include fixes, no new features or hardware support will be added.
deadbang

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [FAQ] Newer kernels for Debian stable

#5 Post by stevepusser »

fred44nl wrote:very interesting :)

however how about the "Shiny New Stuff Syndrome" ??
I mean to say, when the machine is running nicely without hardly any problems, why go to backports ??

and how about this topic:

http://forums.debian.net/viewtopic.php?f=20&t=139001

what kernel will this give ??
If it's running fine, great, but we are mainly concerned with those that require newer packages for their new hardware to work correctly, which is getting more and more common the older Stretch gets. We went through the same cycle as Jessie neared two years of age.

The newer kernels are supposed to offer power savings over older versions on much hardware, though.
MX Linux packager and developer

User avatar
NFT5
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 596
Joined: 2014-10-10 11:38
Location: Canberra, Australia
Has thanked: 10 times
Been thanked: 41 times

Re: [FAQ] Newer kernels for Debian stable

#6 Post by NFT5 »

Thanks H_o_a_S, sometimes backports does have a valid reason for use. Apart from SNS syndrome ( which I, fortunately, don't suffer from).

I recently bought a new notebook (Lenovo with A9 APU). Couldn't get Debian to start at all in GUI mode although Ubuntu was fine. Took me a little time to realise that the stable kernel not supporting the processor was the problem and was able to install the backports kernel.

FWIW, I usually install from a netinstall disk but, although Debian seemed to install ok, it wouldn't start at all - just got the black screen of death. However, installing from a Live disk at least allowed me to get a CLI up and install the backports kernel. I took the opportunity to install MATE from backports as well and that's solved the panel crashes. I'm now a happy chappy.

I had the same concerns that stevepusser noted about updates though, so his concept of a separate repo with updates is very appealing.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [FAQ] Newer kernels for Debian stable

#7 Post by stevepusser »

Well, I got the lengthy builds of the 4.18.10 kernel and the latest llvm-6.0 toolchain built in the repo with the default Stretch debhelper 10, but then at least one newer build-depend for a build-depend for Mesa 18.1.9 really requires debhelper 11, so adding that triggered a rebuild of everything...maybe it'll be finished when I get up tomorrow. I also didn't know debhelper needs linux-libc6-dev to build, which is provided by the kernel, so if you update the kernel, debhelper has to rebuild, and then everything else again.
MX Linux packager and developer

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: [FAQ] Newer kernels for Debian stable

#8 Post by bw123 »

stevepusser wrote:...The newer kernels are supposed to offer power savings over older versions on much hardware, though.
Yeah I have noticed this (I think) and read it too, power/battery improvement...but it's hard to pin down. Battery is important, and I've used backported kernels in the past. I stopped doing this until I am pretty sure of the version that will be used for the next-stable. Then I go ahead and switch for good. It looks like it will be 4.18 so now may be a good time to get on it?

Nice FAQ!
resigned by AI ChatGPT

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [FAQ] Newer kernels for Debian stable

#9 Post by stevepusser »

I have heard that 4.19 might be the next long-term-support kernel, so I'd think that would be the one in Buster.

In my OBS repo, I have the 4.18.10 kernel built, and Mesa 18.1.9 in 32-bit. It's still building in 64-bit. I also backported the nouveau, amdgpu, and "intel" xorg drivers from Buster, since those aren't in stretch-backports, and just added the 390.87 proprietary Nvidia video driver. Non-free firmware packages are also in the repo. Libva 2.3.0 video hardware acceleration is also backported from Buster.

Current status: https://build.opensuse.org/project/show ... re-support

To do: Bumblebee and bbswitch backports.
FFMpeg backports...any demand for this? I want to rebuild ffmpeg anyway against the newer Mesa and libva,
and figure I may as well update it.
Video player backports rebuilt against the newer Mesa and libva libraries in hopes that helps with hardware
acceleration: mpv 0.29, Kodi 17.6, QMPlay2, VLC.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: [FAQ] Newer kernels for Debian stable

#10 Post by Head_on_a_Stick »

stevepusser wrote:In my OBS repo, I have the 4.18.10 kernel built, and Mesa 18.1.9 in 32-bit. It's still building in 64-bit. I also backported the nouveau, amdgpu, and "intel" xorg drivers from Buster, since those aren't in stretch-backports, and just added the 390.87 proprietary Nvidia video driver. Non-free firmware packages are also in the repo. Libva 2.3.0 video hardware acceleration is also backported from Buster.
Wow, that is awesome 8)

Should I do a separate [FAQ] about the graphics stack?

I suppose we need a wireless and/or firmware guide as well.
deadbang

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [FAQ] Newer kernels for Debian stable

#11 Post by stevepusser »

The 64-bit Mesa build is done, but as happens sometimes on the OBS, it's taking some time to get released for building the rest of the packages for 64-bit. 32-bit's fine, I think. But please hold off on the FAQ until everything's done.

So once everything's done, it's my hope that a user can just add the repo and "apt upgrade" if they are bold, or just individual packages if they want to take it a step at a time.

Hey, let me add the kernel metapackages so the kernel there would be an upgrade for those that have that installed.

Edit: OK, adding linux-latest for the metapackages somehow triggered a rebuild of mesa on 32-bit only. :?: The 64-bit Mesa got published and the builds dependent on it are all done and waiting to be published. Possibly when linux-latest gets published for 64-bit, that will trigger a Mesa rebuild there. I hope everything finishes overnight.
MX Linux packager and developer

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [FAQ] Newer kernels for Debian stable

#12 Post by stevepusser »

All packages are finished, so the instructions are

As root (sudo users can become root with "sudo su"), copy and paste the whole command from the code block:

add the repo

Code: Select all

echo 'deb http://download.opensuse.org/repositories/home:/stevenpusser:/new-hardware-support/Debian_9.0/ /' > /etc/apt/sources.list.d/home:stevenpusser:new-hardware-support.list
download and install the repo key

Code: Select all

rm -f Release.key && wget -nv https://download.opensuse.org/repositories/home:stevenpusser:new-hardware-support/Debian_9.0/Release.key -O Release.key && apt-key add - < Release.key && rm Release.key
update package database

Code: Select all

apt update
Updates from the repository are now available to your system.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: [FAQ] Newer kernels for Debian stable

#13 Post by Head_on_a_Stick »

Thanks Steve, I've added a note to the OP.

I'll probably open up a new [FAQ] thread about the graphics stack specifically.
deadbang

User avatar
pawRoot
Posts: 603
Joined: 2016-12-28 18:26
Has thanked: 1 time
Been thanked: 1 time

Re: [FAQ] Newer kernels for Debian stable

#14 Post by pawRoot »

Was already using backported kernel but i had no idea you can install newest version like that

Code: Select all

linux-image-amd64
, so thanks for that. :D

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [FAQ] Newer kernels for Debian stable

#15 Post by stevepusser »

It's a metapackage--the one in stretch-backports depends on kernel 4.18.0-1, while the one in my new repo depends on the 4.18.0-2 kernel there. When I, for example, eventually update the kernel there to a 4.19 version and update the metapackages from "linux-latest", then you'll get the 4.19 kernels installed automatically, too, and onward.
MX Linux packager and developer

Post Reply