You are not logged in.

#1 2020-08-07 13:49:45

Kasuko
Member
Registered: 2009-11-02
Posts: 6

Weird display glitches - NVIDIA Optimus

First off I want to say I am sorry if this was solved elsewhere ... I don't even know what this is called. I have "searched" display garbled, purple square, screen artifacts ... and nothing seems to be describing this issues. So this post may be more a "what's even happening?" inquiry more than a "how do I fix?" post.

I am getting weird, scrambled purplish squares that show up on Firefox and Joplin (an Electron app) seemingly at random. Sometimes they flicker, sometimes they stay around. They will "fuzz" when I move the mouse but are static when nothing is happening. They appear on different parts of the screen.

This is what it looks like
getpubthumb?code=XZqpuGkZFqOxvAdufJuKl9L5wM3SxHN5Gpxy&linkpassword=undefined&size=256x192&crop=0&type=auto
Full Size Image

From the behavior I am pretty certain is is not "monitor" or "cable" related as so far it appears only on Firefox and Joplin. I haven't seen this happen on a Termite terminal. Though pretty much Firefox and Termite are all I've used thus far.

I am running a Lenovo P53 with NVIDIA Corporation TU117GLM [Quadro T2000 Mobile / Max-Q] and Intel Corporation UHD Graphics 630 (Mobile) cards. Since this is a development workstation that's 99% docked I have followed the steps in the NVIDIA Optimus wiki page to force only the NVIDIA card to be used.

Here is my /var/log/Xorg.0.log https://dpaste.com//3UX2BRS4X though nothing is happening in that log when the glitch is happening.

I do not have an xorg.conf other than the /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf described in the NVIDIA Optimus Page

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

I am using Picom to as a compositor, but this issues occurs both with it enabled and disabled so it's not related to that.

I'm not sure what else to post to figure this out. Sorry about the vague post.

UPDATE: I have seen it happen now on Eclipse, I am not sure of the underlying rendering there, but it may not be related to that either.

Last edited by Kasuko (2020-08-07 16:01:25)

Offline

#2 2020-08-07 14:50:27

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: Weird display glitches - NVIDIA Optimus

Please replace the oversized thumbnail (200x200 max) w/ a link to the actual image.
Does the issue also show up in screenshots?
The log looks like you're running a 7680 x 2160 output on two logical outputs (from the photo, this could be one monitor w/ two panels inside the bezel, right?) - are the glitches limited to one half of the monitor or do they also cross the center?

This looks like an invalidated texture memory, electron and FF use GL HW acceleration.
Does this only happen with maximized/fullscreen/large™ windows?
Do you redirect the output provider  (the "xrandr --setprovideroutputsource" stuff)?

From the log, the output looks like it's connected to the nvidia chip, so you might want to simply ignore the intel one.
https://wiki.archlinux.org/index.php/PR … rimary_GPU

Offline

#3 2020-08-07 15:13:46

Kasuko
Member
Registered: 2009-11-02
Posts: 6

Re: Weird display glitches - NVIDIA Optimus

seth wrote:

Please replace the oversized thumbnail (200x200 max) w/ a link to the actual image.

Done, I have added a link to the full size image on the original post.

seth wrote:

Does the issue also show up in screenshots?

Just tested now with scrot. The glitch does not show up in the screenshot itself.

seth wrote:

The log looks like you're running a 7680 x 2160 output on two logical outputs (from the photo, this could be one monitor w/ two panels inside the bezel, right?) - are the glitches limited to one half of the monitor or do they also cross the center?

Sorry I should have been more clear, I am using two separate monitors side by side. The image in the original post is just one of the monitors. The glitches are always limited to a single monitor. Though they are not limited to a single half of the monitor.

Here is a photo of the glitch with a window across both monitors but the glitch is limited to one side.

Application across monitors, glitch on left

I will further specify that the glitch does appear on both monitors, it just never spans both simultaneously.

seth wrote:

This looks like an invalidated texture memory, electron and FF use GL HW acceleration.
Does this only happen with maximized/fullscreen/large™ windows?

No, I am able to get the glitch to occur with smaller windows too. (I am using Awesome so it's just default they take up all the screen), I think the photo above should show that.

seth wrote:

Do you redirect the output provider  (the "xrandr --setprovideroutputsource" stuff)?

Ah yes I should have posted that too. From the NVIDIA Optimus page using LightDM to setup the display with:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

seth wrote:

From the log, the output looks like it's connected to the nvidia chip, so you might want to simply ignore the intel one.
https://wiki.archlinux.org/index.php/PR … rimary_GPU

I will attempt to follow these instructions. I will undo the changes from NVIDIA Optimus setup and follow the PRIME steps. (I will report back when I follow the steps, I have already written this post and will lose it if I have to restart)

UPDATE 1: I am following the link from the PRIME wiki page for the proprietary driver here: https://us.download.nvidia.com/XFree86/ … ndr14.html hoping that nvidia would do the magic for me I ran

nvidia-xconfig --prime

Which created the xorg.conf here: https://dpaste.com//7J2XN7NSV which after rebooting the machine still has the glitch appear. I will manually setup the xorg.conf following the article and try again.

Update 2: Well I didn't fully understand the difference, but I see now that updating it to the config specified was pretty much a lesson in futility. The only difference was the identifiers which NVIDIA set as generic terms like Device0, but all I did was change it to nvidia ... which obviously doesn't solve the problem.

However, I am realizing I never installed Intel drivers. Could it be possible that even though I am trying to NOT use the intel card, that I might still need the intel drivers for proper PRIME support?

FINAL UPDATE: Installing the xf86-video-intel package and the glitch is still present.

Last edited by Kasuko (2020-08-07 15:57:16)

Offline

#4 2020-08-07 19:01:58

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: Weird display glitches - NVIDIA Optimus

Can you please post an updated xorg log?
Also "xrandr -q" and "xrandr --listproviders".

Do you still have the "xrandr --setprovideroutputsource modesetting NVIDIA-0" call (or a variation) present?

It's hard to tell from the photo, but is the garbled area (always) about 1920x1080px?

Offline

#5 2020-08-07 19:32:57

Kasuko
Member
Registered: 2009-11-02
Posts: 6

Re: Weird display glitches - NVIDIA Optimus

Alright, so going from scratch.

Starting with a completely empty /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/

$ sudo nvidia-xconfig --prime

WARNING: Unable to locate/open X configuration file.

X Configuration file set up for PRIME. Please run "xrandr --setprovideroutputsource modesetting NVIDIA-0" and "xrandr --auto" to enable. See the README for more details.
Option "AllowEmptyInitialConfiguration" "True" added to Screen "Screen0".
New X configuration file written to '/etc/X11/xorg.conf'

Results in an /etc/X11/xorg.conf - http://dpaste.com//37Q2Q6FNP

I still have LightDM configured to launch the following setup_display.sh script as it's display setup.

$ cat /etc/lightdm/display_setup.sh 
#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Then restarting the laptop results in this Xorg.0.log - http://dpaste.com//7MYDH4SD8

Along with

$ xrandr -q
Screen 0: minimum 8 x 8, current 7680 x 2160, maximum 32767 x 32767
DP-0.2 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1080     60.00    59.94  
   1600x900      60.00  
   1280x1024     60.02  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1152x864      59.96  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93  
DP-0.3 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1080     60.00    59.94  
   1600x900      60.00  
   1280x1024     60.02  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1152x864      59.96  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.00*+  48.00 

and

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x218 cap: 0x1, Source Output crtcs: 4 outputs: 7 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x258 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting

Now to better describe the behavior. The glitch appears sometimes just as a flash, sometimes it sticks around. It's seemingly directly related to what I'm doing on the screen. I have recorded a video that shows it while I move around my Joplin window. It will flicker as it moves, but if I catch it just right it will stick around. You can see the glitch appears on both the right and left and at different heights (seems like it's linked to the height of the window.

Video of Display Glitch

I have even had it happen where it's tied to the tab of the browser. I will have the glitch visible on Tab A and I will switch to Tab B and it will go away until I switch back to Tab A and it's at the same place.

Furthermore, I have had it tied to the scroll position of the browser, where when I scroll the page up ... the glitch will move up too.

Not sure if any of this helps.

Oh also I normally keep my laptop closed and behind my monitor, but because of all the restarting I have to enter my password to decrypt the drive. This time I left it open, looks like the laptop display is mirroring my left monitor, but itself does not show the glitch. As shown in this photo:

Photo of Glitch on Monitor but not on Laptop

Hopefully that helps out. Thank you very much for giving your attention to this, I really appreciate the help!

Offline

#6 2020-08-07 20:13:01

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: Weird display glitches - NVIDIA Optimus

Please try to
a) xrandr --output eDP-1-1 --off
b) skip the output redirection (/etc/lightdm/display_setup.sh) altogether
and see whether the issue still manifests itself.

Offline

#7 2020-08-07 20:26:03

Kasuko
Member
Registered: 2009-11-02
Posts: 6

Re: Weird display glitches - NVIDIA Optimus

I have removed the display_setup.sh script and turned of the laptop screen.

New boot and the problem still persists

New Xorg.0.log: http://dpaste.com//DFQ5MLX8U

Update: I have attempted to remove the nvidia proprietary drivers and see if I had the same issue with the nouveau ones. However I was unable to even get the monitors recognized with the nouveau drivers.

Last edited by Kasuko (2020-08-07 22:16:08)

Offline

#8 2020-08-08 05:49:10

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: Weird display glitches - NVIDIA Optimus

Did eDP-1-1 disappear from xrandr?
Can you disable th internal GPU in the BIOS/UEFI?

Offline

#9 2020-08-08 17:01:47

Kasuko
Member
Registered: 2009-11-02
Posts: 6

Re: Weird display glitches - NVIDIA Optimus

No, the eDP-1-1 display did not disappear though the display is off.

$ xrandr --output eDP-1-1 --off
$ xrandr -q                    
Screen 0: minimum 8 x 8, current 7680 x 2160, maximum 32767 x 32767
DP-0.2 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1080     60.00    59.94  
   1600x900      60.00  
   1280x1024     60.02  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1152x864      59.96  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93  
DP-0.3 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 600mm x 340mm
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1080     60.00    59.94  
   1600x900      60.00  
   1280x1024     60.02  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1152x864      59.96  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  48.00  

Unfortunately I am not able to access the BIOS to turn off the Intel GPU as this is a company laptop with a password protected BIOS.

I have tried changing the resolution to a more standard 1920x1080 but that also didn't help (which may have been obvious to those who know but I had to try.)

Offline

Board footer

Powered by FluxBB