Announcement

Collapse
No announcement yet.

CPU Frequency 800MHz instead of 3.1GHz with Kernel 5.8

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CPU Frequency 800MHz instead of 3.1GHz with Kernel 5.8

    I have an 8xIntel Core i7-8705G CPU at 3.10GHz.
    For some time now I have had to resort to using the Kernel 5.7 to get my CPU at the correct frequency instead of 800MHz. I have already filed a bug report on the 31 Aug 20 and nothing has been acknowledged.

    The output that I get is:
    Code:
    [FONT=monospace][COLOR=#000000]:~$ cat /proc/cpuinfo | grep "MHz" [/COLOR]
    cpu MHz         : 800.014 
    cpu MHz         : 800.020 
    cpu MHz         : 800.015 
    cpu MHz         : 800.011 
    cpu MHz         : 800.019 
    cpu MHz         : 800.018 
    cpu MHz         : 800.011 
    cpu MHz         : 800.024[/FONT]
    I am not sure if the problem is caused by the "intel_pstate" value in the 5.8 kernel being "passive". I have tried editing the grub menu without success to increase the CPU frequency.

    If the pstate value is the reason, I believe that I need to pass "intel_pstate=active" parameter to the kernel. Does anyone know how to do this?

    Alternately, is there some fix in the system to solve this problem, that I need to wait for?

    #2
    I hope this will help you:
    https://www.reddit.com/r/linux/comme...sive_mode_for/
    Best of luck,

    Comment


      #3
      Originally posted by Radcliff View Post
      I hope this will help you:
      https://www.reddit.com/r/linux/comme...sive_mode_for/
      Best of luck,
      Thanks for your quick response. I did find that site and what is suggests made no difference. The first step suggested in this reference gave:
      Code:
      [FONT=monospace][COLOR=#000000]~$ cpupower frequency-info [/COLOR]
      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:  Cannot determine or is not supported. 
      hardware limits: 800 MHz - 4.10 GHz 
      available cpufreq governors: performance powersave 
      current policy: frequency should be within 800 MHz and 4.10 GHz. 
                     The governor "powersave" may decide which speed to use 
                     within this range. 
      current CPU frequency: Unable to call hardware 
      current CPU frequency: 800 MHz (asserted by call to kernel) 
      boost state support: 
       Supported: yes 
       Active: yes[/FONT]
      The important message that I got out is that [#]current CPU frequency: 800 MHz (asserted by call to kernel)[/#]. It is for that reason I was wanting to know how to change the settings in the kernel.

      Comment


        #4
        Bootline New Argument

        Examples were made from Manjaro Gnome build 20201031.

        You are the only that can tell if tweaking the bootline fix your speed issue. There are 3 methods that we're aware of: 1) from the grub menu, 2) In Grub, 3) in Ubiquity.

        1. Boot in the Grub menu, highlight Kernel 5.8 and click << e >> for editing the boot line. Once there, click enter to stop the 10 second delay. Go at the end of the Linux line, add a space and the new parameter: intel_pstate=active

        CTRL + X to save and exit. See if the bug remains?

        Before
        Code:
        cat /proc/cmdline
        BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=bc69d49d-6cd1-43b2-a573-2830b83bc712 rw quiet apparmor=1 security=apparmor udev.log_priority=3
        After
        Code:
        cat /proc/cmdline
        BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=bc69d49d-6cd1-43b2-a573-2830b83bc712 rw quiet apparmor=1 security=apparmor udev.log_priority=3 intel_pstate=active
        2. Another possibility, directly in Grub: etc/default/grub > Machine is dual boot with Windows

        Before:
        Code:
        #GRUB_DEFAULT=saved
        GRUB_TIMEOUT=10
        GRUB_TIMEOUT_STYLE=hidden
        GRUB_DISTRIBUTOR="Manjaro"
        GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
        GRUB_CMDLINE_LINUX=""
        After:
        Code:
        #GRUB_DEFAULT=saved
        GRUB_TIMEOUT=10
        GRUB_TIMEOUT_STYLE=hidden
        GRUB_DISTRIBUTOR="Manjaro"
        GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
        GRUB_CMDLINE_LINUX="intel_pstate=active"
        Make the change permanent by updating Grub and reboot after:

        Code:
        $ sudo update-grub
        $ reboot
        End Result:
        Code:
        cat /proc/cmdline
        BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=bc69d49d-6cd1-43b2-a573-2830b83bc712 rw[B] intel_pstate=active[/B] quiet apparmor=1 securi ty=apparmor udev.log_priority=3
        3. There is a third method from Windows for the same bootline: Ubiquity HotFix > File Explorer > Kubuntu Flash Drive > Boot > grub > grub.cfg > Open with Notepad or safer Notepad ++ admin > Add the new argument > save and exit > Permanent fix.

        End Result:
        Code:
        #menuentry "Kubuntu" {
        set gfxpayload=keep
        linux /casper/vmlinuz file=/cdrom/preseed/kubuntu.seed maybe-ubiquity intel_pstate=active quiet splash ---
        initrd /casper/initrd
        This is what I get there:
        Code:
        cpupower frequency-info 
        analyzing CPU 0:
        driver: acpi-cpufreq
        CPUs which run at the same hardware frequency: 0
        CPUs which need to have their frequency coordinated by software: 0
        maximum transition latency:  Cannot determine or is not supported.
        hardware limits: 1.60 GHz - 2.20 GHz
        available frequency steps:  2.20 GHz, 1.70 GHz, 1.60 GHz
        available cpufreq governors: performance schedutil
        current policy: frequency should be within 1.60 GHz and 2.20 GHz.
               The governor "schedutil" may decide which speed to use
               within this range.
        current CPU frequency: Unable to call hardware
        current CPU frequency: 1.37 GHz (asserted by call to kernel)
        boost state support:
        Supported: no
        Active: no
        Stay safe,

        Edit:Try "intel_pstate=passive" if result is same in the Grub menu.
        Last edited by Radcliff; Nov 01, 2020, 06:37 PM.

        Comment


          #5
          Have you actually placed your cpu under load to see if it scales up?

          Comment


            #6
            Originally posted by mr_raider View Post
            Have you actually placed your cpu under load to see if it scales up?
            Yes I have and it makes no difference. For example, I just did a Kdenlive render which used 70% of CPU and the CPU's stayed at 800 MHz.

            Comment


              #7
              For AMD:
              /sys/module/acpi_cpufreq/parameters/acpi_pstate_strict >0

              Code:
              grep -H '' /sys/module/acpi_cpufreq/parameters/*
              /sys/module/acpi_cpufreq/parameters/acpi_pstate_strict:0
              It should be on your side:/sys/module/intel_cpufreq/parameters/intel_pstate_strict >1

              Is it set to 1?

              Code:
              grep -H '' /sys/module/intel_cpufreq/parameters/*
              It's getting late here...

              Comment


                #8
                Originally posted by Radcliff View Post
                Examples were made from Manjaro Gnome build 20201031.

                You are the only that can tell if tweaking the bootline fix your speed issue. There are 3 methods that we're aware of: 1) from the grub menu, 2) In Grub, 3) in Ubiquity.

                1. Boot in the Grub menu, highlight Kernel 5.8 and click << e >> for editing the boot line. Once there, click enter to stop the 10 second delay. Go at the end of the Linux line, add a space and the new parameter: intel_pstate=active

                CTRL + X to save and exit. See if the bug remains?

                Before
                Code:
                cat /proc/cmdline
                BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=bc69d49d-6cd1-43b2-a573-2830b83bc712 rw quiet apparmor=1 security=apparmor udev.log_priority=3
                After
                Code:
                cat /proc/cmdline
                BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=bc69d49d-6cd1-43b2-a573-2830b83bc712 rw quiet apparmor=1 security=apparmor udev.log_priority=3 intel_pstate=active
                I have tried all options without success. I did notice that your examples are with the Linux Kernel 5.10. On my system, which is Kubuntu 20.10, all Kernel versions up to 5.7 work perfectly. It is only with the Linux Kernel 5.8 that I have the 800MHx CPU frequency which I cannot change. I even installed the Linux Kernel 5.9 and that did not solve my problem.

                I should point out that I have three operating systems on my 1TB SSD. They are Windows 10, Kubuntu 20.04 and Kubuntu 20.10.

                The command line that I get with Kubuntu 20.10 is a little different to your examples and is:
                Code:
                :~$ cat /proc/cmdline
                BOOT_IMAGE=/boot/vmlinuz-5.8.0-26-generic root=UUID=4dde9252-9d77-4147-aed2-3197c4928ff9 ro intel_pstate=active quiet splash vt.handoff=7
                I haven't yet tried the extra arguments that you have in your command line.

                I could be mistaken, but I still consider the solution is to somehow feed into the startup of the Kernel the parameters to get the correct CPU frequencies.

                Comment


                  #9
                  Originally posted by Radcliff View Post
                  For AMD:
                  /sys/module/acpi_cpufreq/parameters/acpi_pstate_strict >0

                  Code:
                  grep -H '' /sys/module/acpi_cpufreq/parameters/*
                  /sys/module/acpi_cpufreq/parameters/acpi_pstate_strict:0
                  It should be on your side:/sys/module/intel_cpufreq/parameters/intel_pstate_strict >1

                  Is it set to 1?

                  Code:
                  grep -H '' /sys/module/intel_cpufreq/parameters/*
                  It's getting late here...
                  Hope you sleep well. Thanks for all the effort you are putting into solving this problem.

                  I can assure you that acpi_pstate_strict has the value 0. I tried changing it to >0 but was told that it was an invalid parameter. So it stays at 0.

                  Comment


                    #10
                    Good morning,

                    I'm able to set it to 1, but the parameter is reset to zero after restart.

                    Again, this is for Gnome:

                    Code:
                    sudo gedit /sys/module/acpi_cpufreq/parameters/acpi_pstate_strict
                    Code:
                    grep -H '' /sys/module/acpi_cpufreq/parameters/*
                    /sys/module/acpi_cpufreq/parameters/acpi_pstate_strict:1
                    It has no effect on speed here.

                    About tweaking to bootline with active or passive?

                    From memory, you did not have a speed issue at mid way in the Groovy cycle. You were testing 5.8 before it was available. You should try Kernel 5.8-rc1,rc2,rc3, until the bug appears. That way you will find when this issue was introduced into your system.

                    Try rc1 first, remove previous Kernel with Synaptic > Status. I will be switching to Ku later today.
                    https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D

                    Comment


                      #11
                      Deeper testing

                      Tweaking the bootline has no effect on speed. acpi_pstate_strict=active or =1.

                      Code:
                      cat /proc/cmdline
                      BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=bc69d49d-6cd1-43b2-a573-2830b83bc712 rw quiet apparmor=1 security=apparmor udev.log_priority=3 acpi_pstate_strict=active
                      But, changing the value with gedit gives an increase (temporary) of speed, frequencies is in the hardware limits ranging in idle mode (1.6-2.2GHz).

                      Default: acpi_pstate_strict =0 (normal average in idle mode)

                      Code:
                      cat /proc/cpuinfo | grep "MHz" 
                      cpu MHz		: 1368.113
                      cpu MHz		: 1367.991
                      cpu MHz		: 1312.745
                      cpu MHz		: 1367.569
                      cpu MHz		: 1566.450
                      cpu MHz		: 1470.940
                      cpu MHz		: 1590.460
                      cpu MHz		: 1493.719
                      Tweaked: acpi_pstate_strict =1

                      Code:
                      cat /proc/cpuinfo | grep "MHz" 
                      cpu MHz		: 1999.212
                      cpu MHz		: 1763.251
                      cpu MHz		: 1443.257
                      cpu MHz		: 1448.623
                      cpu MHz		: 1367.839
                      cpu MHz		: 1367.579
                      cpu MHz		: 1368.113
                      cpu MHz		: 1445.753
                      Under stress tweaked (1):

                      Code:
                      cat /proc/cpuinfo | grep "MHz" 
                      cpu MHz		: 2393.041
                      cpu MHz		: 2426.869
                      cpu MHz		: 1373.164
                      cpu MHz		: 1400.303
                      cpu MHz		: 1375.847
                      cpu MHz		: 1519.542
                      cpu MHz		: 1318.538
                      cpu MHz		: 1327.894
                      Under stress default (0): (normal average under stress)

                      Code:
                      cat /proc/cpuinfo | grep "MHz" investigation
                      cpu MHz		: 2875.448
                      cpu MHz		: 2871.575
                      cpu MHz		: 1286.327
                      cpu MHz		: 1286.388
                      cpu MHz		: 2790.387
                      cpu MHz		: 2778.901
                      cpu MHz		: 2722.438
                      cpu MHz		: 2729.842
                      Works fine here, I think your bug is not there, the reddit link says that it is before Skylake, you have Coffeelake.

                      Your hardware limits are set to 800 to 4.1GHz, it shouldn't be that low. Bisecting the Kernel is something to try.

                      Comment


                        #12
                        I have now found that I could set the contents of acpi_pstate_strict to 1 but not to >1. I also found that on reboot it was set back to 0.

                        I decided to try changing protection, but that did not stop the contents being changed back to 0. Here is the listing that I used to change protection:
                        Code:
                        :~# /sys/module/acpi_cpufreq/parameters# ls -la
                        total 0
                        drwxr-xr-x 2 root root    0 Nov  3 14:07 .
                        drwxr-xr-x 3 root root    0 Nov  3 14:07 ..
                        -rw-r--r-- 1 root root 4096 Nov  3 14:10 acpi_pstate_strict
                        :~# /sys/module/acpi_cpufreq/parameters# chmod -w acpi_pstate_strict
                        :~# /sys/module/acpi_cpufreq/parameters# ls -la
                        total 0
                        drwxr-xr-x 2 root root    0 Nov  3 14:07 .
                        drwxr-xr-x 3 root root    0 Nov  3 14:07 ..
                        -r--r--r-- 1 root root 4096 Nov  3 14:10 acpi_pstate_strict
                        When I reboot the protection was changed back,ie:
                        Code:
                        [FONT=monospace][COLOR=#000000]:~# /sys/module/acpi_cpufreq/parameters# ls -la [/COLOR]
                        total 0 
                        drwxr-xr-x 2 root root    0 Nov  3 16:02 [COLOR=#5454ff][B].[/B][/COLOR]
                        drwxr-xr-x 3 root root    0 Nov  3 16:02 [COLOR=#5454ff][B]..[/B][/COLOR]
                        -rw-r--r-- 1 root root 4096 Nov  3 16:02 acpi_pstate_strict
                        [/FONT]
                        I am not sure if changing the directory protection would stop this from happening. You may have better ideas on how to do this.

                        The 5.8 kernel versions that I have are 5.8.0-26 and 5.8.0-050800. The latter I just downloaded and installed as it seemed to be the latest available but not distributed by Kubuntu/Ubuntu.

                        So it seems that the one way around this problem if to somehow workout how to supply parameters to the 5.8 kernel when booting. The other option is to retreat defeated and stick with the 5.7 kernel and wait for problems with the 5.8 to be fixed.

                        Comment


                          #13
                          The /sys and /proc filesystems are sort of fake, and don't exist on storage anywhere. They're dynamically generated from data in the OS, when you look at them. When the OS stops they're gone.

                          For personal computers there's not many ways to get info into the kernel before it's got storage up, and this is usually the Linux line in the boot loader. Another way is the "initramfs" but that's a dark art to the likes of me.
                          Regards, John Little

                          Comment


                            #14
                            I was looking for mic and I end up with a page good for you (works root, tested in Arch kde unstable under Kernel 5.10-rc4 second patch).

                            Copy/paste this line first:

                            Code:
                            #  cpupower frequency-info
                            -Setting maximum and minimum frequencies asserted by a call to hardware

                            Maximum Speed for AMD Ryzen 7u (average 1.3-1.8; cpu1 and 2 are at high):

                            Code:
                            # cpupower frequency-set -u 2200MHz
                            cpupower frequency-set -u 2200MHz
                            Setting cpu: 0
                            Setting cpu: 1
                            Setting cpu: 2
                            Setting cpu: 3
                            Setting cpu: 4
                            Setting cpu: 5
                            Setting cpu: 6
                            Setting cpu: 7
                            Minimum speed (asserted by call to hardware):
                            Code:
                            cpupower frequency-set -u 1600MHz
                            ...
                            current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                                           The governor "schedutil" may decide which speed to use
                                           within this range.
                            Under stress when monitoring in real time*, cpus are running at low, average of 1.4. <<2.2 or higher not shown>>.

                            Redo:
                            Code:
                            #  cpupower frequency-info
                            From: Arch:https://wiki.archlinux.org/index.php...quency_scaling

                            You should monitor temperature (max speed under stress):
                            Code:
                            # sensors
                            amdgpu-pci-0300
                            Adapter: PCI adapter
                            vddgfx:           N/A  
                            vddnb:            N/A  
                            edge:         +48.0°C  
                            BAT0-acpi-0
                            Adapter: ACPI interface
                            in0:          12.27 V  
                            thinkpad-isa-0000
                            Adapter: ISA adapter
                            fan1:           0 RPM
                            temp1:        +48.0°C  
                            temp2:         +0.0°C  
                            temp3:         +0.0°C  
                            temp4:         +0.0°C  
                            temp5:         +0.0°C  
                            temp6:         +0.0°C  
                            temp7:         +0.0°C  
                            temp8:         +0.0°C  
                            k10temp-pci-00c3
                            Adapter: PCI adapter
                            Vcore:       763.00 mV 
                            Vsoc:          1.09 V  
                            Tctl:         +48.8°C  
                            Tdie:         +48.8°C  
                            Icore:        22.00 A  
                            Isoc:         12.00 A  
                            
                            [B]Later:[/B]
                            
                            amdgpu-pci-0300
                            Adapter: PCI adapter
                            vddgfx:           N/A  
                            vddnb:            N/A  
                            edge:         +50.0°C  
                            
                            BAT0-acpi-0
                            Adapter: ACPI interface
                            in0:          12.26 V  
                            amdgpu-pci-0300
                            Adapter: PCI adapter
                            vddgfx:           N/A  
                            vddnb:            N/A  
                            edge:         +48.0°C  
                            BAT0-acpi-0
                            Adapter: ACPI interface
                            in0:          12.27 V  
                            thinkpad-isa-0000
                            Adapter: ISA adapter
                            fan1:           0 RPM
                            temp1:        +48.0°C  
                            temp2:         +0.0°C  
                            temp3:         +0.0°C  
                            temp4:         +0.0°C  
                            temp5:         +0.0°C  
                            temp6:         +0.0°C  
                            temp7:         +0.0°C  
                            temp8:         +0.0°C  
                            thinkpad-isa-0000
                            Adapter: ISA adapter
                            fan1:        10496 RPM
                            temp1:        +50.0°C  
                            temp2:         +0.0°C  
                            temp3:         +0.0°C  
                            temp4:         +0.0°C  
                            temp5:         +0.0°C  
                            temp6:         +0.0°C  
                            temp7:         +0.0°C  
                            temp8:         +0.0°C  
                            
                            k10temp-pci-00c3
                            Adapter: PCI adapter
                            Vcore:       944.00 mV 
                            Vsoc:          1.09 V  
                            Tctl:         +50.1°C  
                            Tdie:         +50.1°C  
                            Icore:        48.00 A  
                            Isoc:         14.75 A
                            *Try this one to monitor cpu in real time:

                            Code:
                            watch grep \"cpu MHz\" /proc/cpuinfo
                            I hope this will help, good reading.
                            Last edited by Radcliff; Nov 20, 2020, 09:16 PM.

                            Comment


                              #15
                              Thanks for your very comprehensive reply, unfortunately when I enter:
                              Code:
                              [FONT=monospace][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ cpupower frequency-info                [/COLOR]
                              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:  Cannot determine or is not supported. 
                              hardware limits: 800 MHz - 4.10 GHz 
                              available cpufreq governors: performance powersave 
                              current policy: frequency should be within 800 MHz and 4.10 GHz. 
                                        The governor "powersave" may decide which speed to use 
                                        within this range. 
                              current CPU frequency: Unable to call hardware 
                              current CPU frequency: 800 MHz (asserted by call to kernel) 
                              boost state support: 
                              Supported: yes 
                              Active: yes[/FONT]
                              As you can see, the 800MHz limit is still there. When I enter
                              Code:
                              [FONT=monospace][COLOR=#000000]sudo cpupower frequency-set -u 4100MHz[/COLOR][/FONT]
                              and then
                              Code:
                              [FONT=monospace][COLOR=#000000]cat /proc/cpuinfo | grep "MHz"[/COLOR][/FONT]
                              the frequency is still 800MHz on all 8 cpu's.

                              One interesting thing that I found was that when I entered the recovery mode and selected the root option, I entered the same commands and this time all the 8 cpu's showed 4100MHz. However when I resumed from this mode the cpu frequency was back to 800MHz.

                              Edit:
                              I decided to try again and this time I took an image with my camera. I did not try to change the cpu frequency and the attached image is what I got from the recovery mode root terminal:

                              Click image for larger version

Name:	CPU_Recovery.jpg
Views:	1
Size:	108.3 KB
ID:	644938

                              So in the recovery mode, the kernel should have been loaded and it therefore looks like there is something amiss in the KDE startup. I created a KDE startup shell file that contained cpupower frequency-set -u 4100MHz. That did not change the result of 800MHz.

                              I am not sure what to do to resolve this problem. I am willing to try other options that come my way.
                              Last edited by NoWorries; Nov 22, 2020, 03:16 AM.

                              Comment

                              Working...
                              X