If second screen is set to only screen then high latency in manjaro

Hello folks,

As I installed manjaro on my laptop, it detected the second screen connected via hdmi.
I used the proprietary drivers so excellent display, no screen tearing, games are running perfectly.
If I switch from two-screen to only the integrated one: no problem.
However if I switch from two-screen to only the external one: huge latency.
The cursor will move normally, as if I were controlling a remote computer with low bandwith : the cursor moves as it should, but any action takes 3-5 seconds to be accomplished.
As soon as I switch back to dual-screen : no problem.

I know some tweaks regarding optimus or bumblebee can be done but I’d rather stick to the official packages : being on gnome, optimus requires to disable wayland and install an outdated gdm-modified package, which is not ideal. And as to bumblebee it doesn’t seem up to date either ( outdated instructions from official wiki cf " Configure NVIDIA (non-free) settings and load them on Startup" page, “#Bumblebee_and_Steam” anchor, sorry I can’t include links in this post ).

Here is what a inxi -G gives :

Graphics:  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] driver: i915 v: kernel
           Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] driver: nvidia v: 470.63.01
           Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
           Display: x11 server: X.org 1.20.13 driver: loaded: modesetting,nvidia resolution: <missing: xdpyinfo>
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.3

Thanks for your help !

No idea anyone ?

This happens when you are in hybrid mode (the default Manjaro NVIDIA installation),thats a bug that NVIDIA has not fixed yet,so the only workaround for this is to switch to NVIDIA mode with optimus-manager

Install optimus-manager from the official repositories

pamac install optimus-manager

Since you are using GNOME,you need to follow 2 additional steps

  • The default gdm package from the Archlinux and Manjaro repositories is not compatible with optimus-manager, so you must replace it with this patched version : gdm-prime (also replaces libgdm). The patch was written by Canonical for Ubuntu and simply adds two script entry points specifically for Prime switching. The package is otherwise identical to the official one.
  • Gnome launches Wayland sessions by default, which are incompatible with optimus-manager. To force Xorg sessions, You need to edit the file /etc/gdm/custom.conf and remove the # before the line #WaylandEnable=false.

When finished,reboot the computer,now you can switch between integrated (use intel card only),hybrid (intel + nvidia) (the one you are currently using) and nvidia mode (the one you want for external monitor)

optimus-manager --switch integrated
optimus-manager --switch hybrid
optimus-manager --switch nvidia

Then,logout and login again,you should be now using the nvidia mode,connect to the external monitor and everything should be fluid,you can verify what mode you are right now with

optimus-manager --print-mode

Take note that gdm-prime should be on version 40 on the AUR,when it ask you to update to 41,don’t update until you have GNOME 41 as well.

1 Like

Hello XRaTiX, thanks for your time and your answer.
I mentioned this solution above but as I was saying installing optimus requires to install an outdated package : if you follow gdm-prime link you will see that it was flagged as out-of-date a few weeks ago.
Graphic cards are a bit overpriced these days, I can’t afford to burn this one with a package that might harm the gc… Or is it safe despite being outdated ? I couldn’t find any record of someone saying that they tried this solution with no issue afterwards with the current gnome 40.5 shipped with manjaro.

The package is fine,the out-of-date is because of GNOME 41,it will work fine in Manjaro because we have GNOME 40,when Manjaro has GNOME 41 then yeah it can be a little problematic because you can’t update to GNOME 41 until you have the gdm-prime updated to 41 as well.

If you prefer to not install anything you can go with KDE,with KDE is just modifiy a line of a config file,no need to install anything and it will work across all Plasma upgrades.

Manjaro ships with a default configuration for SDDM (the default login manager for KDE) which overrides some keys needed by optimus-manager. To use optimus-manager, you need to edit the file /etc/sddm.conf and simply put a # before the line starting with DisplayCommand and the one starting with DisplayStopCommand .

1 Like

My bad, I missed the point where gdm-prime is only outdated considering GNOME 41, I thought 40.0 to 40.5 could be an issue but apparently not.
Thanks again for your answer and have a very good day !

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.