Some cpufreq and speedstep lessons

I’m getting closer to the guts of my system as I pursue that annoying mouse lag problem. Thus far, installing cpufreqd and trying to set the governor were only vaguely successful.

A pure, server installation of Ubuntu doesn’t set my speedstep module, which is what I’ve learned thus far. The lag is weak at first, and after a couple of hours becomes steadily worse. That’s when the eth0 and printk messages start showing up in the kernel log.

I can insert the speedstep-smi module and lag becomes apocalyptic — it hangs the keyboard and skips every second and a half. cpufreq error messages start to rack up in the kernel log in quick successsion.

Adding cpufreq_userspace or cpufreq_ondemand don’t seem to improve things. I can (sometimes) overwrite the scaling_governor file, deep inside /sys/devices/system/cpu/cpu0/cpufreq, or set one of the other frequency files, but it doesn’t seem to help.

So all that’s counterproductive. If I go on to install cpufreqd and cpufrequtils, and then set the performance governor, I get manageable lag, like when I start. So the net effect of all that is nil.

My big question at this point is, do I need to restart to catch the effects of a change to those deep files, or should they take hold immediately? Seems like if it’s been modprobe’d, it’s working. But I have little expereince with those issues.

Installing powernowd doesn’t seem to do anything at all, and cpudyn is likewise fruitless. I think both of those are intended for newer processors, though.

I’ve read in a couple of places that this particular CPU (a Pentium III mobile) should use the speedstep-ich module, not the smi one. However, I can’t insert it; I get failure messages when I try.

It’s all very interesting for a couple of reasons. First, rebooting sometimes carries the lag over, but hard shutdowns will sometimes erase the issue. That’s not exactly definitive (hence the double-sometimes), but it’s a noticeable phenomenon.

Second, whatever was ailing my full Xubuntu installation doesn’t seem to be an issue now. At the same time, the governor trick doesn’t seem to have solved anything for me … or at least not as dramatically as when in Xubuntu.

I think I shall troubleshoot this a while longer. I usually have a fairly low tolerance for hardware issues; if it doesn’t work, I’m keen on disassembly and resale. But for now, this one intrigues me. And I like this laptop.

And I have to admit I’m learning a lot. And a special tip of the hat goes to the Arch linux wiki, which was instructive in this episode.


8 thoughts on “Some cpufreq and speedstep lessons

  1. K.Mandla Post author

    I tried once before with a different mouse, and just out of curiosity I tried another one, and the effect is the same. I think this is either a deeper problem than just the optical mouse, or perhaps something else.

    I used to have problems a long, long time ago with a mouse plugged into the PS/2 port on an old P2-200Mhz laptop; it’s possible this is somehow akin to that.

    I’ll try shifting to a USB mouse instead of PS/2, and see if that’s any improvement. I have a feeling the CPU scaling is somehow to blame, though.

  2. Dave


    I stumbled across your blog because I, too, have been experiencing
    mouse/keyboard lag under 2.6.19 when no such lag exists under 2.6.9.
    This problem exists on a PIII-1GHz Dell inspiron 8100 laptop which
    works wonders for my surfing/note-taking tasks.

    I am running FC6 and KDE and your suggestion to try using cpufreq-set -g performance seems to have curbed the problem… thus far.

    I’m pretty good with linux, but not that great with kernel “majik”, so as much as I’d like to know what changed along the road (and would hope will get fixed), I much appreciate you posting your fix out here for poor clueless souls like me to find. πŸ™‚

    Much thanks,


  3. K.Mandla Post author

    Dave! That’s great! I mean, it’s great to know I’m not the only one with this problem!

    And now that you mention it, I used to have Dapper installed on this laptop, and I didn’t ever remember there being a lag issue like this. I’ll bet you’re right: I’ll be it is a 2.6.19 probelm. I should drop back to Dapper and see if the problem dissipates.

    Well, it’s good to know that I’m not the only one suffering. I was worried I was going nuts for a while.

    I hope the cpufreq-set trick works for you. Sometimes it does for me, sometimes it doesn’t. A cold boot seems to help too, but it shouldn’t be that much work to live without mouse lag.

    Thanks again! I don’t feel so alone now!

    P.S.: Aren’t those 8100s great machines?! I have an 8000 decked out to pretend it’s an 8200, and I just love that series. I wish I had about two more of them, just to keep me busy.

  4. Dave

    Yah, I’m guessing somewhere between the two kernels, someone made an assumption on these speed-stepping PIIIs they shouldn’t have made.

    I changed /etc/cpuspeed.conf (FC6) to reflect my preference
    (GOVERNER=performace) and, so far, mouse and keyboard inputs are smooth over a few reboots (I’m at a coffee shop typing this on it now). Should that change, I’ll certainly let you know.

    You should also check the files in (the equivalent of)
    /sys/devices/system/cpu/cpu0/cpufreq to see if your cpufreq-set
    command did what it was supposed to do.

    It’s always good bumping into others who share a difficulty. It lets me know I’m not red-line senile… yet. πŸ˜‰

    Even though it’s a brick, I do like my i8100. SXGA resolution on the screen, two batteries give almost 4 hours of play time, and it seems to handle the occasional buffeting it gets from its somewhat absent-minded owner.

    Happy Inspironing… πŸ™‚

  5. James

    I’m having the same problem with mouse lag on my Toshiba M55-S139. I always had trouble with my USB mouse dieing and killing the USB ports in every version of Ubuntu I’ve used. Adding “noapic irqpoll pci=routeirq” to the kernel boot fixed it in Dapper and Feisty (skipped Edgy), but the mouse lag is really bad in Gutsy. I removed them, and it got slightly better, but then the mouse started dieing again.

    I’ve got cpu scaling turned on, and setting it to “performance” makes the mouse slightly more responsive, but the cursor will simply stop moving if there’s any disk activity, or if Firefox is loading a page, or anything like that.

  6. Jomppe

    Hi, I’m experiencing lag when I move my mouse slowly, but It works just great when I move it faster. I dunno whats the problem here, I’ve never had this kind of a prob until i upgraded 7.10 to 8.04.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s