bayasdev / envycontrol

Easy GPU switching for Nvidia Optimus laptops under Linux
MIT License
1.29k stars 61 forks source link

[BUG] option --force-comp does not work #179

Closed g1fts closed 2 months ago

g1fts commented 2 months ago

设置--force-comp在外接屏幕上仍然卡顿,在 nvidia-setting 上看ForceCompositionPipeLine根本没打开。 我去查看了 /etc/X11/xorg.d/10-nvidia.conf发现Option "ForceCompsitionPipeLine" "true"应该是没起作用,因为在 nvidia-setting 中开启此选项生成的xorg.conf对应的是Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}", 于是我修改了10-nvidia.conf增加了Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}",重启之后打开 nvidia-setting 看到选项打开了。除了进入桌面周会出现短暂的卡顿,其他时间很流畅。

注意:我所指的卡顿是任何应用程序窗口在放大缩小的动画卡顿

translator: The--force-compoption still causes screen tearing on external monitors, and in nvidia-settings the ForceCompositionPipeLine is not activated at all. I checked/etc/X11/xorg.conf.d/10-nvidia.confand found that theOption "ForceCompositionPipeLine" "true"does not seem to work because when this option is enabled in nvidia-settings, the generatedxorg.confcorresponds ForOption "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}". So I modified10-nvidia.confby adding theOption "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}" and after rebooting I opened nvidia-settings and saw that option enabled. There's brief tearing once the desktop loads, but it smoothes out after that.

NOTE: The tearing I'm referring to is stuttering in the animation of any application window when it is zoomed in or out.

bayasdev commented 2 months ago

Hi @g1fts, the EnvyControl generated Xorg config works in a different fashion to the checkbox in the Nvidia control panel. The latter actually runs a command which is dependent on your current screen arrangement, I preferred to use the first approach as laptops are commonly used in the go so I wanted to be able to plug and unplug monitors as needed.

By the way which system are you running on? is it a GSync enabled monitor?

g1fts commented 2 months ago

After using it for a while, the external screen still seems to be tearing, and it is more stuck than when it is not set. It is better not to set that option.

By the way which system are you running on? is it a GSync enabled monitor?

@bayasdev Arch + KDE,the external monitor does not support GSync