Install newer Kernel like 5.0.0-19-generic

Hi!

Is it possible to install in Ubuntu Mate 18.04 v2 LTS a newer kernel like:
"5.0.0-19-generic"

I see it in Synaptic at status: -New in repository-

linux-buildinfo-5.0.0-19-generic
linux-headers-5.0.0-19
linux-headers-5.0.0-19-generic
linux-hwe-edge-tools-5.0.0-19
linux-image-5.0.0-19-generic
linux-image-unsigned-5.0.0-19-generic
linux-modules-5.0.0-19-generic
linux-modules-extra-5.0.0-19-generic
linux-tools-5.0.0-19-generic

My kernel version is: 4.15.0-52-generic

Do I need these packages to upgrade to the newest linux kernel in Ubuntu Mate?

Here is what I understand: The kernel version in 18.04 is 4.15 and will always be 4.15. The LTS version is supported with that kernel until 2023.

After the ".2" release (which has happened) you have the option to install the Hardware Enablement Stack

sudo apt install --install-recommends linux-generic-hwe-18.04 
xserver-xorg-hwe-18.04

This will tie upgrades for your kernel and X to backports of the ongoing releases (4.18 in 18.10, 5.0 in 19.04, etc.). It is intended to allow LTS versions to remain usable with the purchase of new hardware.

Assuming that you are on an LTS system because you want stability in a production system (else you would already be using the standard releases) if you aren't having an issue, and don't need to support newer hardware, don't install the HWE stack. Why invite a problem? Linux kernels are well-tested before release, but I can guarantee there will be bug fixes released for a 5.0 kernel.

To answer your direct question, no, you don't need those packages. You need to install the HWE stack, and that will pull in ongoing kernel upgrades--if that is what you want to do.

You can check to see if HWE is already enabled by

hwe-support-status --verbose

hwe-support-status --verbose

Output:
You are not running a system with a Hardware Enablement Stack. Your system is supported until April 2023

uname -r

4.15.0-52-generic

Installed packages:

linux-headers-4.15.0-52
linux-headers-4.15.0-52-generic
linux-image-4.15.0-52-generic
linux-modules-4.15.0-52-generic
linux-modules-extra-4.15.0-52-generic
linux-tools-4.15.0-52
linux-tools-4.15.0-52-generic

sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

Output:

The following packages were automatically installed and are no longer required:
libfontenc-dev libnvidia-cfg1-396 libnvidia-common-396 libnvidia-compute-396 libnvidia-compute-396:i386 libnvidia-decode-396
libnvidia-decode-396:i386 libnvidia-encode-396 libnvidia-encode-396:i386 libnvidia-fbc1-396 libnvidia-fbc1-396:i386
libnvidia-gl-396 libnvidia-gl-396:i386 libnvidia-ifr1-396 libnvidia-ifr1-396:i386 libpciaccess-dev libxfont-dev libxkbfile-dev
libxnvctrl0 nvidia-compute-utils-396 nvidia-dkms-396 nvidia-kernel-common-396 nvidia-kernel-source-396 nvidia-settings
nvidia-utils-396 screen-resolution-extra x11proto-dri2-dev x11proto-dri3-dev x11proto-fonts-dev x11proto-gl-dev
x11proto-present-dev x11proto-resource-dev x11proto-xf86bigfont-dev x11proto-xf86dri-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-headers-4.18.0-24 linux-headers-4.18.0-24-generic linux-headers-generic-hwe-18.04 linux-image-4.18.0-24-generic
linux-image-generic-hwe-18.04 linux-modules-4.18.0-24-generic linux-modules-extra-4.18.0-24-generic xserver-xorg-core-hwe-18.04
xserver-xorg-input-all-hwe-18.04 xserver-xorg-input-libinput-hwe-18.04 xserver-xorg-legacy-hwe-18.04
xserver-xorg-video-all-hwe-18.04 xserver-xorg-video-amdgpu-hwe-18.04 xserver-xorg-video-ati-hwe-18.04
xserver-xorg-video-fbdev-hwe-18.04 xserver-xorg-video-intel-hwe-18.04 xserver-xorg-video-nouveau-hwe-18.04
xserver-xorg-video-qxl-hwe-18.04 xserver-xorg-video-radeon-hwe-18.04 xserver-xorg-video-vesa-hwe-18.04
xserver-xorg-video-vmware-hwe-18.04
Suggested packages:
fdutils linux-hwe-doc-4.18.0 | linux-hwe-source-4.18.0 linux-hwe-tools firmware-amd-graphics xserver-xorg-video-r128
xserver-xorg-video-mach64 firmware-misc-nonfree
Recommended packages:
xserver-xorg-input-wacom-hwe-18.04
The following packages will be REMOVED:
nvidia-driver-396 xserver-xorg xserver-xorg-core xserver-xorg-dev xserver-xorg-input-all xserver-xorg-input-evdev
xserver-xorg-input-libinput xserver-xorg-legacy xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati
xserver-xorg-video-fbdev xserver-xorg-video-nouveau xserver-xorg-video-nvidia-396 xserver-xorg-video-qxl
xserver-xorg-video-radeon xserver-xorg-video-vesa xserver-xorg-video-vmware
The following NEW packages will be installed:
linux-generic-hwe-18.04 linux-headers-4.18.0-24 linux-headers-4.18.0-24-generic linux-headers-generic-hwe-18.04
linux-image-4.18.0-24-generic linux-image-generic-hwe-18.04 linux-modules-4.18.0-24-generic
linux-modules-extra-4.18.0-24-generic xserver-xorg-core-hwe-18.04 xserver-xorg-hwe-18.04 xserver-xorg-input-all-hwe-18.04
xserver-xorg-input-libinput-hwe-18.04 xserver-xorg-legacy-hwe-18.04 xserver-xorg-video-all-hwe-18.04
xserver-xorg-video-amdgpu-hwe-18.04 xserver-xorg-video-ati-hwe-18.04 xserver-xorg-video-fbdev-hwe-18.04
xserver-xorg-video-intel-hwe-18.04 xserver-xorg-video-nouveau-hwe-18.04 xserver-xorg-video-qxl-hwe-18.04
xserver-xorg-video-radeon-hwe-18.04 xserver-xorg-video-vesa-hwe-18.04 xserver-xorg-video-vmware-hwe-18.04

Can I install it without any problems?

The simple answer is yes you can - I run kernel 4.18.0-24 on my laptop - I open synaptic package manager and select these 5 files and mark them for install - linux-image 4.18.0-24, linux-headers-4.18.0-24, linux-modules-4.18.0-24-generic, linux-headers-4.18.0-24-generic, and linux-modules-extra-4.18.0-24-generic
So it would be the same for 5.0 - after install reboot - after you check everything is working as it should you can then remove the old kernel if you choose to

Ok, I'll try it out, thanks!

And, I agree, the answer is yes --- IF you don't have any problems on your hardware. Once you go on the HWE path, it is unclear to me if there is an easy way to revert to non-HWE. You will be upgrading kernel and X with each new release.

Is it supposed to work? Yes. Is it well tested on a range of hardware? Yes. Will it work properly on your hardware when 5.0 comes out? Probably.

Will there be bugs? YES. Will you be affected? No way to know that.

I will say it again. If you are going to track current releases, why start with an LTS? HWE is intended for those who have newer hardware that is incompatible with older kernels or X, or for those who have other issues that newer kernels address.

@ charles-nix

Can I use:
linux-generic-hwe-18.04
xserver-xorg-hwe-18.04

with Nvidia card?

No idea, especially since you don't specify which card. Suggest finding out which version of X is current in 18.10 or 19.04 and backported to HWE. Then check that version for compatibility with Xorg. Generally HWE adds support for cards currently not supported. If you are supported now, why change? In the specific case of nVidia, has nVidia written a new module blob? If they haven't, does the old one work with the new kernel? Because the kernel module from the vendor is usually what will determine if your video card will work, and how well it will work, unless you're using the GPL drivers.

Seriously, HWE is designed to solve problems, but they are backports from current versions, and can certainly introduce bugs. Usually not, but can. Consider that the LTS for Servers never follows HWE.

If you want to live on the edge, with the latest and greatest, the 18.04 > 18.10 > 19.04 > 19.10 series is designed for that. If you want stability for production when you have to get work done and use the computer, they make LTS. HWE is to cover the edge cases where a whole deployment is on an LTS, but new hardware is purchased that the old kernels or X don't support, because they didn't exist 2 (or 5 or 8) years ago when kernel 4.15 was new.

Ubuntu's website has a thorough discussion of the goals and shortcomings of HWE.

Another approach is to look at the changes for the 5.0 kernel. It was not a huge change. Phoronix has a good review of the new features in 5.0. Read it and see if anything will help you. Additional support for a certain processor feature only matters if you have a processor with that feature. For everyone else, it is just additional code lying around, and a chance for reversion bugs to be introduced.

I have a GeForce GTX 1060 6GB.

So, it has been out a couple of years, and I'm guessing you're using the proprietary driver (kernel module). If an update is released for that driver nVidia will release it themselves. Non-GPL software is not part of what HWE updates "turns on"

But you will face the opposite question of whether your current nVidia driver (kernel module) will work with the new kernel. That is not guaranteed. Kernel changes can and do sometimes break existing functionality. It just happened to the OpenZFS filesystem module with the 5.0 kernel. The kernel maintainers in no way guarantee that they will never break something for each and every piece of hardware and software ever built.

So, if you want to search and check if this or that piece of hardware is on the changelog lists that are freely published and available both for the kernel and for X, have at it. Ubuntu probably keeps some of that info in the changelogs for 18.10 or 19.04, as well as the upstream X and kernel web pages.

Or test it for yourself. Ubuntu recommends a full backup before moving to the HWE stack. That seems prudent. I wouldn't trust the package managers ability to cleanly remove and revert all the changes that moving to HWE will do if you need to go back.

Ok, I'll test it out and before that I make a backup of my hdd.

@ charles-nix

I just installed the 18.04 HWE kernel. However, I removed 18.04 HWE kernel again
because the Nvidia-driver didn't respect my Xorg.conf and my .nvidia-settings-rc under /home/user

Is there anything I can do, to make the Nvidia driver in 18.04 HWE kernel take over my Xorg.conf/.nvidia-settings-rc
settings?

Unfortunately, I know nothing about Nvidia cards or drivers.

Which NVIDIA drivers from the PPA or the repository? 418.56 or later (I use 430.26) work with the HWE Stack if it is older it will not - so you may need to use a standard kernel not HWE

@ LordBoltar... I use "nvidia396".

I was able to install the 18. 04 HWE kernel and start it with Ubuntu Mate. However, my nvidia settings were all gone and the desktop looked terrible.

That's why I removed it again.

To add the Proprietary GPU Drivers PPA in Ubuntu and update the software sources, use the following commands:

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt update

Close terminal then open All - then Driver Manager/Addition Drivers and install latest nVidia drivers

reboot

and then use the standard kernel 4.18.0-24 from the files I mentioned earlier

Thanks for the Info, but...

I have already added ppa:graphics-drivers/ppa to my apt.

My problem with the HWE 18.04 kernel was that my
previous Nvidia Desktop graphics settings were gone.

I couldn't use the following either:

nvidia settings
. nvidia-settings-rc
xorg. conf settings

My desktop doesn't look good without these settings.

Therefore I removed the HWE 18.04 kernel again.