Lenovo T460 and Debian Gnu/Linux

Today I got my new notebook. A Lenovo T460 Thinkpad. In this blogpost I want do document my problems or absence of problems with installing and using Debian Gnu/Linux. I paid around 930 Euro via the u:book program (where you can get notebooks cheaper if you are a student/pupil or working at a university). The version I bought included 8GB Ram and 256 GB SSD.

tldr: I’m writing this under Debian Testing (stretch) with wireless activated and working audio. Also the screen is working with the expected 1920×1080

More detailed information about the hardware (lspci). You can also look at the the output of lspci -v

00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 07)
00:14.0 USB controller: Intel Corporation Device 9d2f (rev 21)
00:14.2 Signal processing controller: Intel Corporation Device 9d31 (rev 21)
00:16.0 Communication controller: Intel Corporation Device 9d3a (rev 21)
00:17.0 SATA controller: Intel Corporation Device 9d03 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Device 9d10 (rev f1)
00:1c.2 PCI bridge: Intel Corporation Device 9d12 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Device 9d48 (rev 21)
00:1f.2 Memory controller: Intel Corporation Device 9d21 (rev 21)
00:1f.3 Audio device: Intel Corporation Device 9d70 (rev 21)
00:1f.4 SMBus: Intel Corporation Device 9d23 (rev 21)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection I219-V (rev 21)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 522a (rev 01)
04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

Installation

First I tried to use the Debian testing netinstall image. But at that time (2.3.2016) the installer was broken because of some dependency problem between systemd and the ifupdown package. (I suppose this bug ticket is concerned with the problem.) My motivation to use the testing version was to have the better hardware support which was important for me because of the novelty of the T460. My fears now where that the Debian Stable Version (at this time: Jessie) would not be able to install itself on the notebook. But interestingly enough: It did work. The sound, wireless, touchpad and screen had some problems. But this was no problem, because after the first reboot I edited the /etc/apt/sources.list and replaced the jessie keyword with testing. After that used apt-get upgrade and apt-get dist-upgrade upgraded me to the testing version.

Sadly enough the Wireless device needs a non-free firmware. So I had to add the non-free section to the debian apt source list. After that I installed the iwlwifi package. After that, wireless was working.

Also the microphone and the webcam is working out of the box with debian testing (stretch).

Configuration

If you are like me and have some problems with the small fonts in your desktop environment, you should increase the DPI settings. I use KDE so the answer to this stackoverflow queston was helpful. I increased the DPI setting from 96 to 110 and now my fonts are bigger and easier to read. There is another blogposting which helps you with firefox/iceweasel, thunderbird/icedove and chromium.

Migration

Having a new notebook is one thing. Migrating all data and configurations to the new one is a whole other thing. While not really specific to the kind of notebook, I want do document some things I did while migrating to remind myself for next time or help other people save some time.

Mails in Thunderbird/Icedove

If you use thunderbird (or the same program under different name icedove in debian) getting mails and configuration to the new notebook is very easy. Just copy the .thunderbird / .icedove folder under your home directory from you old device to your new one. Just like it is described here.

Public/Private Keys / GnuPG

If you are like me and you are encrypting some of your mails, transfering you keys is another thing you need to do. Luckily enough, this is as easy as migrating your mails(settings). Just copy your.gnupg folder in your homedirectory.

Problems

There is one problem with suspending. When the notebook is on the AC closing the lid causes the notebook to suspend. Opening the lid wakes it up. This works rather flawlessly. The problem is when the device works on batteries – in this case the device freezes when closing the lid. I have done some research and debugging on this problem and asked for support in a posting on the debian forums / I reported my problems in the thinkpad subreddit and got some interesting/informative answers. I’ll report if find some solution for this problem. Update: I’m summarizing my findings and updating new informations about this issue on a dedicated blog post.

I tried hibernating once or twice, it didn’t work out of the box. But I don’t care because I don’t need it.

Links and Resources

TODO:

Tags: , , ,

59 Responses to “Lenovo T460 and Debian Gnu/Linux”

  1. Findus23 Says:

    Hello, I am thinking about buying a new notebook and installing Debian testing on it.
    What is your overall impression of the notebook? Would you recommend buying it? Do you think 930€ is a good offer?

    What do you mean by “screen flickering”? Do you thing the issues will be solved in the future?

    Thanks for this helpful post!

    • stefon Says:

      I like the notebook. It’s not as fashionable as my old samsung ultrabook. But of course, you are not buying a thinkpad to have a fancy notebook but to have a sturdy device.
      I have it for two weeks now and I use it daily and without major problems. I bought it too for 930 euros and I think this is a very good price.

      The screen flickering concerns the 3D effects on the kde desktop environment. I suspect that this will get better with newer kernels. Keep in mind, the skylake architecure is rather new. The “flickering”/strange artifacts are not that often and not that disturbing.

      The other thing which is getting on my nerves is the freezing after closing the lid while on batteries. Look at my post, you can find more information about. but this too should be solvable via (right now to me unknown) configuration or driver update in the future…

      I should post some infos about battery time in the future. I’d say that it’s ok. Around 4 hours with browsing/music. Could be better, but there might be a potential for more battery time with the right configuration and, again, driver updates.

      I can’t say anything about windows performance, debian is the only installed operation system.

      if you have any other question, just ask 🙂 I hope this reply might be helpful to you.

      • Findus23 Says:

        Thanks, that’s really helpful.
        It’s really hard to find a better laptop for this price. I’ll wait some days until I finally decide if I’ll buy it.

  2. Peter Berger Says:

    Hallo Stefan!

    Ich habe mich nun etwas mit dem Hibernate Problem beschäftigt,
    auf meinem T460 habe ich Ubuntu GNOME 16.04 Beta 1 installiert.

    Auch hier ist es so, ich schließe den Deckel und das System friert ein.

    Habe nun das Paket “pm-utils” installiert und damit lässt sich ein Hibernate oder suspend direkt im Terminal starten bzw. testen, “sudo pm-hibernate” oder “sudo pm-suspend”. Wenn man im GNOME Optimierungswerkzeug unter “Energie” die Funktion Hibernate auf den Power Button legt, dann funktioniert das jetzt auch! Wahlweise auch mit Suspend. Alternativ ließe sich auch jeweils ein Skript auf den Desktop legen. Jedenfalls lässt siech das Tool wahrscheinlich in irgend einer weise auch mit anderen Distributionen verwenden.

    Für mich ist das nun als Übergangslösung zumindest halbwegs praktikabel, sofern man nicht den Fehler macht und den Deckel schließt ohne vorher den Power Button zu drücken (2 sek.), dann friert er nämlich wieder ein… 😉

    Hoffentlich kommt da bald ein ordentlicher Patch, der das Problem bereinigt. Betreffen tut’s ja offenbar einige Modelle, T460 / T560 / X260 und den T460s vermutlich auch.

    VG
    Peter

    • stefon Says:

      danke für das Feedback!

      Spannend dass bei dir das hibernate funktioniert, da stürzt er bei mir ab. Welchen kernel hast du denn am laufen bzw. für hibernate irgendwas konfiguriert?

      Die Idee suspend auf den Power-Off Knopf zu legen ist eine gute Idee, das habe ich gleich mal gemacht. Werde ich nur hundertmal vergessen und trotzdem zuklappen 🙂

      Woher hast du denn die Info, dass es mehr Modelle betrifft? Hast du denn da vielleicht Links? Habe, muss ich zugeben, bei meiner Onlinesuche nicht wirklich was brauchbares gefunden…

    • stefon Says:

      Mehr Infos zu dem Thema gibts übrigens hier: https://www.reddit.com/r/thinkpad/comments/4ajgjh/t460_suspend_problem_with_linux/
      Das Problem wurde bereits identifiziert und Kernel Patches gibts auch schon.

  3. Findus23 Says:

    Hallo, ich habe nun den Computer gekauft. (Genauer gesagt den T560; also mit 15.6 Zoll)
    Nach der Installation von Debian Testing hat alles komplett problemlos funktioniert.
    Das Problem mit dem Ruhezustand scheint sich mit der Kernelversion 4.4 gelöst haben und ein Flackern des Bildschirms ist mir (mit GNOME) nicht aufgefallen. Sogar der Fingerabdrucksensor funktioniert mit “fingerprint-gui”.
    Dafür habe ich ein anderes “Problem” (wirklich störend ist es nicht): Beim Hochfahren und Anmelden krachen die Lautsprecher kurz. Es wirkt so, als würde der linke und rechte unabhängig voneinander kurz krachen.

    Ich werde die nächsten Tage weitertesten, aber bis jetzt bin ich wirklich zufrieden.

    • stefon Says:

      Ist denn der Fingerprint Reader für etwas nützlich? Sprich: Als Passwort Ersatz oä verwendbar?

      (wegen sound problemen: da haben wir ja eh ne konversation weiter unten am laufen)

      • Findus23 Says:

        Ehrlich gesagt habe ich ihn nur aus Neugier getestet. Aber entweder verwende ich ihn falsch (bin eher den Apple-Fingerprint gewohnt), oder man braucht immer mehrere Anläufe, dass er erkannt wird.

  4. kusim Says:

    Ich habe Opensuse Tumbleweed (aktueller Kernel: 4.5) auf meinem T460. Dort treten noch sätmlich Probleme auf (flackerndes Bild, Ruhezustand etc.).

    Zusätzlich habe ich auch Probleme beim scrollen auf dem Touchpad. Das hakelt teilweise sehr stark sodass nur sehr grob gescrollt werden kann (z.B. in Firefox oder im Terminal). Tritt dieses Problem bei Euch auch auf?

  5. kusim Says:

    Okay, das Scrollproblem liegt ausnahmsweise bei OpenSuse und konnte gelöst werden.

  6. Marv Lelgemann Says:

    I’ve installed Debian testing on my T460. After patching the Debian 4.3.5 Kernel with this and this patch, I can now use the trackpoint buttons and hibernate is working correctly (also when closing the lid when running on battery).

    Two major and one minor problem remain:

    1 The Intel 8260 WiFi adapter is only usable from within gnome/NetworkManager after maybe 10% of system boots, although it is always listed by iwconfig.

    2 When connecting an external monitor by hdmi, I get kernel warnings when moving the mouse from one monitor to the other and sometimes after disconnecting the system freezes. This is even worse when using official vanilla 4.5 Kernel (with Debian’s kernel configuration), the system sometimes freezes when moving mouse between monitors.

    3 When booting, the internal speakers produce a clicking noise (probably when audio driver is loaded).

    Are you also experiencing these issues/Has anyone solved them?

    • stefon Says:

      Can you point me to a documentation how to apply this patches easily to the debian vanilla kernel? This would be great..

      (1) I’m using KDE and I don#t have this problem. Sometimes the wifi is not listed in the network manager, then a ‘service network-manager restart’ fixes the problem. But this happens really rarely. Should I install gnome and try to reproduce the problem?

      (2) I did not try to connect the notebook via hdmi to an external monitor. So I can’t say anything about it. But I’ll try it the next few days and report back.

      (3) I experience the clicking noise of the speaker when logging into the kde session, not when booting. I didn’t try to fix it until now, i you find some solution please report back.

    • Findus23 Says:

      Hi, I Ave a T560, but I don’t think the difference matters.
      1. I’m using Gnome too and haven’t experienced this issue. WiFi is working perfectly.
      2. I haven’t tested an external monitor.
      3. I have the issue too. There are a few clicking sounds while booting and after login. If I remember correctly it even happens after using the laptop for some time and then playing a sound,but I’m not sure. I’ll test a bit more, when I have time.

      • webnexus Says:

        I’ve been able to solve the crackling issue at login with the following one-liner: echo “blacklist snd_hda_codec_realtek” >> /etc/modprobe.d/blacklist.conf

        Credit goes to https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_3)

      • Jeremy Says:

        The solution proposed by @webnexus solved point 3 on my t460 ubuntu 16.04 completely – Also the crackling happening when using the laptop for some time and then playing sound is gone 🙂
        Thank you!

      • Findus23 Says:

        Thanks webnexus for the solution. No more cracking noice. Unfortunately it has an unintended side effect: The orange “mute” LED on the F1 key is not working anymore. (Not a big drama, but worth mentioning)

      • lumixen Says:

        Yeah, looks like it fixes cracking sounds. Though, I confirm that blacklisting snd_hda_codec_realtek breaks F1 (mute) and F4 (mic mute) orange led indicators.

  7. Marv Lelgemann Says:

    Thanks Stefon and Findus.

    @Stefon
    (2) “service restart network-manager” also works for me
    (3) You are right, the noise is when “gdm” starts, and once again after logging into a gnome session.

    I applied the two patches to the Debian 4.4.6 kernel by hand. I created a kernel configuration with all T460 (our model) essential drivers built-in and all other drivers from the default debian kernel configuration as modules. Hibernation and trackpoint buttons work correctly and now NetworkManager is reliably configuring the wifi interface after a boot or reboot. I will check the behavior with external display another day.

    If of interest, you can test the kernel. The initrd created by my deb kernel package does not include the firmware for the now built-in drivers for the graphics and wifi adapter, so I added them manually.

    So you could install the kernel with “dpkg -i linux-image-4.4.6-t460_1.0_amd64.deb” and then replacing /boot/initrd.img-4.4.6-t460. You should then have the option to boot it from grub. You can also reproduce the steps and use my kernel’s config file.

    kernel in dropbox

    • Findus23 Says:

      Hi,
      What irritates me, is that I am using the kernel version 4.4.0 and it boots without problems and the buttons above the touchpad are also working perfectly.
      Why would I need the two patches?

      • Marv Lelgemann Says:

        Maybe the T560 does not have these problems. If you’re fine of course you don’t need them.

        The problems with the buttons above the touchpad were, that they immediately triggered a release event, so that drag and drop, select text and scrolling with middle button and trackpoint were not possible (horizontal/vertical scrolling with trackpoint has to be configured in xorg).

        The other problem was when closing the lid while running on battery crashed the system. When AC was connected, that was not a problem.

        Now that I use built-in drivers I don’t have the problem with my wifi adapter not appearing to network manager anymore.

  8. Marv Lelgemann Says:

    Bluetooth firmware was missing in initrd, uploaded a new version of initrd.

  9. kusim Says:

    Does someone configured multitouch gestures for the touchpad somehow? I installed touchegg on opensuse tumbleweed, but after starting it in the terminal, no information about the gestures appear.

  10. T460(s) suspend problem while on battery | Stefon's Blog Says:

    […] In this blog post I want to summarize my investigations about problems concerning suspend with my lenovo t460 notebook. (Note: This problem seems to also exists with the lenovo T460s notebooks. More information about debian on the t460 can be found here.) […]

  11. Findus23 Says:

    Eine möglicherweise ziemlich blöde Frage: Woran erkennt man, dass der Akku (oder genauer gesagt: die Akkus) voll geladen sind?

    • stefon Says:

      ist mir ein wenig unklar auf was du dich beziehst. meinst du in der gui? meinst du ob es via kommandozeile ne möglichkeit gibt oder suchst du eine möglichkeit dies direkt am gerät (durch die led leuchten, ..) zu erkennen?

      • Findus23 Says:

        Entschuldigung, ich habe mich etwas unklar ausgedrückt.
        Ich wüsste gerne, wie man am Gerät erkennen kann, ob es vollständig geladen ist, ohne es einzuschalten.

      • stefon Says:

        kein ding 🙂 deswegen habe ich ja nachgefragt.
        ich wüsste nicht, dass das direkt am gerät ersichtlich ist. vielleicht am blinken des leds?

      • Findus23 Says:

        Ah, okay. Ich hätte schon gedacht, dass ich etwas offensichtliches übersehe.

  12. Stefan K Says:

    Hallo,

    ich nutze Debian Jessie mit dem Backport-kernel 4.4, mir ist aufgefallen das der Suspend(egal ob to Disk oder to Ram) nicht ordentlich funktioniert wenn das Gerät an einer Dockingstation angeschlossen ist mit 2Monitoren(am Displayport) und und die lid zu ist.
    Kann das jmd bestätigen, oder mache ich was falsch?

    • stefon Says:

      habe leider keine docking station :-/ aus interesse: was sind die grossen vorteile eine zu haben?

      • Stefan K Says:

        Ich habe höhere Anschlussvielfalt, ich muss die Kabel nicht alle anstöpseln und wieder abstöpseln und was ich auch wichtig finde das sie dann einen festen Platz hat und niemand auf die Idee kommt da was hin zu stellen. 😉

      • stefon Says:

        danke für die info!

  13. Emilio Says:

    Hello,
    your blogpost was very useful to me and helped me to solve a lot of issues with my new notebook.
    Let me add that, if somebody has choosen during the notebook configuration the BROADCOM WIFI BOARD, she can make it working installing firmware-linux and firmware-brcm80211.
    Here more infos: http://forums.debian.net/viewtopic.php?t=127856

  14. Findus23 Says:

    Hat jemand hier schon Erfahrungen mit einem BIOS-Update? Mein Laptop hat die Version 1.03. Für meinen t560 gibt es aber schon 1.06, für den t460 sogar schon 1.10. Anscheinend lässt es sich (ohne windows) nur mit einem externen CD Laufwerk installieren: http://support.lenovo.com/at/de/downloads/ds112123
    Hat das schon jemand ohne Probleme gemacht?

  15. mankdene Says:

    Hey, sehr informativer Blogpost!
    Mich würde interessieren ob du bezüglich des Audio Problems beim booten/anmelden inzwischen zu einer Lösung gekommen bist? Hab das gleiche Probleme auf meinem T460 und konnte bisher noch keinen vernünftigen Lösungsansatz finden.

  16. Stefan Weichinger Says:

    t460 with fedora 24: I also notice the flickering, maybe only with powersaving settings (via powertop). I have to test that. Is there any particular fix or bug related?

  17. rajbourne Says:

    I have installed RHEL 6.7 and have issues with following:

    Wifi – unable to detect devices
    Trackpad – Not working properly
    Suspend – Have to hardboot if I suspend the system

    If any workaround or solution, please share.

  18. Jeremy Says:

    Hello since this blog really led me forwards using ubuntu 16.04. on t460 mid this year, now it’s time for 16.10. Intel architecture etc pp.
    However my upgrade didn’t not work out as a full success. Do you also have the login crackle again? Maybe we have issues in common… Is this post still active?
    Best, Jeremy

  19. Ryan Says:

    Update for 5/2018:

    In stretch (stable), almost everything works out of the box. You need to install firmware-iwlwifi for wifi/bluetooth support, and KDE would freeze after waking from hibernation.

    Buster (testing) breaks a couple of things, though:

    1. an update to firmware-iwlwifi breaks bluetooth,
    2. the system wakes up a couple seconds after going into suspend, and
    3. closing the lid doesn’t put the system in suspend.

    The first point can be fixed by force-installing the stretch version of firmware-iwlwifi.

    The second point can be fixed with `sudo sh -c ‘echo XHCI > /proc/acpi/wakeup’`, but it needs to be run after each reboot.

    Still looking for a fix for the third point, though. :\

    • lw1 Says:

      @Ryan that’s interesting.

      I have now been running my T560 on debian testing with KDE for two years and everything is working fine now.

      I haven’t tested a bluetooth connection, but the menu seems to be working.
      Closing the lid and waking from suspend works perfectly and always has.

      • Ryan Lue Says:

        Hm. Are you on stable or testing?

        The bluetooth _menu_ works, but with the version of firmware-iwlwifi that’s in testing, I can pair but can’t connect to devices. Or, sometimes, I can’t detect nearby devices at all.

        Not suspending on lid close was a mistake on my part (see my response to @Stefon below).

    • stefon Says:

      @Ryan I also have the problem with the system waking up seconds after suspend when using debian testing. Did you create a bug for that?

      For me closing the lid is putting the system in suspend. Should we try to find the difference between your configuration and mine?

      I did not try to get Bluetooth to work, should we join forces on that one?

      • Ryan Lue Says:

        @Stefon,

        I haven’t submitted a bug, because I’m not sure which package to file it under. I did ask at debian-user@lists.debian.org, but haven’t gotten a response. Did disable XHCI wakeup work for you? I have a sudoers entry that allows me to run that command without a password prompt:

        %sudo ALL=(ALL) NOPASSWD: /bin/sh -c echo XHCI > /proc/acpi/wakeup

        and then I run it as an autostart script in KDE.

        Re: the lid not triggering suspend, that was a mistake on my part — I simply had to reset the KDE System Settings > Energy Saving preferences to default. -_-‘ (Not sure why the defaults were not originally in place, though.)

        As for bluetooth, it’s (mostly) working for me now. Here’s what I did:

        1. Add stable repos back to /etc/apt/sources.list
        2. sudo apt update && sudo apt install -t stretch firmware-iwlwifi && sudo apt-mark hold firmware-iwlwifi
        3. Remove stable repos from /etc/apt/sources.list

        Caveat: I’ve had issues with bluetooth and wifi transmitting at the same time. As in, Bluetooth will continue working, but wifi will slow down a LOT.

      • stefon Says:

        @Ryan
        Can you post a link to your email on the mailing list (it should be on the archive https://lists.debian.org/debian-user/ i suppose, but i didn’ t find it).

        just to be sure: when the notebook wakes up after a few seconds, i open and close the lid and then most of the times it suspends for good. do you have the same behavior?

        as for the bluetooth issues: i suppose it should work with testing sources only too 🙂 I’ll check if bluetooth is working for me and report back…

        to be clear: I am using debian testing with 4.16.0-1-amd64 kernel

Leave a reply to Marv Lelgemann Cancel reply