I was having problems with a Lenovo t460s with Ubuntu 16.04.2. Suspend worked fine if laptop was never docked. Once undocked, it would freeze when attempting to come back from suspend.

How can I fix this?

2 Answers 2


I had this problem too and did some investigation. The problem is caused by the i915 driver. It occurs if an external display was enabled whilst using the dock. The i915 driver is backported to the 4.4.0 kernel in Ubuntu 16.04, which may not help. The actual crash is: [440183.307053] kernel BUG at /build/linux-0uniEn/linux-4.4.0/ubuntu/i915/intel_ddi.c:730!

If you look at the code the issue is that the driver is surprised/confused that one output has gone away and deals with this by bringing the whole kernel crashing down, rather than just reporting a failure. This is pretty shoddy code.

I tried kernel 4.12.3 from the ubuntu kernel upgrade PPA, and that works better but still crashes sometimes. It quite often hangs for several minutes on unsleep, before the screen finally appears, which is better than crashing and losing stuff, but tiresome.

A completely reliable way to work around this is to explicitly turn off the external display before undocking. This script 'undock' does that:

xrandr | awk '$2 == "connected" && !/^eDP/ {system("xrandr --output " $1 " --off")}'

(A corresponding one with s/--off/--auto/ will turn it back on.)


Some have claimed a newer kernel/xorg can possibly fix this. Read more here. To install this run:

sudo apt install --install-recommends xserver-xorg-hwe-16.04

I'm using i3, that broke several things. i3bar+i3status stopped working (don't show up), xbacklight stopped working (runs but doesn't change brightness). To get them back I had to mess with xorg devices, as suggested here.

FYI: I haven't done enough testing to verify that the hwe package solved the freezing after suspend issue. Will update here.

Update: I've had my laptop on for over 30 days, docking, undocking, and sleeping while undocked (haven't tried on the dock). So this seems to solve the problem until.

Kernel version is now:

Linux mylaptop 4.8.0-46-generic #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • He said, never updating. May 8, 2017 at 10:54
  • Does anyone know if the problem persists in Ubuntu 18? I was thinking of upgrading anyway, this would be extra motivation. Mar 3, 2020 at 8:13

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.