Hi, I have a Lenovo Legion Y540-15IRH 81SX 81SX0008MX laptop which I have installed Linux Arch on. The laptop uses the Optimus technology and has a NVIDIA GeForce GTX 1660 Ti Mobile discrete GPU as well as an Intel CoffeeLake-H GT2 [UHD Graphics 630] integrated GPU.
I have an issue where if I run glxgears with prime-run using the command prime-run glxgears
and if I output to my external monitor only, then glxgears will stutter. If I output to only my laptop monitor or to both monitors, then there is no stutter when using prime-run.
I have disabled Vertical Synchronization (VSYNC) for my Intel graphics as described here. Without doing this I experience stutter when running glxgears even without using prime-run, whenever I output to my external monitor only. Without disabling VSYNC I also experience lag when starting Google Chrome and outputting to my external monitor only. Google Chrome does however not have an issue when VSYNC is disabled and starting it with prime-run like glxgears has.
The problem with stuttering only happens when I have set my laptop to use switchable graphics in the UEFI. If I set it to discrete graphics (using the NVIDIA GPU only) then there is no stutter. Likewise I do not get any stutter if I use switchable graphics but configure the proprietary NVIDIA driver to be the primary rendering provider as described here.
I am experiencing the same issues with stuttering with the program projectM.
Here is a table with the tests I have done:
Graphics | Configure NVIDIA driver as primary? | Monitor | Disable VSYNC? | Start with prime-run ? |
glxgears stutters? |
---|---|---|---|---|---|
switchable | no | external | yes | no | no |
switchable | no | external | yes | yes | yes |
switchable | no | external | no | no | yes |
switchable | no | external | no | yes | yes |
switchable | no | both | yes | no | no |
switchable | no | both | yes | yes | no |
switchable | no | both | no | no | no |
switchable | no | both | no | yes | no |
switchable | no | laptop | yes | no | no |
switchable | no | laptop | yes | yes | no |
switchable | no | laptop | no | no | no |
switchable | no | laptop | no | yes | no |
discrete | no | external | yes | no | no |
discrete | no | external | yes | yes | no |
discrete | no | external | no | no | no |
discrete | no | external | no | yes | no |
discrete | no | both | yes | no | no |
discrete | no | both | yes | yes | no |
discrete | no | both | no | no | no |
discrete | no | both | no | yes | no |
discrete | no | laptop | yes | no | no |
discrete | no | laptop | yes | yes | no |
discrete | no | laptop | no | no | no |
discrete | no | laptop | no | yes | no |
switchable | yes | external | yes | no | no |
switchable | yes | external | yes | yes | no |
switchable | yes | external | no | no | no |
switchable | yes | external | no | yes | no |
switchable | yes | both | yes | no | no |
switchable | yes | both | yes | yes | no |
switchable | yes | both | no | no | no |
switchable | yes | both | no | yes | no |
switchable | yes | laptop | yes | no | no |
switchable | yes | laptop | yes | yes | no |
switchable | yes | laptop | no | no | no |
switchable | yes | laptop | no | yes | no |