Ubuntu 18.04 Steam 游戏帧率下降

Raj*_*ita 6 steam graphics nvidia-geforce

我有一台非常现代的笔记本电脑,HP OMEN 配备 GTX1070 8GB 显卡和 Corei77700HQ。来自图形驱动程序 ppa 的最新驱动程序。所有游戏开始都很好,玩几分钟后帧下降到 15 fps。一段时间后又恢复到超过 75 的完整 fps。然后这个循环继续,我不能玩。这是 18.04 系列和基于 18.04 的任何发行版的一致行为。我有一个支持 GSYNC 的笔记本电脑屏幕,它只有 1080p。除了 Ubuntu base,我在任何其他发行版上都没有看到这个问题。我听到有人说它可能是 Nvidia,如果它是 nvidia,那么它也应该发生在 16.04 上,但事实并非如此。

有人可以帮我吗?


75FPS:-

affected_cpus                             0
cpuinfo_max_freq                          3800000
cpuinfo_min_freq                          800000
cpuinfo_transition_latency                0
energy_performance_available_preferences  default performance balance_performance balance_power power 
energy_performance_preference             balance_performance
related_cpus                              0
scaling_available_governors               performance powersave
scaling_cur_freq                          899381
scaling_driver                            intel_pstate
scaling_governor                          powersave
scaling_max_freq                          3800000
scaling_min_freq                          800000
scaling_setspeed                          <unsupported>
Run Code Online (Sandbox Code Playgroud)

15FPS:-

affected_cpus                             0
cpuinfo_max_freq                          3800000
cpuinfo_min_freq                          800000
cpuinfo_transition_latency                0
energy_performance_available_preferences  default performance balance_performance balance_power power 
energy_performance_preference             balance_performance
related_cpus                              0
scaling_available_governors               performance powersave
scaling_cur_freq                          800030
scaling_driver                            intel_pstate
scaling_governor                          powersave
scaling_max_freq                          2800000
scaling_min_freq                          800000
scaling_setspeed                          <unsupported>
Run Code Online (Sandbox Code Playgroud)

再次。

75 帧/秒


affected_cpus                             0
cpuinfo_max_freq                          3800000
cpuinfo_min_freq                          800000
cpuinfo_transition_latency                0
energy_performance_available_preferences  default performance balance_performance balance_power power 
energy_performance_preference             balance_performance
related_cpus                              0
scaling_available_governors               performance powersave
scaling_cur_freq                          900004
scaling_driver                            intel_pstate
scaling_governor                          powersave
scaling_max_freq                          3800000
scaling_min_freq                          800000
scaling_setspeed                          <unsupported>
Run Code Online (Sandbox Code Playgroud)

Raj*_*ita 5

在所有这些故障排除之后,我得出结论,正如艾伦和马丁在 Ubuntu Podcast Season 11 Episode 26 中所建议的那样,它确实过热。在 Ubuntu 18.04 中,默认情况下启用了 heatd 守护程序以维持 CPU 温度。由于危险阈值相当高,这一般不会产生影响。然而,在我的特殊情况下,它根据 CPU 温度将 CPU 节流到最低频率,这是预期的。我认为这是 Thermald 的错误。从那以后,我在同一硬件上的其他发行版中尝试了 heatd,但无法重现该错误。所以我决定再次回到 Ubuntu,这一次禁用了 Thermald。现在已修复。非常感谢 ask Ubuntu 社区的支持,并特别感谢 Alan Pope 和 Martin Wimpress。

解决方案:-

sudo systemctl disable thermald && sudo reboot.
Run Code Online (Sandbox Code Playgroud)

PS 注意,禁用 heatd 将取消选中温度,请谨慎使用。最后想到我们想要的是炒某人的硬件。Thermald 的存在是有原因的。除非您受到此问题的影响,否则我不推荐此解决方案。

自从 Ubuntu Podcast Season11 第 28 集 Alan 和 Martin 再次阅读我的回答并建议我针对heatd提交错误报告以来,我一直在更详细地调查 CPU 节流的原因。即使在禁用了 heatd之后,我也偶尔会看到节流。感谢 gnome shell 扩展cpufreq,我能够看到irqbalance正在限制我的 CPU 并导致帧速率下降。

为了证明这一点,我启用了 heatd并删除了irqbalance包。现在,我获得了更高的 FPS,而且完全没有节流。

我一直在看包irqbalance

irqbalance 的有用资源:- http://konkor.github.io/cpufreq/faq/

它指出 :-

irqbalance 不是 Linux 内核的一部分

它专为具有许多 RAID/HDD/SDD 控制器的特殊服务器配置而设计。

任何用户空间应用程序(如游戏、编译……)都无法在任何线程上获得 100% 的 CPU 资源,因为它总是与 IO 任务共享这些资源。

我想我现在可以考虑解决这个问题

sudo apt remove irqbalance    
Run Code Online (Sandbox Code Playgroud)

这才是真正的解决方案!