Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[S] CPU frequency goes under min frequency
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 203
Location: Lake Macha, Czech republic

PostPosted: Thu Oct 25, 2018 9:44 am    Post subject: [S] CPU frequency goes under min frequency Reply with quote

Hi,

I did fresh install on Dell XPS 9550. As I wanted to save some baterry I followed Power Management guide from Gentoo/Arch, actually I installed following tools as auto started daemons:
    laptop_mode
    thermald


But thing is that my CPU frequency started dropping under the min limit :-) as bellow (I have seen <400Mhz.. lol):
Code:
zangetsu@venus ~/proj/uae-graphaware/repos/tmp/jukebox $ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               94
Model name:          Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Stepping:            3
CPU MHz:             682.789
CPU max MHz:         3500.0000
CPU min MHz:         800.0000


I stopped both daemons and installed cpupower and set to performance (in kernel I have also config perfromance as default). Is there anything else what could cause dropping the frequency so low (I sow < 400 lol). Thing is this is development machine and all things gets very slow.

My current service set is:
Code:
zangetsu@venus ~/proj/uae-graphaware/repos/tmp/jukebox $ sudo rc-update
       NetworkManager |      default                           
                acpid |      default                           
            alsasound | boot                                   
               binfmt | boot                                   
             bootmisc | boot                                   
            bumblebee |      default                           
              cgroups |                                 sysinit
           consolekit | boot default                           
                 dbus |      default                           
                devfs |                                 sysinit
                dmesg |                                 sysinit
                 fsck | boot                                   
             hostname | boot                                   
              hwclock | boot                                   
              keymaps | boot                                   
            killprocs |                        shutdown       
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork                 
           localmount | boot                                   
             loopback | boot                                   
                  lvm |      default                           
              modules | boot                                   
             mount-ro |                        shutdown       
                 mtab | boot                                   
             netmount |      default                           
           ntp-client |      default                           
               procfs | boot                                   
                 root | boot                                   
            savecache |                        shutdown       
                 sshd |      default                           
                 swap | boot                                   
               sysctl | boot                                   
                sysfs |                                 sysinit
            syslog-ng |      default                           
         termencoding | boot                                   
             thermald |      default                           
                 udev |                                 sysinit
         udev-trigger |                                 sysinit
              urandom | boot                                   
                  xdm |      default                           


Kernel:
Code:
4.14.65-gentoo


Modules loaded:
Code:
zangetsu@venus ~/proj/uae-graphaware/repos/tmp/jukebox $ sudo lsmod
Module                  Size  Used by
msr                    16384  0
dell_wmi               16384  0
dell_smbios            16384  1 dell_wmi
wmi_bmof               16384  0
sparse_keymap          16384  1 dell_wmi
i915                 1261568  19
mxm_wmi                16384  0
dcdbas                 16384  1 dell_smbios
brcmfmac              167936  0
brcmutil               16384  1 brcmfmac
joydev                 24576  0
input_leds             16384  0
serio_raw              16384  0
pcspkr                 16384  0
i2c_i801               24576  0
dell_smo8800           16384  0
wmi                    24576  3 dell_wmi,wmi_bmof,mxm_wmi
cramfs                 49152  0
raid10                 45056  0
raid456               110592  0
async_raid6_recov      16384  1 raid456
async_memcpy           16384  1 raid456
async_pq               16384  1 raid456
async_xor              16384  2 async_pq,raid456
xor                    24576  1 async_xor
async_tx               16384  5 async_pq,async_memcpy,async_xor,raid456,async_raid6_recov
raid6_pq              114688  3 async_pq,raid456,async_raid6_recov
raid1                  36864  0
raid0                  16384  0
dm_verity              20480  0
dm_snapshot            40960  0
dm_mirror              20480  0
dm_region_hash         16384  1 dm_mirror
dm_log                 16384  2 dm_region_hash,dm_mirror
dm_bufio               28672  2 dm_verity,dm_snapshot
hid_sunplus            16384  0
hid_sony               28672  0
hid_samsung            16384  0
hid_pl                 16384  0
hid_petalynx           16384  0
hid_monterey           16384  0
hid_microsoft          16384  0
hid_gyration           16384  0
hid_ezkey              16384  0
hid_cypress            16384  0
hid_chicony            16384  0
hid_cherry             16384  0
hid_belkin             16384  0
hid_apple              16384  0
hid_a4tech             16384  0
scsi_transport_fc      57344  0
virtio_crypto          20480  0
crypto_engine          16384  1 virtio_crypto
virtio_rng             16384  0
virtio_console         28672  0


Additionally I list builtin drivers which are loaded:
Code:
zangetsu@venus ~/proj/uae-graphaware/repos/tmp/jukebox $ cat /lib/modules/$(uname -r)/modules.builtin|grep driver
kernel/drivers/acpi/ac.ko
kernel/drivers/acpi/button.ko
kernel/drivers/acpi/fan.ko
kernel/drivers/acpi/video.ko
kernel/drivers/acpi/processor.ko
kernel/drivers/acpi/thermal.ko
kernel/drivers/acpi/battery.ko
kernel/drivers/acpi/sbshc.ko
kernel/drivers/acpi/sbs.ko
kernel/drivers/acpi/ec_sys.ko
kernel/drivers/acpi/acpi_configfs.ko
kernel/drivers/acpi/nfit/nfit.ko
kernel/drivers/ata/libata.ko
kernel/drivers/ata/ahci.ko
kernel/drivers/ata/libahci.ko
kernel/drivers/ata/ahci_platform.ko
kernel/drivers/ata/libahci_platform.ko
kernel/drivers/base/firmware_class.ko
kernel/drivers/base/regmap/regmap-i2c.ko
kernel/drivers/bcma/bcma.ko
kernel/drivers/block/brd.ko
kernel/drivers/block/loop.ko
kernel/drivers/block/nbd.ko
kernel/drivers/block/virtio_blk.ko
kernel/drivers/char/agp/agpgart.ko
kernel/drivers/char/agp/amd64-agp.ko
kernel/drivers/char/agp/intel-agp.ko
kernel/drivers/char/agp/intel-gtt.ko
kernel/drivers/char/hw_random/rng-core.ko
kernel/drivers/char/hw_random/intel-rng.ko
kernel/drivers/char/hw_random/amd-rng.ko
kernel/drivers/char/hw_random/via-rng.ko
kernel/drivers/connector/cn.ko
kernel/drivers/cpufreq/cpufreq_performance.ko
kernel/drivers/cpufreq/cpufreq_powersave.ko
kernel/drivers/cpufreq/cpufreq_userspace.ko
kernel/drivers/cpufreq/cpufreq_ondemand.ko
kernel/drivers/cpufreq/cpufreq_conservative.ko
kernel/drivers/cpufreq/acpi-cpufreq.ko
kernel/drivers/cpufreq/pcc-cpufreq.ko
kernel/drivers/dax/dax.ko
kernel/drivers/dma/dw/dw_dmac_core.ko
kernel/drivers/edac/edac_core.ko
kernel/drivers/extcon/extcon-core.ko
kernel/drivers/firmware/efi/efivars.ko
kernel/drivers/gpu/drm/drm_kms_helper.ko
kernel/drivers/gpu/drm/drm.ko
kernel/drivers/hid/hid.ko
kernel/drivers/hid/uhid.ko
kernel/drivers/hid/hid-generic.ko
kernel/drivers/hid/hid-lenovo.ko
kernel/drivers/hid/hid-logitech.ko
kernel/drivers/hid/hid-logitech-dj.ko
kernel/drivers/hid/hid-logitech-hidpp.ko
kernel/drivers/hid/hid-magicmouse.ko
kernel/drivers/hid/hid-multitouch.ko
kernel/drivers/hid/hid-saitek.ko
kernel/drivers/hid/i2c-hid/i2c-hid.ko
kernel/drivers/hid/usbhid/usbhid.ko
kernel/drivers/hwmon/hwmon.ko
kernel/drivers/hwmon/acpi_power_meter.ko
kernel/drivers/hwmon/coretemp.ko
kernel/drivers/hwmon/dell-smm-hwmon.ko
kernel/drivers/i2c/i2c-core.ko
kernel/drivers/i2c/algos/i2c-algo-bit.ko
kernel/drivers/input/input-core.ko
kernel/drivers/input/ff-memless.ko
kernel/drivers/input/mousedev.ko
kernel/drivers/input/evdev.ko
kernel/drivers/input/keyboard/atkbd.ko
kernel/drivers/input/mouse/appletouch.ko
kernel/drivers/input/mouse/bcm5974.ko
kernel/drivers/input/mouse/psmouse.ko
kernel/drivers/input/mouse/synaptics_i2c.ko
kernel/drivers/input/mouse/synaptics_usb.ko
kernel/drivers/input/touchscreen/of_touchscreen.ko
kernel/drivers/input/serio/serio.ko
kernel/drivers/input/serio/i8042.ko
kernel/drivers/input/serio/libps2.ko
kernel/drivers/leds/led-class.ko
kernel/drivers/md/md-mod.ko
kernel/drivers/md/dm-mod.ko
kernel/drivers/md/dm-crypt.ko
kernel/drivers/md/bcache/bcache.ko
kernel/drivers/memstick/core/memstick.ko
kernel/drivers/mfd/mfd-core.ko
kernel/drivers/mfd/lpc_sch.ko
kernel/drivers/misc/tifm_core.ko
kernel/drivers/misc/tifm_7xx1.ko
kernel/drivers/misc/cb710/cb710.ko
kernel/drivers/misc/mic/bus/mic_bus.ko
kernel/drivers/mmc/core/mmc_core.ko
kernel/drivers/net/macvlan.ko
kernel/drivers/net/mii.ko
kernel/drivers/net/netconsole.ko
kernel/drivers/net/tun.ko
kernel/drivers/net/veth.ko
kernel/drivers/net/virtio_net.ko
kernel/drivers/net/usb/r8152.ko
kernel/drivers/net/usb/usbnet.ko
kernel/drivers/nvdimm/libnvdimm.ko
kernel/drivers/nvdimm/nd_pmem.ko
kernel/drivers/nvdimm/nd_btt.ko
kernel/drivers/nvdimm/nd_blk.ko
kernel/drivers/nvme/host/nvme-core.ko
kernel/drivers/nvme/host/nvme.ko
kernel/drivers/nvmem/nvmem_core.ko
kernel/drivers/pps/pps_core.ko
kernel/drivers/rtc/rtc-cmos.ko
kernel/drivers/scsi/scsi_mod.ko
kernel/drivers/scsi/raid_class.ko
kernel/drivers/scsi/scsi_transport_sas.ko
kernel/drivers/scsi/sd_mod.ko
kernel/drivers/scsi/sg.ko
kernel/drivers/thermal/thermal_sys.ko
kernel/drivers/thermal/intel_powerclamp.ko
kernel/drivers/thermal/x86_pkg_temp_thermal.ko
kernel/drivers/tty/serial/serial_core.ko
kernel/drivers/tty/serial/8250/8250.ko
kernel/drivers/tty/serial/8250/8250_base.ko
kernel/drivers/tty/serial/8250/8250_pci.ko
kernel/drivers/tty/serial/8250/8250_exar.ko
kernel/drivers/tty/serial/8250/8250_lpss.ko
kernel/drivers/usb/class/cdc-acm.ko
kernel/drivers/usb/class/cdc-wdm.ko
kernel/drivers/usb/common/usb-common.ko
kernel/drivers/usb/common/usb-otg-fsm.ko
kernel/drivers/usb/core/usbcore.ko
kernel/drivers/usb/dwc2/dwc2.ko
kernel/drivers/usb/dwc2/dwc2_pci.ko
kernel/drivers/usb/host/ehci-hcd.ko
kernel/drivers/usb/host/ehci-pci.ko
kernel/drivers/usb/host/ehci-platform.ko
kernel/drivers/usb/host/ohci-hcd.ko
kernel/drivers/usb/host/ohci-pci.ko
kernel/drivers/usb/host/uhci-hcd.ko
kernel/drivers/usb/host/xhci-hcd.ko
kernel/drivers/usb/host/xhci-pci.ko
kernel/drivers/usb/host/xhci-plat-hcd.ko
kernel/drivers/usb/mon/usbmon.ko
kernel/drivers/usb/phy/phy-generic.ko
kernel/drivers/usb/storage/usb-storage.ko
kernel/drivers/video/backlight/backlight.ko
kernel/drivers/video/fbdev/core/fb.ko
kernel/drivers/video/fbdev/core/cfbfillrect.ko
kernel/drivers/video/fbdev/core/cfbcopyarea.ko
kernel/drivers/video/fbdev/core/cfbimgblt.ko
kernel/drivers/video/fbdev/core/sysfillrect.ko
kernel/drivers/video/fbdev/core/syscopyarea.ko
kernel/drivers/video/fbdev/core/sysimgblt.ko
kernel/drivers/video/fbdev/core/fb_sys_fops.ko
kernel/drivers/virtio/virtio.ko
kernel/drivers/virtio/virtio_ring.ko
kernel/drivers/virtio/virtio_mmio.ko
kernel/drivers/virtio/virtio_pci.ko
kernel/drivers/virtio/virtio_balloon.ko
kernel/drivers/virtio/virtio_input.ko

Thx for any hints.
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force


Last edited by archenroot on Sun Oct 28, 2018 5:27 am; edited 2 times in total
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2288
Location: near Augsburg, Germany

PostPosted: Fri Oct 26, 2018 6:26 am    Post subject: Reply with quote

Can you check the settings in the Bios ?
Back to top
View user's profile Send private message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 203
Location: Lake Macha, Czech republic

PostPosted: Sun Oct 28, 2018 5:17 am    Post subject: Reply with quote

I went to BIOS where all is as per my understanding set to max performance, but 2 things were configured as enabled:
    Intel SpeedStep
    C-States Control


I think these both can have effect on perfromance. I did my first change on kernel level in grub2 config:
Code:
zangetsu@venus ~ $ cat /etc/default/grub |grep LINUX_DEFAULT
GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=0 processor.max_cstate=1"


After regenerating grub config and reboot I still see dynamic changes to frequency, but it never goes under 1,5GHz, which is just fine for me.

So I consider this as solved. The real issue was when I started my IDE which loaded quite big amount of files or I started compilation of project and CPU still running at 300-400MHz and didn't auto scale frequency up. This whole behaviour affected the KDE plasma usage as I clicked on some application and had to wait for few seconds :-), now desktop behaviour is back in reactive state.
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13982

PostPosted: Sun Oct 28, 2018 3:53 pm    Post subject: Reply with quote

Restricting cstate usage like that will prevent the system from saving power as effectively.
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 517

PostPosted: Sun Oct 28, 2018 6:36 pm    Post subject: Reply with quote

lscpu or /proc/cpuinfo is wildly inaccurate. I think in recent kernels it even shows some cores clocking at 0 if they're stopped (in C6 sleep or deeper)

Better use i7z or turbostat to watch clock speeds.
Back to top
View user's profile Send private message
kajzer
Guru
Guru


Joined: 27 Nov 2014
Posts: 439

PostPosted: Sun Oct 28, 2018 7:48 pm    Post subject: Reply with quote

Inaccurate indeed.

I found that this gives me best results
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq


Number should be divided by 1000000 to get GHz, and formatted to %.1f to get something like 2.4
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum