I would like to upgrade my Linux kernel to 4.7 in Debian 8.5, since it has significant better Skylake 6th generation support than the current linux kernel. In Ubuntu 16.04, the upgrade is easy. However, I now need Debian 8.5 because of stability, and I would like to do the same upgrade for it.

Testing StephenKitt's answer

I upgrade the kernel and reboot, but I get unsuccessfully when loading the OS. Fig. 1 Failure messages in startup

enter image description here

2nd iteration - Solving the Bug in startup [GAD3R]

  1. Boot in Linux kernel 3.16.x
  2. Run as su, apt-get remove xserver-xorg-video-intel
  3. Reboot

Output: works! Resolution is now the 1920x1080. Since there is no complete support of Skylake in Linux kernel 4.6 etc this artifact here in Matlab 2016a without a firmware, you need some non-free adjustments as firmware; which you maybe already free firmware in Linux kernel 4.7

# https://unix.stackexchange.com/a/307435/16920
apt-get -t jessie-backports install firmware-misc-nonfree

xserver-xorg-video-intel abnormal installation and its action's prevention

I find out that the package xserver-xorg-video-intel may get installed as a dependency (and all its dependencies) in other conditions, as described a case in the thread How to Recover Debian of LK backports where runlevel conflict? The idea is to prevent the action of the package although it get installed by creating the file /etc/X11/xorg.conf

# https://unix.stackexchange.com/a/308709/16920
Section "Device"
        Identifier "Intel"
        Driver "modesetting"

## Bugs 
# 1. LK 3.16 will fail now but LK 4.6 will work. TODO in the thread https://unix.stackexchange.com/a/308709/16920

Hardware: Asus Zenbook UX303UA
OS: Debian 8.5
Related: Asus Zenbook UX303UA Linux compatibility, Linux Kernel - Mobile Skylake 6th Generation - Power Management

  • 1
    Boot the 3.16 kernel , remove xserver-xorg-video-intel then reboot into the 4.6 kernel
    – GAD3R
    Sep 1 '16 at 12:41
  • @GAD3R Works! When can I install back the package? Sep 1 '16 at 12:47
  • You need to install the intel graphic card from backport
    – GAD3R
    Sep 1 '16 at 13:02
  • 2
    Actually you don't, Intel GPUs no longer need a separate driver on Linux. See the last paragraph in the package description: "The use of this driver is discouraged if your hw is new enough (ca. 2007 and newer). You can try uninstalling this driver and let the server use it's builtin modesetting driver instead." Sep 1 '16 at 13:31

The easiest way to install a newer kernel is to use Jessie backports.

First you need to add Jessie backports to your repositories, if it's not already there:

echo deb http://http.debian.net/debian jessie-backports main > /etc/apt/sources.list.d/jessie-backports.list

(as root), then

apt-get update
apt-get -t jessie-backports install linux-image-amd64

will install the current default backported kernel (4.8 as of this writing).

To provide the appropriate firmware for your laptop's wi-fi, you need to add non-free and install firmware-iwlwifi:

echo deb http://http.debian.net/debian jessie-backports main contrib non-free > /etc/apt/sources.list.d/jessie-backports.list
apt-get update
apt-get -t jessie-backports install firmware-iwlwifi

To solve the display problems, you can remove xserver-xorg-video-intel (nowadays Intel GPUs don't need a separate driver, they can use the kernel's mode-setting support), as suggested by GAD3R:

apt-get remove xserver-xorg-video-intel

(You may need to install xserver-xorg-video-dummy to satisfy other packages' dependencies.)

You should also install the Skylake firmware to enable all the GPU features:

apt-get -t jessie-backports install firmware-misc-nonfree

Enabling backports is safe: newer packages are not picked up automatically from backports, you need to explicitly select them using -t jessie-backports as above (but once you've done that, updates to the upgraded packages are picked up by apt-get upgrade).

Version 4.6 of the kernel already provided good support for Skylake, and it's improved since. If you upgrade as above, running apt-get upgrade will automatically upgrade to later versions of the kernel once they become available in the backports.

  • @StephenKitt the needed driver is xserver-xorg-video-intel packages.debian.org/jessie-backports/xserver-xorg-video-intel
    – GAD3R
    Sep 1 '16 at 13:22
  • 2
    @GAD3R read the last paragraph of the package description in the link you gave above ;-). Sep 1 '16 at 13:34
  • @Masi the kernel packages will tell you about potentially missing firmware whenever they're installed or upgraded. For a complete answer I suggest you post that as a separate question. Sep 2 '16 at 9:37
  • Please, consider to add this fix here unix.stackexchange.com/a/308709/16920 in your answer because there is some things which cause xserver-xorg-video-intel be installed as a dependency back to the system, thus conflicting the system configuration. The fix will prevent the action of xserver-xorg-video-intel and we are monitoring how stable it can be now. - - Please, provide also your opinion and/or feedback about it. Sep 8 '16 at 19:46
  • Please, see the thread about system failures with external displays when using this configuration unix.stackexchange.com/q/320993/16920 I am troubleshooting now. Nov 4 '16 at 8:48

You can compile the latest stable kernel version 4.7.2 from the official website , following the steps described here

  1. su
  2. apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc
  3. apt-get install kernel-package
  4. cd /tmp/
  5. wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.7.2.tar.xz
  6. unxz linux-4.7.2.tar.xz

    tar xvf linux-4.7.tar

  7. cd linux-4.7
  8. cp /boot/config-$(uname -r) .config
  9. make menuconfig
  10. make-kpkg clean
  11. fakeroot make-kpkg --initrd --revision=1.0.NAS kernel_image kernel_headers -j 16
  12. ls ../*.deb
  13. dpkg -i *.deb
  14. reboot

My OS is Debian Jessie with Mate desktop

root@s32408:~# uname -a
Linux s32408 4.8.0-0.bpo.2-amd64 #1 SMP Debian 4.8.15-2~bpo8+2 (2017-01-17) x86_64 GNU/Linux

After upgrading the kernel to 4.8 from backports to fix a WIFI issue, I encountered the display bug when rebooting the system. Then I removed the Intel driver as stated above and it fixed the bug.

But, doing so, many essential packages became "no longer required". I did not pay attention in the first place and did some cleaning afterwards:

apt-get autoremove

And after the next reboot, I lost my graphical desktop and many useful applications.

Then I reinstalled a brand new OS and I found that installing the updated Intel driver from backports (instead of removing it) also fixes the display bug but does not break dependencies. In other words I did :

apt-get -t jessie-backports install xserver-xorg-video-intel

instead of:

apt-get remove xserver-xorg-video-intel

You may prefer to remove the driver anyway and tamper with dependencies to overcome the breakage as suggested by StephenKitt in the comments. Up to you.

Note that XCFE desktop is also affected by this issue but Gnome desktop is not.

Thanks to Léo Léopold Hertz for the hint about Gnome and StephenKitt for his great patience ;)

  • I did not find any complications in the same procedure with Gnome. I think your case can be Mate specific. Jan 28 '17 at 8:33
  • You could also install xserver-xorg-video-dummy to satisfy the dependencies instead. Jan 31 '17 at 7:46
  • @Stephen Thanks, I tried this but it didn't work... Still got the display bug with it.
    – Acerimmer
    Jan 31 '17 at 20:15
  • I don't understand — you say "I removed the Intel driver and it worked", and "installing the updated Intel driver from backports would also fix the display bug"; what setup gives the display bug? Installing the dummy package only satisfies the dependencies, the X server won't use it. Jan 31 '17 at 21:53
  • @StephenKitt Just before the statement "To avoid this", note that I had reinstalled a new OS from scratch (I will update this). You need to understand that in my current setup/situation I've got two options to fix the display bug: - either I remove the Intel driver but it breaks dependencies - or I install the newest driver from backports which breaks nothing at all Installing 'dummy' isn't an option since it does not fix the display issue.
    – Acerimmer
    Feb 1 '17 at 1:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.