Ubuntu 18.04 slow after 2019 update

5,430

Answering my own question after 3 weeks of despaired search and a fruitless complete 18.04 reinstall including all packages I had before. Finally diagnosed and repaired by an expert family member inspired by question 1021748.

The ondemand CPU governor switched to "powersave" mode after booting up. This lowered the CPU frequency to even below the minimum set frequency of 400MHz, and stayed there hovering around 380Mhz (inspected via lscpu).

This happened when the governor switched the CPU to powersave mode:

cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor

Switching the CPU governor to performance mode solved the problem (for policy0-3):

 echo performance | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

Permanently removing the ondemand governor, made this survive reboot, keeping the governor set to performance:

systemctl disable ondemand

No idea why the powersave mode turns out so bad and what went wrong where in the April 26 18.04 update and is still present in the reinstalled version. Some posts hint that the ondemand governor doesn't play well with the Intel pstate scaling driver... Anyhow, my question wrongly asked about gnome (I took it out). It was the CPU control affecting everything.

Share:
5,430

Related videos on Youtube

Rob Rutten
Author by

Rob Rutten

Updated on September 18, 2022

Comments

  • Rob Rutten
    Rob Rutten over 1 year

    I run Ubuntu 18.04 on a modern Toshiba laptop without problems - until updating on Apr 26 2019. It needed restart. After that Gnome opened windows terribly slowly. I removed all Gnome extensions, ran sudo apt update, sudo apt autoremove, sudo apt full-upgrade, but no difference. Is this a virus? Help!? I am a near-80 astrophysicist but an Ubuntu dud and appreciate help...

    Addition Apr 29: other posts made me look at dmesg. At its end:

    [211509.868273] [drm:intel_pipe_update_end [i915]] ERROR Atomic update failure on pipe A (start=458201 end=458202) time 207 us, min 1073, max 1079, scanline start 1069, end 1083

    [212774.344829] perf: interrupt took too long (22682 > 22655), lowering kernel.perf_event_max_sample_rate to 8750

    Are these meaningful?

    Addition May 6 2019: getting desperate. Top shows that the machine runs fine. Booting with my original installer 18.04 USB stick does not have the problem. I tried the previous kernel: same problem. I tried login with Gnome from Xorg: same problem. May be not a Gnome problem because other things are very slow too, Ethernet by a factor 5-10. I presume one of the many packages I installed does this after the update? - but how find it?

    • Admin
      Admin about 5 years
      in a terminal run top ... does it show something using loads of CPU ? there are many other such resource usage viewers like itop and htop ... if you boot from LiveUSB does the sluggishness go away ?
    • Admin
      Admin about 5 years
      @ Scott Stensland: top mostly shows top itself on top at 3%, sometimes gnome-shell up to 30%. LiveUSB - don't know what that is.
    • Admin
      Admin about 5 years
      My local mirror logs show that on Apr 25 2019 a new version of gnome-shell was pushed out. Other updates were pushed that day, but none that look relevant. No updates were pushed on Apr 26. I don't use gnome, so this is an uniformed approach, but maybe try downgrading to the previous version of gnome-shell? It looks like the version pushed out that day was 3.28.3... and the older version is 3.28.1...
    • Admin
      Admin about 5 years
      @ Organic Marble: command "gnome-shell --version" indeed returns "GNOME Shell 3.28.3". Can you instruct me how to do downgrade? Google gave confusing recipes (probably too old).
    • Admin
      Admin about 5 years
      I asked separately how to downgrade gnome-shell in question 1141442. Got the recipe (from Kulfy) and downgraded, restarted the computer. Windows open faster than after the above upgrade but still slow. Internet also still too slow. I see no longer lines "lowering kernel.perf_event_max_sample_rate" in dmesg. Upshot: improved but not there yet. In the meantime I work on an an older Toshiba laptop still running 12.04 at normal speed.
    • Admin
      Admin about 5 years
      Alas, I rebooted again (shutdown + power on) and now window opening, workspace shifter, ethernet again as terribly slow as since the Apr 29 update. Output gnome-shell --version: GNOME Shell 3.28.1.
    • Admin
      Admin about 5 years
      I didn't think that downgrading GS would fix your problem. With limited data in your question, I'd say check your video driver. If you look in Software & Updates, Additional Drivers tab, tell me what you see. Do you have htop installed?
    • Admin
      Admin about 5 years
      @ heynnema: Under "Additional Drivers": "No additional drivers available". The Updater announced new software this morning (CET); details showed it included a video driver. I updated and rebooted: no difference, still terribly slow. Please tell me what more info I should show (and how). Or should I first get current gnome-shell back (I presume with "sudo apt install gnome-shell")? I do have htop. It sits itself on top.
    • Admin
      Admin about 5 years
      More info: I discovered command lspci -k. Top of its output: ==== 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02) Subsystem: Toshiba America Info Systems Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02) Subsystem: Toshiba America Info Systems HD Graphics 620 Kernel driver in use: i915 Kernel modules: i915 ==== Sorry for bad layout - don't know how to insert such output.
    • Admin
      Admin about 5 years
      @ Organic Marble: downgrading gnome-shell did not help. Can you please post (or mail me? name +ubuntu will serve) your mirror list of the April 25 18.04 update? Then maybe I can find other candidate packages and try removals. Two weeks of no-laptop by now. I saw that 18.04 will be maintained 10 years but mine seems already fatally broken.
  • sureshvv
    sureshvv over 4 years
    Thank you so much. I was contemplating moving out to lubuntu. My system has become useless. How did they allow this release out the gate?
  • Enrique Flores
    Enrique Flores over 2 years
    Thank you. You saved my life :D