System behaves weird with NVIDIA enabled using Optimus-manager

Hello,

I wish this community a prosperous and positive journey with the new fresh start!

This is a continuation of an old problem described here:

archived.forum manjaro org/t/desktop-is-missing-with-nvidia-and-optimus-manager/149080

When NVIDIA is chosen, I get many issues on my desktop:

  1. Missing desktop from one of the displays (the Primary in this case). Black with cursor only. I can drag and drop Windows to it but the Desktop is missing, no panels… etc

  2. Google Chrome keeps crashing. Before, it used to crash several times (around 10 times in a row) with a fresh open but then remains working perfectly. Now, I am reaching around 100 attempts :smile: and still crashing with every open after a few seconds.

And many other minor weird behaviors.

With Intel, nothing of those happens. Only with NVIDIA.

Help, please!

System:    Host: LEGION Kernel: 5.8.3-2-MANJARO x86_64 bits: 64 Desktop: KDE Plasma 5.19.4 Distro: Manjaro Linux 
Machine:   Type: Laptop System: LENOVO product: 80YY v: Lenovo Y520-15IKBM serial: <superuser/root required> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <superuser/root required> UEFI: LENOVO v: 5XCN22WW 
           date: 02/23/2018 
Battery:   ID-1: BAT0 charge: 42.3 Wh condition: 42.3/45.0 Wh (94%) 
CPU:       Topology: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP L2 cache: 6144 KiB 
           Speed: 800 MHz min/max: 800/3800 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 
Graphics:  Device-1: Intel HD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] driver: nvidia v: 430.64 
           Device-3: Acer EasyCamera type: USB driver: uvcvideo 
           Display: x11 server: X.Org 1.20.8 driver: modesetting resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 20.1.6 
Audio:     Device-1: Intel CM238 HD Audio driver: snd_hda_intel 
           Device-2: NVIDIA GP106 High Definition Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k5.8.3-2-MANJARO 
Network:   Device-1: Intel Dual Band Wireless-AC 3165 Plus Bluetooth driver: iwlwifi 
           IF: wlp2s0 state: up mac: ac:ed:5c:52:57:dd 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8168 
           IF: enp3s0 state: down mac: 54:e1:ad:43:36:ce 
Drives:    Local Storage: total: 1.14 TiB used: 89.49 GiB (7.6%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLW256HEHP-000L2 size: 238.47 GiB 
           ID-2: /dev/sda vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB 
Partition: ID-1: / size: 133.84 GiB used: 83.61 GiB (62.5%) fs: ext4 dev: /dev/nvme0n1p4 
Swap:      Alert: No Swap data was found. 
Sensors:   System Temperatures: cpu: 45.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 243 Uptime: 22m Memory: 15.53 GiB used: 2.76 GiB (17.7%) Shell: Bash inxi: 3.1.05

can you returns

sudo mhwd -li 

Hello,

Someone shared their experience on installing Arch linux on this model.


from there you will be pointed to this page by the same author.

Apparently they use bumblebee but that means you are doing something wrong about configuring Optimus-Manager.

Probably @michaldybczak will port back their tutorial from archived forum, with some updates (if necessary), but thill then you can check it here:

With Intel currently chosen

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-430xx-bumblebee            2019.10.25               false            PCI
         network-r8168            2016.04.20                true            PCI
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!
## IMPORTANT : Manjaro KDE users

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` . 

Have you read this on the GitHub? There is it could be problem.

That will not help you with Optimus-Manager. See my previous comment.

Thanks everyone for the quick responses!

I am not quite sure if I understood what I am supposed to do now - but I will re-read the answers carefully again and will report back to you.

Thanks all again!

This looks like crashed plasmashell. I got that a lot on Nvidia drivers on multimonitor setup (but worked fine for one screen) in the past and had to start plasmashell 1-3 times (because it kept crashing) till it was OK. Use krunner for starting plasmashell. However, I don’t get that issue on hybrid mode with 450xx drivers (didn’t check full Nvidia mode yet).

However, if that happens for single monitor setup, something is off and it’s not clear what. I would look into configs.

Open it in terminal and look on the output. See what it says right before the crash. There is a high chance it will show what is wrong or at least point you in some direction.

I will, once I get ability to post images here, and some small updates are indeed needed.

1 Like

The tutorial mentioned above: archived.forum.manjaro org/t/guide-install-and-configure-optimus-manager-for-hybrid-gpu-setups-intel-nvidia/92196 is what I actually followed in the first place to install optimus-manager

The issue (of missing desktop) did not happen for several days in a row. And Chrome has never crashed since this post :smile:

Now, only the issue of (broken plasmashell?) is there.

I tried running plasmashell from the terminal. It gave an error about inotify max number of files to watch or something like this - I increased the number. The error did not show up again but running plasmashell did not help neither.

The lines DisplayCommand and DisplayStopCommand are already commented out since the installation of Optimus-manager.

Speaking of Optimus-manager, the Hybrid mode has never worked with me. After the session reload, it stays in Intel mode.

Despite that Google Chrome has never crashed since then, it also behaves very strangely: when I scroll through a page, some random parts of the page freezes. When I switch between tabs, also some random parts from the previous tab freeze, and so on.

None of those happen with Intel mode. And I get theses on the console. None of those outputs comes with Intel neither. So when Intel, nothing shows on the console. Perfectly fine. With NVIDIA, I get this weird behaveour and those errors:

[user@LEGION ~]$ google-chrome-stable  
[15760:15809:0912/103728.868398:ERROR:media_history_store.cc(363)] Failed to create or update the media history store.
[15797:15802:0912/103730.878773:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103730.882750:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103730.898669:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103731.002719:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103731.029972:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103731.241849:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103731.377846:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103731.901584:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103732.035607:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103732.036747:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103732.255290:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15797:15802:0912/103732.385807:ERROR:ssl_client_socket_impl.cc(963)] handshake failed; returned -1, SSL error code 1, net_error -101
[15794:15794:0912/104124.299060:ERROR:shared_image_manager.cc(214)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a no
n-existent mailbox.
[15794:15794:0912/104124.299332:ERROR:shared_image_manager.cc(214)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a no
n-existent mailbox.
Fontconfig error: Cannot load default config file: No such file: (null)
[15760:15760:0912/112223.140023:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source
: chrome-extension://hnbmpkmhjackfpkpcbapafmpepgmmddc/devtools.html (0)
[15794:15794:0912/112226.732035:ERROR:gl_utils.cc(316)] [.RendererMainThread-0x3b3651c13c00] GL_INVALID_OPERATION: Framebuffer is incomplete.
[15794:15794:0912/112226.732588:ERROR:gl_utils.cc(316)] [.RendererMainThread-0x3b3651c13c00] GL_INVALID_OPERATION: Framebuffer is incomplete.
[15794:15794:0912/112226.735979:ERROR:gl_utils.cc(316)] [.RendererMainThread-0x3b3651c13c00] GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomple
te.
Fontconfig error: Cannot load default config file: No such file: (null)
[15760:15760:0912/112854.010751:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source
: chrome-extension://hnbmpkmhjackfpkpcbapafmpepgmmddc/devtools.html (0)
[15794:15794:0912/112858.396243:ERROR:gl_utils.cc(316)] [.RendererMainThread-0x3b3651d24800] GL_INVALID_OPERATION: Framebuffer is incomplete.
[15794:15794:0912/112858.396703:ERROR:gl_utils.cc(316)] [.RendererMainThread-0x3b3651d24800] GL_INVALID_OPERATION: Framebuffer is incomplete.
[15794:15794:0912/112858.400344:ERROR:gl_utils.cc(316)] [.RendererMainThread-0x3b3651d24800] GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomple
te.
[15760:15779:0912/131741.988510:ERROR:connection_factory_impl.cc(428)] Failed to connect to MCS endpoint with error -106