EDIT on 05/11/2013: On Kernel 3.8.x you may have to add echo N> /sys/module/drm_kms_helper/parameters/poll to /etc/rc.local (before exit 0) to fix the issue.
EDIT on 05/21/2013: On Kernel 3.8.x – 3.9-rc5 a regression causes an irq storm from the i915 and the drm polling parameter is somehow ignored, and the suggested fix won’t work anymore. If you are experiencing the issue:
1) Downgrade to a different kernel, preferably 3.2.x
2) Add echo N> /sys/module/drm_kms_helper/parameters/poll to /etc/rc.local (before exit 0) OR add drm_kms_helper.poll=0 to grub boot parameters, to bring your system back to sanity.
This is just a workaround, track the issue here: https://patchwork.kernel.org/patch/2400621/
–Original post–
Some minor issues with the Linux kernel release starting from version 2.35 causes the X-Server on the system to perform miserably. I started experiencing the problem ever since I upgraded to kernel 2.35. It became almost impossible to use by laptop so I’m summing all the information I gathered from various Bug reports.
And yeah, the solution to it of course 🙂
Affects: Lots of computers with the Intel Graphics Accelerator
Issues:
- Kernel 2.35* : Mouse freezes intermittently some time after boot up. Keyboard activity is good. This results in an almost unusable desktop environment. Top will report the high CPU usage by 3-4 processes named – kslowd000, kslowd001, kslowd002 …
- Kernel 2.36* and beyond : Mouse freezes some time after boot up. This is more like a permanent freeze and system activity is impossible. Only solution is to reboot but it’s just a matter of a moment that the problem will come back.
Fix:
- Type ‘uname -a’ to the shell to find out the version of kernel you are using. uname will return something like:
Linux souri.razr 2.6.36.1-11.fc15.i686 #1 SMP Fri Dec 3 12:38:48 UTC 2010 i686 i686 i386 GNU/Linux - Here 2.6.36.1.-11 shows which version of kernel I’m using right now.
- For those of you using some kernel that has version 2.36.* proceed to step 5.
- For those of you using kernel 2.35.* , a kernel upgrade is required. Nothing to be scared of! Just need to type in:
#yum update kernel [in Fedora] OR #apt-get upgrade #apt-get install kernel [in Ubuntu] - This should update your kernel to the latest version that your distribution provides. Uname should now report a kernel version >=2.36.The update to kernel >=2.36 is essential because it enable a feature to disable the DRM_KMS_POLLING feature of the kernel. It is bot possible to disable DRM_KMS_POLLING for the 2.5 kernel. Maybe in some future bug-fix release of the 2.35 kernel they are going to patch this.
- Reboot your system with the new kernel.
- Open shell and become root.
- Type
#echo N> /sys/module/drm_kms_helper/parameters/pollThis should drastically reduce the system load and put your system back to normal. - Note that this will only be sustained till system reboot. After reboot the value will revert back to poll=Y
- For a sustained effect:
#echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf
Hope this will help your woes. Enjoy! Please post any problems you may experience.
Also, kindly post the output of your uname -a, in case this helped you.
Had the same symptoms on an old machine with ATI Radeon GPU and this solved it.
Thanks for sharing.
Hardware Detection - Problems
I have kernel 2.6.38 (Debian Wheezy). This solved mine too. Thanks a lot man.
Thanks a lot, man, it seems to have solved the problem also here!
Thanks, the lag was killing me… I don’t seem to have local.conf in /etc/modprobe.d. I assume I can just create it?
I appreciate the valuable feedback 🙂 I can’t figure out why the persistent behaviour is not achieved.
However a forced workaround can be done by adding the line:
echo N> /sys/module/drm_kms_helper/parameters/poll
to the file: /etc/rc.local
I’ve tried it in a a friend’s system. Works great 🙂 I believe it will serve you people just fine. Let me know.
Thank you so much, I was about to give up on using Linux on my TP 😦
Your solution works well for me, except for the long term solution. On my Ubuntu 11.04 with kernel 2.6.39 it’s not enough to write options drm_kms_helper poll=N
to /etc/modprobe.d/local.conf.
I appreciate the valuable feedback 🙂 I can’t figure out why the persistent behaviour is not achieved.
However a forced workaround can be done by adding the line:
echo N> /sys/module/drm_kms_helper/parameters/poll
to the file: /etc/rc.local
I’ve tried it in a a friend’s system. Works great 🙂 I believe it will serve you just fine. Let me know.
solved regular mouse lag/stalling for me under ubuntu 11.04 with ati radeon hd 5600 as well. thanks!
i am using the open source driver, and my kernel version is 2.6.38-8-generic.
Thx dude, that solved my problem. Having 2.6.38-11-generic-pae #48-Ubuntu SMP Fri Jul 29 20:51:21 UTC 2011 i686 i686 i386 GNU/Linux
Cheers
Andre
Confirmed on a T400 — it has always been bad but after a recent update to 2.6.38-11-generic-pae the system became completely unusable. This fix works as advertised and should be spread far and wide.
I’ve always purchased Thinkpads specifically for their better than average linux support so this one was highly irritating indeed.
Bad Performance using Thinkpad X200, Arch Linux and X
Works just great with Archlinux and package linux 3.0.7 .
Thanks a lot !
Oh jeeze… Thank you! I’ve been looking for a way around this bug for ages. It’s not particularly bad on my two Intel chipset machines, but the cursor lag is quite annoying.
I’ll note though that, as far as I can tell, KMS polling (whatever it is) is still enabled by default in the latest kernel version. I really have to wonder why… As far as I can tell, turning it off does not compromise functionality at all.
Processo “kworker” deixando seu computador inutilizável?
I have Debian running on a mid-2011 Macbook Air (4,2) and I was seeing this problem with 3.1 and 3.2-rc kernels. It was driving me crazy. This solved it completely. Thanks!!! With this Debian is running very well.
Cheers. This solved a problem I faced today where my laptop was continously laggy because of that stupid module. Now, since I applied that fix you wrote about, it’s all good! 🙂
Thanks again.
PS. Kernel version what this happened on:
Linux FedoraM200 3.1.0-7.fc16.i686 #1 SMP Tue Nov 1 21:00:16 UTC 2011 i686 i686 i386 GNU/Linux
Great
echo N> /sys/module/drm_kms_helper/parameters/poll
solved the problem in my T400 with kernel 3.0.0-12-generic Ubuntu SMP
thx
I started having this problem with 3.2.2-1.fc16.x86_64 on fedora 16 on a sony vaio z11 this morning. Mouse lag, difficult to work. This solved the problem.
Thanks
That’s a perfect solution for Mouse Freezing and Kworker issue.
It is working perfectly after fixing with the suggested changes.
Many many thanks.
Thanks–came across this while trying to fix the kworker problem on my wife’s Thinkpad running Ubuntu. After an hour of fails this did the job.
Solved mi problem too, and I use a Dell latitude e5240, with ubuntu 11.10, kernel 3.0.0-15.
thanks a lot!
Hey, thank you very much! i’m using 3.2.0-17-generic kernel. But Is there any solution for always? Sorry for my english..!
yes. check the comments above.
I have used this solution on a T400 and found that the contents of the poll file revert spontaneously to ‘Y’ after a day or so. I will make a cron job that pokes ‘N’ into it every so often.
It’s great that such an easy solution is available, but it seems odd that the kernel folks have allowed it to persist across so many releases.
Thank you so much, resulted in my newly installed ubuntu 12 🙂 was to give up but luckily I found your post …
once again thank you!
Linux nelson-ubuntu12 3.2.0-24-generic-pae #37-Ubuntu SMP Wed Apr 25 10:47:59 UTC 2012 i686 i686 i386 GNU/Linux
Marry me.
Ubuntu 12.04 precise, kernel 3.2.0-24-generic on a thinkpad x200; this workaround seems to have helped me (keeping my fingers crossed). thanks a lot!
@theguy: second.
Thank you for sharing this. It worked for me on Ubuntu 12.04 running on a MBA mid 2011. I have posted this on the Ubuntu apple forum (http://ubuntuforums.org/showthread.php?p=12137145#post12137145), and linked back here. Thanks again you ahve saved me so much time and frustration.
Thinkpad X200 & ralentissements Xorg | Hippopota.me : le bloc-notes de deK
Thank you so much! I was, almost, going crazy about this high cpu load.
It helped me with my T400 (cpu P8600), where I experienced about 45% cpu load on both cpu´s (debian wheezy ).
I wonder why this setting is still the default.
Great! You saved my day, works like a charm also on a Lenovo X200, where these darn kworker processes made it unusable.
Thanks for posting this.
Stichpunkte vom Wochenende « pregos blog
Way cool! Some extremely valid points! I appreciate you penning this write-up and also
the rest of the site is also very good.
Thank you very much Sourig!!!!
You give me “my xubuntu” back again!!
Grat work!!
3.8.0-26-generic problem back?
Your trick solved my problem.
Thanks
P.
Ubuntu 13 change drm_kms_helper poll param | Ubuntu Info - James n Sheri.comUbuntu Info – James n Sheri.com
worked great on thinkpad t400
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux
Unfortunately not working for me on ThinkPad-T400 3.8.0-19-generic
I tried putting “echo N> /sys/module/drm_kms_helper/parameters/poll” in /etc/rc.local (before exit 0)
and “options drm_kms_helper poll=N” in /etc/modprobe.d/local.conf
Whenever i check /sys/module/drm_kms_helper/parameters/poll has N in it…. so it does not seem to revert to Y….. but almost every time I resume from sleep kworkers rebel and completely lock up my machine with 5 minutes.
ARRGH!
This has been going on for months for me now.. since Ubuntu 12.04. I’ve been a fulltime linux user on my laptop for 8 years… this is the first time i’ve come across a bug which has shaken the faith.
This sounds bad. Unfortunately, I’m not using my Thinkpad anymore, that makes me unable to triage the bug at this point of time.
However, I’ll ask you to try out the following:
1) Try and report the kernel messages while the pc resumes from sleep, till the lockdown and check for any interesting messages.
2) The worst case scenario – downgrade to a different kernel version and check, hope you wouldn’t lose out any significantly used functionality. Kernel 3.8 brings several power management fixes in the code, and perhaps chances are there that in your case the kworker panic is created by some other regression.
In the meanwhile I’ll check what I can do, and let you know. Cheers!
Update: It seems that the best option for you is to downgrade to kernel 3.2.x. I hope a fix is about to get released in kernel 3.9:
https://patchwork.kernel.org/patch/2400621/
Thanks Souri… I’ll keep watching and try and do the downgrade
Souri, how did you find out about the existance of this patch in patchworker? I can’t find a relevant bug in the kernel bugtracker and even if so, how can I tell which patch in patchworker corresponds to a certain bugzilla bug?
Well, patchwork.kernel.org doesn’t provide a search facility. So, I’ll use a search string “kworker site:patchwork.kernel.org” on google for this issue. Also, I could not find a similar bug in the kernel bugtracker. The intel-gfx project in patchworks is usually supposed to manage the i915 driver and they seem to work pretty actively on that.
Regarding which patch in patchwork corresponds to a bug in bugzilla, you’ll not always be able to tell it if the submitter or the participants in the lists haven’t mentioned it, in most cases if a patch is being developed, you’ll find a reference. Again, these two work fairly independently, since patchworker is just supposed to track the progress of a patch delivery and not to track,identify or manage bugs.
Also I found references of the issue on the linux kernel mailing lists, indicating they’ll be fixed in kernel v3.9/3.10
https://lkml.org/lkml/2013/4/15/111
http://blog.ffwll.ch/2013/04/neat-drmi915-stuff-for-310.html
Is it safe to use 3.9 kernel from ppa because 3.8 is broken in 13.04 on my hardware | Ubuntu InfoUbuntu Info
Looks like the fix was included in 3.10:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b543fb0464ddf30a5b554957fd212eb7a2acac65
Thanks for the update!
It seems to have worked for me… finally .. relief.
Thanks for being along for the ride 🙂
Cheers!
Some details on the fix in 3.10, quoting Intels Daniel Vetter:
“Once we detect a storm we kill the hotplug interrupt. Note that since on many systems these storms only happen in certain conditions (e.g. specific battery charger state) we’ll re-enable the interrupts every 2 minutes to check whether the storm has passed”.
I don’t know if this is a stupid question, but do you think it likely that Ubuntu’s forthcoming adoption of MIR will mean I can install Ubuntu 14.04 and not encounter this irritation?
Hopefully yes! Also, I’d recommend you to upgrade to kernel 3.9 and try for now.
AFAIK 3.9 does not have the necessary patches, at least vanilla kernels don’t. You can use the latest 3.10.7 though…
Thanks for the correction, Jan. 3.9 has the modeset locking rework and not the actual fix.
Is it safe to use 3.9 kernel from ppa because 3.8 is broken in 13.04 on my hardware | WyldePlayground.netWyldePlayground.net -
Hello! Just wanted to ask – was the patch finally upstreamed? Many thanks for you work, souri!
AFAIK 3.10.7 has it.
This is the patch:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0ce99f749b3834edeb500e17d6ad17e86b60ff83
Linus merged it in 3.11…
I solved my problem thanks to this article:
http://sudoremember.blogspot.it/2013/05/high-cpu-usage-due-to-kworker.html