GDM becoming unstable after switching to Nvidia-driver

Hello. I seem to have run into a problem after following this guide: [HowTo] Set up PRIME (output offload) with NVIDIA proprietary driver on how to setup PRIME. I am using a Lenovo Y520 with Hybrid Graphics.

Straight to the point gdm has become a bit unstable with the fact that when the system first boots up I get a bit of graphical glitch with the mouse pointer (a black box around it when it) and further when it automatically locks up, which then it either the top Gnome bar glitches or the whole screen. Either I misconfigured something either there is something wrong with the Nvidia drivers (which I doubt as after that point the system runs like it should).

So my questions would be:

  1. Any tips on how this could be fixed?
  2. Is there any reason as to why the mouse speed in the login screen is different to the one after I log in to my DE?
  3. Also gdm randomly stops working after going into sleep mode and waking up, which at that point I can only use tty to log back and reboot. Any fixes for that?

All my cards are ATI/AMD so I can't help much with the driver issue, but;
2.: You probably set your mouse sensitivity in your user settings, and while you're not logged in (yet), those don't apply (thus different mouse speeds on login screen)
3.: I own a Lenovo laptop too, and the sleep mode glitch does happen to me too occasionally.
While I haven't really tried to figure out the exact source of the problem, two things that worked for me before are:

  • If you know you are going to be AFK for more than a few minutes, lock the screen manually, and perhaps close the lid (having a keybind for locking the screen helps a lot)
  • Disable automatic sleep mode (yes... it's dumb, but it works.)

If someone knows what else can be done about questions 2 and 3, I'm interested too.

Thank you for the message and tip. Hopefully the manual lock will fix a bit of the problem for the time being. :slight_smile:

First we have to find the source of the problem. Then.. we take Berlin :smile:
What have you done wrong with the PRIME setup?
Wasn't there any Xorg errors in the log?

Reading will help everybody have the same "language"..

the cursor issue can be fixed by adding:

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:2:0:0"
    Option "AllowEmptyInitialConfiguration"
    Option "SWcursor" "true"  ##<----THIS LINE

to /etc/X11/xorg.conf.d/optimus.conf

for the other issues, make sure you didnt miss any gpu/video related .conf files that could be conflicting with the ones you made following the tutorial.

All right so I read your forum post and before I do anything I will send a picture with the problem at hand, along the output given by the commands you've listed at the troubleshooting section. I am inexperienced in this field so any help would be taken gladly.

Terminal Outputs:

1. inxi -SMGxxz
Host: Lenovo-Y520 Kernel: 4.20.11-1-MANJARO x86_64 bits: 64 compiler: gcc
v: 8.2.1 Desktop: Gnome 3.30.2 wm: gnome-shell dm: GDM
Distro: Manjaro Linux
Type: Laptop System: LENOVO product: 80WK v: Lenovo Y520-15IKBN
serial: Chassis: type: 10 v: Lenovo Y520-15IKBN serial:
Mobo: LENOVO model: Provence-5R1 v: NO DPK serial: UEFI: LENOVO
v: 4KCN40WW date: 10/17/2017
Device-1: Intel HD Graphics 630 vendor: Lenovo driver: i915 v: kernel
bus ID: 00:02.0 chip ID: 8086:591b
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Lenovo
driver: nvidia v: 415.27 bus ID: 01:00.0 chip ID: 10de:1c8d
Display: x11 server: 1.20.3 driver: nvidia compositor: gnome-shell
OpenGL: renderer: GeForce GTX 1050/PCIe/SSE2 v: 4.6.0 NVIDIA 415.27
direct render: Yes

2. mhwd -li

Installed PCI configs:

              NAME               VERSION          FREEDRIVER           TYPE

     network-r8168            2016.04.20                true            PCI
      video-nvidia            2018.08.09               false            PCI

Warning: No installed USB configs!

3. xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.05*+ 60.01 59.97 59.96 59.93
1680x1050 59.95 59.88
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
700x525 59.98
800x450 59.95 59.82
640x512 60.02
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
640x400 59.88 59.98
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 disconnected (normal left inverted right x axis y axis)

4. cat /etc/X11/xorg.conf.d/*.conf

Written by systemd-localed(8), read by systemd-localed and Xorg. It's

probably wise not to edit this file manually. Use localectl(1) to

instruct systemd-localed to update it.

Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "gb,ro"
Option "XkbVariant" "extd,winkeys"
Section "Module"
Load "modesetting"

Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "AllowEmptyInitialConfiguration"

5. cat /etc/modules-load.d/*.conf

Generated by mhwd - Manjaro Hardware Detection


List of modules to load at boot

6. cat /etc/modprobe.d/*.conf
install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS
blacklist nouveau
blacklist nvidiafb
blacklist rivafb
options nvidia_drm modeset=1
blacklist r8169

7. journalctl -b -p3
-- Logs begin at Wed 2019-03-06 17:47:19 EET, end at Sun 2019-03-10 16:01:05 EET. --
Mar 10 15:11:42 Lenovo-Y520 bluetoothd[687]: Failed to set mode: Blocked through rfkill (0x12)
Mar 10 15:11:50 Lenovo-Y520 bluetoothd[687]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
Mar 10 15:11:50 Lenovo-Y520 bluetoothd[687]: RFCOMM server failed for :1.147/Profile/HSPHSProfile/00001108-0000-1000-8000-00805f9b34fb: rfcomm_bind: Address already in use (98)
Mar 10 15:11:51 Lenovo-Y520 bluetoothd[687]: Failed to set mode: Blocked through rfkill (0x12)

First, you need to read one more tutorial (to fix your post, so it is safe-readable)

Since you only have problem with GDM, you should provide a better configuration file to Xorg.
You may need to add (if not already) ForceFullCompositionPipeline at nvidia settings.
"Save your Nvidia Settings to X Configuration file" but use a local folder, not the final target.


Then merge that file with your current at /etc/X11/xorg.conf.d/optimus.conf (the name may vary) and save to that file (/etc/X11/xorg.conf.d/optimus.conf).
This could possibly done, with Nvidia Settings (Merge with existing) at the "Save As.." dialog, but I have not tried myself.

Be careful to not just add sections to the final conf, but really merge, so you don't have two Driver Sections etc.

If you have doubts, post what you came up to.

first things first, please fix the formatting as @AgentS suggested, the only way this works is for you to post the exact and whole terminal output, not an edited version. please use 3 backtics ``` above and below terminal output so it gets formatted properly, you can also use the </> button above the post entry box. please edit post and provide output to requested commands.
not now, but at some point update your bios, yours is fairly old:

this should read like this:

Display: x11 server: X.Org 1.20.4 driver: modesetting,nvidia 
  compositor: compton resolution: 1920x1080~60Hz 

modesetting, nvidia is what should read, so im thinking you maybe made a mistake during the PRIME tutorial. possibly followed more than 1 set of desktop manager instructions? at step 5 did you follow only the GDM instructions? or did you follow the SDDM and lightdm instructions as well?

please post in proper format ( ``` above and below output)

grep -v ^# /etc/X11/xorg.conf.d/*.conf
grep -v ^# /etc/X11/mhwd.d/*.conf
grep -v ^# /etc/modprobe.d/*.conf
grep -v ^# /etc/modules-load.d/*.conf
cat /usr/local/share/optimus.desktop
cat /usr/local/bin/

if there is no output for a given command, please mention that. dont leave out anything and post output as it is in the terminal.

1 Like

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

Forum kindly sponsored by