View previous topic :: View next topic |
Author |
Message |
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Sat Jul 21, 2018 9:47 pm Post subject: [SOLVED] New System has some Desktop Lag |
|
|
On a new Gentoo system (Intel Core i9) I am having occasional lag/unresponsiveness in my desktop (OpenBox) when moving windows. Also sometimes music that I am playing stutters. This only seems to happen when the system is almost idle. (When all the cores are busy, say emerging a package, I can move windows around without issue and no music stuttering.)
EDIT: I want to emphasize that this issue ONLY occurs when the system has no or low load.
I thought there may be a kernel issue (I copied a kernel configuration from an old Intel Core i7 without this issue). I made the following changes, rebooted and have the same issue:
CONFIG_PREEMPT_NONE=y -> CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_HZ_300=y -> CONFIG_HZ_1000=y
I am using the ONDEMAND freq. governor.
Any suggestions on vanquishing this lag?
Last edited by jagdpanther on Sun Jul 22, 2018 4:04 pm; edited 2 times in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Sat Jul 21, 2018 11:10 pm Post subject: |
|
|
Quote: | You should use pstates driver with this CPU |
Thanks. However, pstste is already enabled:
Code: | # CPU frequency scaling drivers
#
CONFIG_X86_INTEL_PSTATE=y
# CONFIG_X86_PCC_CPUFREQ is not set
CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set |
|
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat Jul 21, 2018 11:51 pm Post subject: |
|
|
Code: | cpupower frequency-info |
There is no governor called ondemand with pstates, although it works the same way. Make sure pstates is actually in use. And with such a new CPU I'd say use the latest kernel, currently 4.17.8. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
axl Veteran
Joined: 11 Oct 2002 Posts: 1144 Location: Romania
|
Posted: Sat Jul 21, 2018 11:56 pm Post subject: Re: New System has some Desktop Lag |
|
|
jagdpanther wrote: | Also sometimes music that I am playing stutters. |
I'm guessing it's hda adaptor and it should have CONFIG_SND_HDA_PREALLOC_SIZE=2048
just a guess. for sound. for i9... don't know. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Jul 22, 2018 12:28 am Post subject: |
|
|
CONFIG_PREEMPT_VOLUNTARY=y is an odd choice for a top-end desktop CPU. Why not full preempt? |
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Sun Jul 22, 2018 1:28 am Post subject: |
|
|
Jaglover:
Quote: | There is no governor called ondemand with pstates, although it works the same way. Make sure pstates is actually in use. And with such a new CPU I'd say use the latest kernel, currently 4.17.8. |
I guess I selected ondemand as the default governor in my kernel configuration. I'll change the default to powersave. That probably won't matter using pstate.
Code: | # cpupower frequency-info
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: 1.20 GHz - 4.40 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 1.20 GHz and 4.40 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 1.20 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes |
Code: | uname -r
4.17.8-gentoo-02 |
The trailing number (-02, here) is how I get more than one kernel of the same version with different configurations.
axl:
Thanks, for the tip. I already have that set:
Code: | CONFIG_SND_HDA_PREALLOC_SIZE=2048 |
Ant P.:
Until today I have used the following without issue. (On i7 systems not a new i9):
Code: | CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set |
I'll give CONFIG_PREEMPT a try when I am done with this post. |
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Sun Jul 22, 2018 2:03 am Post subject: |
|
|
re-configured and compiled kernel, 4.17.8-gentoo ...
Code: | # CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y |
PREEMPT makes no difference. The really strange issue is that when the system is under load there is no desktop lagging or unresponsiveness and audio is perfect. This issue happens when the system is NOT loaded. There does not appear to be any errors in /var/log/messages. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Jul 22, 2018 2:55 am Post subject: |
|
|
That sounds very similar to a bug I've seen in old (~10yr) CPUs I have, but fixing it was just a matter of turning off a BIOS power saving option. Probably wouldn't work here.
The only other thing I can think of is that the kernel picked a bad default timer, try changing the current_clocksource value in /sys/devices/system/clocksource. |
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Sun Jul 22, 2018 3:53 am Post subject: |
|
|
Ant P. :
Thank you.
Quote: | The only other thing I can think of is that the kernel picked a bad default timer, try changing the current_clocksource value in /sys/devices/system/clocksource. |
After reading /usr/src/linux/Documentation/admin-guide/kernel-parameters, https://access.redhat.com/solutions/18627 and https://unix.stackexchange.com/questions/164512/what-does-the-change-of-the-clocksource-influence, I see on my system:
Code: | cd /sys/devices/system/clocksource/clocksource0
$ cat current_clocksource
tsc
$ cat available_clocksource
tsc hpet acpi_pm |
Somewhere in that reading is a comment about acpi... being a last resort so I did the following from the same location:
Code: | # echo "hpet" > current_clocksource
# cat current_clocksource
hpet
|
So far all the lagging and audio stuttering has gone away. (Both when the system is loaded and unloaded.)
What is the "proper" way in Gentoo of making that change permanent? (I could put a one liner in /etc/local.d/.... .start) |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Sun Jul 22, 2018 4:05 pm Post subject: |
|
|
Switching the clocksource from tsc to hpet solved the issue. |
|
Back to top |
|
|
|