XPS13Linux icon indicating copy to clipboard operation
XPS13Linux copied to clipboard

Occasional kernel panic on suspend on Ubuntu 15.04

Open advancingu opened this issue 9 years ago • 22 comments

From a fresh installation of Ubuntu 15.04 with BIOS A03, about every 10 suspend cycles without full shutdowns in between, I get a kernel panic (flashing caps lock indicator). The machine needs to be shut down with a long-press on the power button and then can be started again normally.

I'll add log messages if I can, next time this happens.

advancingu avatar May 12 '15 21:05 advancingu

me too on same versions described above.

anaran avatar May 12 '15 22:05 anaran

Is anybody reliably using hibernate and resume in Ubuntu 15.04 on XPS13?

Would love to hear which package, commands and steps they use to do so.

Is there any guidance from the Sputnik team which packages do/will work best in 15.04 and beyond?

anaran avatar May 12 '15 22:05 anaran

I used to have kernel panics with TLP enabled. I removed it about 3 weeks ago, suspend has been working reliably for me since. Ubuntu 15.04, 3.19.0-6, and currently no other power tweaks are active (not even powertop). Battery life suffers, but I didn't have the time to play around with power settings yet.

gaborkr avatar May 13 '15 08:05 gaborkr

@butabeka, I'd never heard of TLP before, is this what you're referring to? If so, is this something that is installed by default in Ubuntu 15.04?

dchambers avatar May 13 '15 19:05 dchambers

@dchambers yes, that TLP and no, it is not installed by default.

gaborkr avatar May 14 '15 09:05 gaborkr

This could be related: https://bugzilla.kernel.org/show_bug.cgi?id=86241 I found it on this page: http://xps13-9333.appspot.com/#suspend Maybe the 9333 and 9343 have more in common than we'd like to have?

gaborkr avatar May 14 '15 09:05 gaborkr

Good find @butabeka, since you don't appear to have the problem perhaps somebody else would like to try the workaround from that issue of blacklisting the mei and mei_me modules, and see if that improves things?

dchambers avatar May 14 '15 09:05 dchambers

I have the same problem here, so far not found a solution yet.

webloem avatar May 20 '15 12:05 webloem

Although at my system (BIOS A03, Ubuntu 15.04) this is not directly related to the suspyend function, the freezes happen at random (but most of the time when the system is rather busy).

webloem avatar May 20 '15 12:05 webloem

This is getting more frequent lately, now every second to third suspend causes a kernel panic. I'll try to blacklist mei and mei_me modules now as suggested here.

advancingu avatar Jul 01 '15 19:07 advancingu

My panics were getting more frequent too, to the point where I got a little desperate and tried this patch: https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1415880

The issue seems to be happening when the broadcom card changes the status of the network. So sleeping or changing networks rapidly can trigger it. After the patch I've gone over three weeks of daily use, at least a dozen suspends a day — no more panics.

Here's my /usr/src/bcmwl-6.30.223.248+bdcom/dkms.conf just for reference:

PACKAGE_NAME="bcmwl"
PACKAGE_VERSION="6.30.223.248+bdcom"
CLEAN="rm -f *.*o"

BUILT_MODULE_NAME[0]="wl"
MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build"
DEST_MODULE_LOCATION[0]="/updates"
PATCH[0]="0001-MODULE_LICENSE.patch"
PATCH[1]="0002-Makefile.patch"
PATCH[2]="0003-Make-up-for-missing-init_MUTEX.patch"
PATCH[3]="0010-change-the-network-interface-name-from-eth-to-wlan.patch"
PATCH[4]="0011-do-not-define-__devinit-as-__init-in-linux-3.8-as-__.patch"
PATCH[5]="0012-add-support-for-Linux-3.15.patch"
PATCH[6]="0013-gcc.patch"
PATCH[7]="0014-add-support-for-Linux-3.17.patch"
PATCH[8]="0015-add-support-for-Linux-3.18.patch"
PATCH[9]="0014-null-pointer-crash.patch"
#PATCH_MATCH[6]="^3.[10-11]"
AUTOINSTALL="yes"

jessevondoom avatar Jul 02 '15 19:07 jessevondoom

Blacklisting mei and mei_me seems to have no effect. I just had another crash last night. I'm now trying the patch mentioned by @jessevondoom .

advancingu avatar Jul 03 '15 07:07 advancingu

These are the steps I performed to build and install a patched package. @jessevondoom, can you confirm that this is the correct way to do that?

sudo apt-get install build-essential fakeroot devscripts
apt-get source bcmwl-kernel-source
sudo apt-get build-dep bcmwl-kernel-source
cd bcmwl-6.30.223.248+bdcom/
patch -p1 < ~/lp1415880.debdiff
debuild -uc -us
sudo dpkg -i ../bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu3_amd64.deb

advancingu avatar Jul 03 '15 07:07 advancingu

All I did was edit the dkms.conf as above and run:

sudo /usr/lib/dkms/common.postinst bcmwl 6.30.223.248+bdcom /usr/share/bcmwl x86_64 $(uname -r)

Already had the source package installed, and the script above recompiled. an apt-get upgrade and restart later things were sorted.

jessevondoom avatar Jul 03 '15 18:07 jessevondoom

Applied the same patch as jessevondoom, haven't had any kernel panics since (about a week).

webloem avatar Jul 08 '15 15:07 webloem

Same for me, no more panics in the past five days.

advancingu avatar Jul 08 '15 15:07 advancingu

Do you know if this issue has been fixed in kernel 4.1.3 ?

When I try to apply this patch I get the following error :

Error! Bad return status for module build on kernel: 4.1.3-040102-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/make.log for more information.

Is there any workaround for apply this patch under kernel 4.1.3 ?

Edit : I finally managed to apply the patch. I don't what I was doing wrong...

hg8 avatar Jul 21 '15 17:07 hg8

I have been getting kernel panics on resume from suspend since upgrading to kernel 4.1.3; I have replaced the broadcom card with an intel card, so I don't have bcmwl installed. Do I still need this patch (and install bcmwl-kernel-source) or is it likely that the kernel panics I see have a difference cause?

cboettig avatar Jul 25 '15 15:07 cboettig

I hadn't blacklisted mei and mei_me before my previous comment. I have done that now and haven't seen a kernel panic so far...

cboettig avatar Aug 06 '15 17:08 cboettig

A PPA including the fix has been set up by Canonical. Simply use the repository and no need to manually apply this patch anymore.

sudo apt-add-repository ppa:inaddy/lp1415880
sudo apt-get update
sudo apt-get upgrade

hg8 avatar Sep 02 '15 07:09 hg8

@hg8 Your repository address (inaddy/lp1415880) is not valid !

thethakuri avatar Jan 14 '17 16:01 thethakuri

@thethakuri This answer is 16 month old! No need for this PPA anymore with latest Ubuntu version.

hg8 avatar Jan 16 '17 09:01 hg8