5

So I finally got to installing ubuntu on my PC at home.

Installation went fine, smooth and all. When I finally rebooted into the OS everything was terribly slow. I started by installing the latest NVidia drivers and using the processor microcode firmware setting. Rebooted again but that didn't do anything either. Opening the file manager for example takes about 3-4 seconds. Is there a driver I am still missing? Could it have to do something with it being a M2 SSD?

Performance on Windows is unfortunately fine.

Using Ubuntu 15.10

PC information:

  • I7-5820k
  • GTX980TI
  • 16GB DDR4 Ram
  • 512GB Samsung 950 Evo

Output of inxi-G:

Graphics:  Card: NVIDIA GM200 [GeForce GTX 980 Ti]
       Display Server: X.Org 1.17.2 drivers: nvidia (unloaded: fbdev,vesa,nouveau)
       Resolution: 1680x1050@59.95hz, 1920x1080@60.00hz
       GLX Renderer: GeForce GTX 980 Ti/PCIe/SSE2
       GLX Version: 4.5.0 NVIDIA 352.63

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave

$ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
437636

The output of cpupower frequency-info. I've changed the governor to perfomance now :).

    analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 1.20 GHz - 3.80 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 1.20 GHz and 3.80 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 434 MHz.
  boost state support:
    Supported: yes
    Active: yes
Joost
  • 51
  • You are using the 64bit version, right? Also, please [edit] your question and post the output of inxi -G. You might have to install inxi first: sudo apt-get install inxi. Also show us the output of cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor and sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq. – terdon Nov 24 '15 at 10:33
  • Thanks, i've added the information. Anything out of the ordinary? – Joost Nov 24 '15 at 17:18
  • Wow that's a really low frequency! – Charles Green Nov 24 '15 at 17:19
  • Can you add the output of cpupower frequency-info – Charles Green Nov 24 '15 at 17:20
  • @Joost yup, you're throttling the CPU. Change the governor and you should be fine. – terdon Nov 24 '15 at 17:26
  • @CharlesGreen , thanks for the information. I've added the output of the command in the original post and changed the governor to performance. Hoping it would help a bit. The output of the cpuinfo_cur_freq still seems pretty low. 448593 right now. – Joost Nov 24 '15 at 17:59
  • K - I had added a link in@terdon's answer which may be applicable to you - for some reason beyond my knowing, your SPU is running below 'minimum' frequency. This Question seems to refer to this, and I believe that ensuring you have recent microcode installed helps the issue, but I'm feeling a little out of my comfort zone on that! – Charles Green Nov 24 '15 at 18:05
  • I am, and have been for months, looking for examples of throttling down, as this appears to be. What brand is your computer? Dell? Does this occur always or only after suspend or only on battery? Do you have thermal issues? Could you do these tests and report back? If you just want to get things working and move on, then, and as someone else mentioned, I would just disable the intel_pstate driver so that you will use the acpi-cpufreq dirver instead. – Doug Smythies Nov 24 '15 at 18:27
  • @CharlesGreen I've disabled the microcode firmware for intel cpu's and now my current CPU frequency is 2.66 GHz and the cpuinfo_cur_freq is now 1707105. Alot higher than it was but still not was I was hoping for. The system is at least a bit smoother. – Joost Nov 24 '15 at 18:41
  • @DougSmythies I will try that out. I will also test the intel_pstate=disable. No branded PC, build it myself. – Joost Nov 24 '15 at 18:42
  • Could it be a temperature issue? Is the fan working? Can you hear it? Also, could you update the question with the current output of cpupower frequency-info? You mention 2.66GHz in the comments but not in the question. – terdon Nov 24 '15 at 19:03

2 Answers2

6

An alternate answer which may be more appropriate for new installations of Ubuntu is to use the cpupower commands which control the intel_pstate governor system.

The command cpupower frequency-info will indicate on the first line, if intel_pstate is the diver being used, and in the current_policy seciton will indicate either 'powersave' or 'performance'

To change the policy issue the command

sudo cpupower frequency-set -g performance

This does not persist over reboot (for my laptop) but could be placed into /etc/rc.local or a similar initialization method.

On a side note: I also used the ondemand governor in prior releases of Ubuntu: if desired, intel_pstate can be disabled by use of the kernel variable "intel_pstate=disable"

Charles Green
  • 21,339
  • Thanks for posting this. I hadn't realized it didn't persist across reboots though. If it doesn't, why not use the manual approach I describe in my answer? – terdon Nov 24 '15 at 18:06
  • I liked the ACPI power manager better in several ways, but have found on my laptop that the pstate drivers do work pretty well. To use the older drivers, you would have to add the kernel variable, as described above, and then you could use the ondemand policy that you (and I) favored. – Charles Green Nov 25 '15 at 01:40
3

Your CPU speed is very, very slow. On my system, with a Core2 Quad which is more than 6 years old, I get:

$ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
2394000

Yours is a far faster processor and yet is running orders of magnitude slower. The problem seems to be your CPU governor. This controls how the CPU behaves. Your options are:

  • Performance keeps the CPU at the highest possible frequency
  • Powersave keeps the CPU at the lowest possible frequency
  • Userspace exports the available frequency information to the user level (through the /sys file system) and permits user-space control of the CPU frequency
  • Ondemand scales the CPU frequencies according to the CPU usage (like does the userspace frequency scaling daemons, but in kernel)
  • Conservative acts like the ondemand but increases frequency step by step

You have it set to powersave so it's throttling the CPU in an effort to consume as little power as possible. Setting it to pretty much anything else will improve your performance. I recommend you use ondemand which gives the most flexible option, high speed when needed and low when not so as to not waste energy.

Run this command to change the governor to ondemand:

echo "ondemand" | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

NOTE @CharlesGreen points out in the comments that you might only have powersave and performance available. He also provided a link to a similar question, so if this approach doesn't work, I suggest you read the solution offered there.

terdon
  • 100,812
  • 1
    If the user is running 15.10, would they not be running intel_pstate, which has only 'powersave' and 'performace' for governors? – Charles Green Nov 24 '15 at 17:32
  • @CharlesGreen I have absolutely no idea. I've never heard of either. Still, the system gives an error if you try to add a non-valid value to the governor file, so let's see what the OP gets. Either way, powersave is likely the problem here. – terdon Nov 24 '15 at 17:35
  • I believe that you are correct. This question talks about some earlier problems with 15.04 and intel_pstate, but I do not think the solution is applicable any longer. – Charles Green Nov 24 '15 at 17:36
  • 1
    @CharlesGreen thanks, I added your warning and a link to the other question. – terdon Nov 24 '15 at 17:44
  • As a 'just change the governor' approach, the appropriate command for the intel_pstate is sudo cpupower frequency-set -g performance – Charles Green Nov 24 '15 at 17:47
  • @CharlesGreen this is rapidly leaving my comfort zone. I don't really know much about all this, Only that I have been happily changing the governor using the simplistic approach described above for years. I don't have very new hardware at the moment though so I may well be out of date. Could you whip up an answer using your approach? – terdon Nov 24 '15 at 17:49
  • Surely - one moment.... – Charles Green Nov 24 '15 at 17:50