[FAQ] Newer kernels for Debian stable

Share your own howto's etc. Not for support questions!

[FAQ] Newer kernels for Debian stable

Postby Head_on_a_Stick » 2018-11-06 21:03

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 stretch-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 stretch-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:

viewtopic.php?p=684553#p684553
Last edited by Head_on_a_Stick on 2018-11-09 05:57, edited 1 time in total.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8172
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [FAQ] Newer kernels for Debian stable

Postby stevepusser » 2018-11-07 01:39

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
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53

Re: [FAQ] Newer kernels for Debian stable

Postby fred44nl » 2018-11-07 11:46

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 9.6 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 84
Joined: 2018-07-14 08:54

Re: [FAQ] Newer kernels for Debian stable

Postby Head_on_a_Stick » 2018-11-07 17:44

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.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8172
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [FAQ] Newer kernels for Debian stable

Postby stevepusser » 2018-11-07 19:40

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53

Re: [FAQ] Newer kernels for Debian stable

Postby NFT5 » 2018-11-07 21:24

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
NFT5
 
Posts: 240
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: [FAQ] Newer kernels for Debian stable

Postby stevepusser » 2018-11-08 01:02

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53

Re: [FAQ] Newer kernels for Debian stable

Postby bw123 » 2018-11-08 03:00

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!
User avatar
bw123
 
Posts: 3528
Joined: 2011-05-09 06:02
Location: TN_USA

Re: [FAQ] Newer kernels for Debian stable

Postby stevepusser » 2018-11-08 20:02

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53

Re: [FAQ] Newer kernels for Debian stable

Postby Head_on_a_Stick » 2018-11-08 20:26

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.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8172
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [FAQ] Newer kernels for Debian stable

Postby stevepusser » 2018-11-08 22:33

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53

Re: [FAQ] Newer kernels for Debian stable

Postby stevepusser » 2018-11-09 02:32

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53

Re: [FAQ] Newer kernels for Debian stable

Postby Head_on_a_Stick » 2018-11-09 05:58

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

I'll probably open up a new [FAQ] thread about the graphics stack specifically.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8172
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [FAQ] Newer kernels for Debian stable

Postby pawRoot » 2018-11-10 21:49

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
pawRoot
 
Posts: 564
Joined: 2016-12-28 18:26
Location: Poland

Re: [FAQ] Newer kernels for Debian stable

Postby stevepusser » 2018-11-11 00:43

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10130
Joined: 2009-10-06 05:53


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable