advancingu / XPS13Linux

Public collection of issues with running Linux on a Dell XPS 13 (2015 edition)
131 stars 3 forks source link

Occasional kernel panic on suspend on Ubuntu 15.04 #13

Open advancingu opened 9 years ago

advancingu commented 9 years ago

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.

anaran commented 9 years ago

me too on same versions described above.

anaran commented 9 years ago

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?

gaborkr commented 9 years ago

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.

dchambers commented 9 years ago

@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?

gaborkr commented 9 years ago

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

gaborkr commented 9 years ago

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?

dchambers commented 9 years ago

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?

webloem commented 9 years ago

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

webloem commented 9 years ago

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).

advancingu commented 9 years ago

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.

jessevondoom commented 9 years ago

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"
advancingu commented 9 years ago

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 commented 9 years ago

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
jessevondoom commented 9 years ago

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.

webloem commented 9 years ago

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

advancingu commented 9 years ago

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

hg8 commented 9 years ago

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...

cboettig commented 9 years ago

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 commented 9 years ago

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...

hg8 commented 9 years ago

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
thethakuri commented 7 years ago

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

hg8 commented 7 years ago

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