Screen flickering / tearing after login - video hybrid intel nvidia-450xx-prime

Hi Team,

I have a dual-boot setup (Windows 10 + Manjaro) due to some proprietary software need at my work. This is fresh installation of Manjaro using Architect iso. But I’m facing following issues. If possible, please help me out to solve the same.

ISSUES:

  • For some reason after I login (refer the GIF below for what happens after I enter my login password) into the Manjaro System, I get screen flickering / tearing issue (they are like giberish vertical RGB Lines on screen). This happens for a second or 2, then the desktop loads back to normal. I have installed video-hybrid-intel-nvidia-450xx-prime and video modsetting.
  • This is the first time I’m seeing video-hybrid-intel-nvidia-450xx-prime in action, as in my previous installation, I had used optimus-swtich. Now, when I open nvidia-settings, I don’t see X-screen settings options there. I don’t know, if it’s normal in video-hybrid-intel-nvidia-450xx-prime setup, as in my previous optimus switch setup, I had X-screen options in nvidia-settings.
  • Out of curiosity, when I changed to “Discrete Graphics” option in bios and tried to login, this time there was no screen flickering / tearing and no gibberish vertical RGB lines shown at login. But now I couldn’t change / control my screen brightness (possibly any other display related function also might not be working). Hence, I switched back to switchable graphics.
  • Last but not the least, I feel the system is a bit slow. Sometimes there are random freezes and the system doesn’t respond at all, and then suddenly starts behaving normally. I think this also is due to video-hybrid-intel-nvidia-450xx-prime.
  • Part from using PRIME-RUN command manually for any/all applications, is there any gui or auto setting available to let the application auto launch with prime (based on the program).

My INXI output:

    System:    Kernel: 5.8.6-1-MANJARO x86_64 bits: 64 compiler: N/A 
               parameters: BOOT_IMAGE=/boot/vmlinuz-5.8-x86_64 root=UUID=fdc7a568-a918-497a-8efc-bfde192ef60b rw quiet 
               udev.log_priority=3 
               Desktop: Xfce 4.14.2 tk: Gtk 3.24.20 info: xfce4-panel wm: xfwm4 dm: LightDM 1.30.0 Distro: Manjaro Linux 
    Machine:   Type: Laptop System: LENOVO product: 81SY v: Lenovo Legion Y540-15IRH-PG0 serial: <filter> Chassis: type: 10 
               v: Lenovo Legion Y540-15IRH-PG0 serial: <filter> 
               Mobo: LENOVO model: LNVNB161216 v: SDK0Q55722 WIN serial: <filter> UEFI: LENOVO v: BHCN32WW date: 08/29/2019 
    Battery:   ID-1: BAT0 charge: 31.3 Wh condition: 53.0/52.5 Wh (101%) volts: 11.4/11.3 model: LGC L17L3PG1 type: Li-poly 
               serial: <filter> status: Unknown cycles: 71 
    CPU:       Topology: Quad Core model: Intel Core i5-9300H bits: 64 type: MT MCP arch: Kaby Lake family: 6 model-id: 9E (158) 
               stepping: A (10) microcode: D6 L2 cache: 8192 KiB 
               flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 38408 
               Speed: 2401 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 2400 2: 2401 3: 2401 4: 2400 5: 2401 6: 2400 7: 2400 
               8: 2398 
               Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
               Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
               Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
               Type: meltdown mitigation: PTI 
               Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
               Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
               Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
               Type: srbds mitigation: Microcode 
               Type: tsx_async_abort status: Not affected 
    Graphics:  Device-1: Intel UHD Graphics 630 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:3e9b 
               Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Lenovo driver: nvidia v: 450.66 
               alternate: nouveau,nvidia_drm bus ID: 01:00.0 chip ID: 10de:1f91 
               Device-3: Acer SunplusIT Integrated Camera type: USB driver: uvcvideo bus ID: 1-6:4 chip ID: 5986:2113 
               Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia alternate: fbdev,intel,nouveau,nv,vesa 
               display ID: :0.0 screens: 1 
               Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9") 
               Monitor-1: eDP-1 res: 1920x1080 dpi: 142 size: 344x193mm (13.5x7.6") diag: 394mm (15.5") 
               OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.1.7 direct render: Yes 
    Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel 
               alternate: snd_soc_skl,snd_sof_pci bus ID: 00:1f.3 chip ID: 8086:a348 
               Sound Server: ALSA v: k5.8.6-1-MANJARO 
    Network:   Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus ID: 00:14.3 
               chip ID: 8086:a370 
               IF: wlp0s20f3 state: up mac: <filter> 
               Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 v: kernel port: 3000 
               bus ID: 07:00.0 chip ID: 10ec:8168 
               IF: enp7s0 state: down mac: <filter> 
    Drives:    Local Storage: total: 1.38 TiB used: 30.82 GiB (2.2%) 
               SMART Message: Required tool smartctl not installed. Check --recommends 
               ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L2 size: 476.94 GiB block size: physical: 512 B 
               logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 3L1QEXF7 scheme: GPT 
               ID-2: /dev/sda vendor: Seagate model: ST1000LM048-2E7172 size: 931.51 GiB block size: physical: 4096 B 
               logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 0001 scheme: GPT 
    Partition: ID-1: / raw size: 40.70 GiB size: 39.81 GiB (97.81%) used: 7.05 GiB (17.7%) fs: ext4 dev: /dev/nvme0n1p6 
               ID-2: /home raw size: 196.85 GiB size: 192.76 GiB (97.92%) used: 1.55 GiB (0.8%) fs: ext4 dev: /dev/nvme0n1p7 
    Swap:      Alert: No Swap data was found. 
    Sensors:   System Temperatures: cpu: 47.0 C mobo: N/A 
               Fan Speeds (RPM): N/A 
    Info:      Processes: 239 Uptime: 1h 38m Memory: 23.37 GiB used: 1.71 GiB (7.3%) Init: systemd v: 246 Compilers: gcc: 10.2.0 
               Packages: pacman: 1054 lib: 391 Shell: Bash v: 5.0.18 running in: xfce4-terminal inxi: 3.1.05 

GIF for the screen tearing at login i.e. GIF of what happens after I enter my login password:
ezgif.com-gif-maker

Screenshot for NVIDIA Settings:

If you can help with any of the issues, (especially the screen tearing) it’ll be helpful to me. Thanks in advance.

Thanks and Regards,
UserManjaro.

Hi Forum Members,

I have seen members responding on threads with similar issue. That means people do have some idea on the issue. But most of the threads have either only one of the issue, that too with using only the “prime” or optimus-manager. I have video-hybrid-intel-nvidia-450xx-prime.

I request, if anyone can help me with my issues.

Thank you again for your time.

And yes, just like similar thread here’s the output of sudo prime-run nvidia-settings:

[ ~]$ sudo prime-run nvidia-settings
(nvidia-settings:2018): GLib-GObject-CRITICAL **: 20:39:31.383: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

ERROR: nvidia-settings could not find the registry key file. This file should
       have been installed along with this driver at
       /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
       application profiles will continue to work, but values cannot be
       prepopulated or validated, and will not be listed in the help text.
       Please see the README for possible values and descriptions.

Please post the output of xrandr --listproviders, and head -n 99 /etc/X11/xorg.conf.d/*.

PRIME and optimus-manager depend on video-hybrid-intel-nvidia-450xx-prime. They are not mutually exclusive.

1 Like

Firstly, Thank You for the response. Really appreciate it :slight_smile:

Now coming to the output of the commands, which you have requested:

xrandr --listproviders:

[ ~]$ xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x43 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting
Provider 1: id: 0x23e cap: 0x2, Sink Output crtcs: 4 outputs: 5 associated providers: 1 name:NVIDIA-G0

head -n 99 /etc/X11/xorg.conf.d/*:

[ ~]$ head -n 99 /etc/X11/xorg.conf.d/*
==> /etc/X11/xorg.conf.d/00-keyboard.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" "in"
        Option "XkbModel" "pc105"
        Option "XkbVariant" "eng"
EndSection

==> /etc/X11/xorg.conf.d/90-mhwd.conf <==
##
## Generated by mhwd - Manjaro Hardware Detection
##

Ok. I thought, PRIME uses vanilla prime (Either only INTEL or only NVIDIA at a time) and optimus-manager is just the automated way to do the same what PRIME already does. While, video-hybrid-intel-nvidia-450xx-prime runs the display and all apps on INTEL by default and NVIDIA can be used by issuing prime-run command.

What’s the output of nvidia-smi?

There is some confusion here. PRIME is a “technology” in the Linux kernel that enables gpu (drivers) to share resource to some degree. Which, in turn, enables the computer to render some applications on the nvidia gpu, then send the images to the intel gpu to display it.

optimus-manager is an application to quickly and conveniently change the Xorg configuration depending on what you want: intel-only, intel + PRIME render offload (hybrid), or nvidia-only.

video-hybrid-intel-nvidia-450xx-prime is the name of the mhwd configuration that should set up the “intel + PRIME render offload” mode.

I personally recommend installing optimus-manager.

I am not aware of any, but you can possibly modify the .desktop file (or launch option for games, etc.) to include prime-run.

$ nvidia-smi
Sat Sep 26 21:49:25 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66       Driver Version: 450.66       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1650    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P0     3W /  N/A |      6MiB /  3911MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       828      G   /usr/lib/Xorg                       4MiB |
+-----------------------------------------------------------------------------+

Ok. That makes sense :slight_smile:.

Yes. I’m aware of that. I use the same to run steam :slight_smile:.

Please run cat /proc/driver/nvidia/params | grep 'DynamicPowerManagement:' and post the output. Does cat /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules exist on your system?

Could you please describe this in more detail? Is there any particular action you take when this happens? How long does it usually last?

Confirm that nvidia-smi shows only Xorg (if not, then close the others), and then wait about 20 seconds, then run /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status and post the output.

$ cat /proc/driver/nvidia/params | grep 'DynamicPowerManagement:'
DynamicPowerManagement: 2
$ cat /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"

# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"

# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"

# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"

# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"

Nothing in particular, it randomly happens. Let’s say, while browsing, starting some apps, or performing any other daily activity on the system, the system randomly freezes and there’s no movement or mouse pointer or response on the screen. It usually lasts for 2-4 secs. After 2-4 sec, it magically starts responding back (without any actions taken for the same from my end).
This entire freezing event occurs randomly and sometimes, not always.

I’m not sure, if I understood that correct, but I only have Firefox and terminal running right now on my system.

$ cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status
suspended

Let me know, if you want me reboot my system and run nvidia-smi and cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status commands.

Please wait until cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status shows suspended, then run time prime-run glxinfo >/dev/null twice and post the time for each run.

Execute command 1st time:

[~]$ cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status
suspended
[~]$ time prime-run glxinfo >/dev/null


real	0m1.604s
user	0m0.030s
sys	0m0.035s
[~]$ 

Execute command 2nd time:

[~]$ cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status
active
[~]$ time prime-run glxinfo >/dev/null


real	0m1.707s
user	0m0.028s
sys	0m0.029s
[~]$ 

3rd run after waiting for about 20 seconds:

[~]$ cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status
suspended
[~]$ time prime-run glxinfo >/dev/null


real	0m1.619s
user	0m0.043s
sys	0m0.042s
[~]$ 

Just in case, you need to check the nvidia-smi:

$ nvidia-smi
Sun Sep 27 22:20:43 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66       Driver Version: 450.66       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1650    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P0     3W /  N/A |      6MiB /  3911MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       811      G   /usr/lib/Xorg                       4MiB |
+-----------------------------------------------------------------------------+

Do you notice any correlation between the GPU being “suspended” and the freezes?

Nope. To be honest, except for nvidia-smi and prime-run, all the other commands for which you had asked to check the output, are new for me. This was the 1st time, I have used or seen them. That might be the primary reason why I’m not able to correlate.

Along with the random freezes and unresponsiveness of the system, I’m still facing this issues. Any way to fix them and the freezes? Thank you :slight_smile:

@pobrn Any other command or action you want me to try, which can help us to fix these issues?

Because of PRIME render offload, you won’t really be able to control anything related to the integrated panel with nvidia-settings. The only solution I see is to switch to “dedicated graphics”. Otherwise you can only control displays which are directly connected to the nvidia gpu. Could you take a screenshot of which options are available for you in nvidia-settings?

This is really vague, so I cannot really help. If you could find a series of steps that consistently causes these freezes, that’d be helpful.

Ok. I understand this.

I have attached the same in my main question, but never the less here is the fresh one :slight_smile:

I had just booted to Manjaro (was using windows for office work). Closed the ‘manjaro-hello’ app and opened firefox for replying here. After displaying manjaro home page, the system freezed for 2 seconds. Then it become normal. I have faced this first time.

After posting this, I rebooted my system. Closed the ‘Manjaro-hello’ app. Right clicked -> settings -> Display settings. After that the system freezed for 1 second and then became normal. After that I opened firefox to report it here. This time, after selecting forums from homepage, the system again freezed for 2 seconds then became normal.

If freezes can’t be fixed/worked on, then we can focus on this issue? Thanks :slight_smile:

@pobrn
So I have tried to switch video-hybrid-intel-nvidia-440xx-prime as well. At the very 1st boot, the vertical screen tearing lines (seen in the gif) issue didn’t happened. However, after reboot the same issue started again and I had to switch back to video-hybrid-intel-nvidia-450xx-prime.

Also, on video-hybrid-intel-nvidia-450xx-prime today while entering wifi password for using my mobile hotspot, I again faced the system freeze issue. This time the system had just booted. I selected the wifi network and tried to enter the password. While entering the password, the system freezed for 2 sec. Since, I was enter the password, I was able to see the lag due to system freeze in the input of password characters.

I hope, all the information from this and my last post are sufficient enough to fix the system freeze and screen tearing issues. Thanks.

@pobrn:
I hope this message finds you well. Even after the latest stable update. I’m still getting the same screen tearing issue as shown in the gif.

Unfortunately, I am out of ideas. If you can easily do it, maybe you could try reinstalling as a last resort.

@pobrn
Since last 2 days, I have formatted and reinstalled Manjaro 4 times.
I have till now tried:

  • Architect [XFCE - Minimal with Auto-Install of Proprietary drivers]
  • Architect [XFCE - Full with Auto-Install of Proprietary drivers]
  • XFCE - Minimal ISO with non-Free drivers

Even reinstall didn’t resolved the issue of the glitch and system freeze.

I have even tried to custom create 20-intel.conf for Xorg. But it lead to black screen at the boot. Hence, reverted the same from TTY.

Thank you for your help and suggestions so far. Can you suggest or add someone to this thread, who might be able to help on this issue.

Have a Good Day ahead :slight_smile: