(SOLVED) Occasional screen flicker and black screen on logout with KVM switch (Linux Mint 19/19.1)

Going to start>logout causes the screen to turn black, and my system also freezes when this happens so I must manually reboot. I cannot reach the terminal.

I’ve tried to remove the screen flicker by enabling camposition pipeline and full pipeline in addition to disabling certain effects. Nothing worked.

Updating the kernel and distro has not affected these problems. Driver is 390.87
nvidia-bug-report.log.gz (98.2 KB)

Bumping because the bug report didn’t upload correctly, so I reattached

Does it work using a 340 driver?

I could not get the 340 driver to work

The one from the ubuntu graphics ppa should work, or does that fail?

So I remembered that I hadn’t tried the 340 driver under 19.1, so I purged all the 390 stuff and isntalled 340, and it works. No flickering or logut error.

The only problem is that I cannot get 2560x1080 on my main display. It’s stuck at 1920x1080. The xorg.conf setup I had before is no longer working.

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics LG ULTRAWIDE"
    HorizSync       30.0 - 90.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVS 310"
    BusID          "PCI:1:0:0"
    Option         "CustomEDID" "DP-0:/home/redpinko/edid.bin"
EndSection

Section "Screen"
   Identifier      "Screen0"
   Device          "Device0"
   Monitor         "Monitor0"
   DefaultDepth     24
   Option          "ModeValidation" "NoExtendedGpuCapabilitiesCheck"
   Option          "MetaModes" "DP-0:2560x1080_60 +0+0"
EndSection

It depends on the custom edid you’re using. Maybe leave that out and use ignoreedid option since you also have a monitor section.

Well, I atleast think I figured out why it isn’t working.

Running [c]xed /var/log/Xorg.0.log[/c] with the debug option in the file, I found this:

[  1937.611] (II) NVIDIA(GPU-0):   Validating Mode "2560x1080":
[  1937.611] (II) NVIDIA(GPU-0):     2560 x 1080 @ 60 Hz
[  1937.611] (II) NVIDIA(GPU-0):     Mode Source: EDID
[  1937.611] (II) NVIDIA(GPU-0):       Pixel Clock      : 185.58 MHz
[  1937.611] (II) NVIDIA(GPU-0):       HRes, HSyncStart : 2560, 2624
[  1937.611] (II) NVIDIA(GPU-0):       HSyncEnd, HTotal : 2688, 2784
[  1937.611] (II) NVIDIA(GPU-0):       VRes, VSyncStart : 1080, 1083
[  1937.611] (II) NVIDIA(GPU-0):       VSyncEnd, VTotal : 1093, 1111
[  1937.611] (II) NVIDIA(GPU-0):       H/V Polarity     : -/-
[  1937.611] (WW) NVIDIA(GPU-0):    <b> Mode is rejected: PixelClock (185.6 MHz) too high for</b>
[  1937.611] (WW) NVIDIA(GPU-0):     <b>Display Device (Max: 165.0 MHz).</b>

Whole file: gist:92ea13cde74b3ddd4a712c245f2a3a9b · GitHub

xorg:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    ModelName      "LG Electronics LG ULTRAWIDE"
    HorizSync       30.0 - 90.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    ModelName      "Tech Concepts TCL"
    HorizSync       14.0 - 70.0
    VertRefresh     50.0 - 85.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option         "CustomEDID" "DP-0:/home/redpinko/edid.bin, DP-1:/home/redpinko/edid2.bin"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0" 
    DefaultDepth    24
    Option         "UseNvKmsCompositionPipeline" "false"
    Option         "ForceFullCompositionPipeline" "true"
    Option         "ModeValidation" "NoExtendedGpuCapabilitiesCheck"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "MetaModes" "DP-0:2560x1080_60 +0+0, DP-1:1920x1080_60 +2560+0"
    Option         "ModeDebug" "true"
EndSection

Odd. Try adding
NoEdidMaxPClkCheck
or
NoMaxPClkCheck
to the ModeValidation string.
[url]https://download.nvidia.com/XFree86/Linux-x86_64/384.98/README/xconfigoptions.html[/url]

NoMaxPClkCheck

Gave me the option for my resolution, but it froze my system on a black screen once selected.

So the 390 driver detects 230MHz pixel clock while the 340 driver only detects 165MHz and using more than this doesn’t work reliable (390) or not at all (340). Would point to some flakey hardware, did you already try to swap connectors/cables?

Yeah, the cables aren’t of shady quality or anything. Just amazon DP to HDMI cables. I switched to them once already when the screen wasn’t even turning on initially.

Could this be indicative of bad solder joints of resistors or capacitors on the card? That is something I have the means to fix.

Ok, didn’t notice those are actually connected to hdmi, which means the transport is TMDS instead of DP. 165MHz is the pixel clock of hdmi 1.2, 1.3 allows for higher clocks. The NVS is spec’ed to drive higher resolutions over DP. So the built-in TMDS encoders might be only able to properly run hdmi 1.2 clocks and nvidia just relaxed this limitation in later drivers getting it to run with some tricks but sometimes not stably. Of course, only speculating here but I suspect it’s simply an edge case and hardware limitation.
You might have better luck using an active DP2HDMI converter (4k@60Hz) to run your setup inside the specs. Not the one from 3DClub.

My kvm switch is definitely giving me the problems. I bought a 4k 60hz capable hdmi cable for kvm input and another one for output, and I got a 4k 60hz capable DP to HDMI converter, plugged it all in, and my monitor showed the HP logo for the bios then it cut out. After that, the signal would not be picked up at all by my monitor no matter how many times I rebooted. I then plugged the upgraded cable with upgraded dongle directly into my monitor, and the resolution was detected instantly. The GRUB splash even loaded at the correct resolution which was another problem altogether.

My kvm switch is 4k capable too, which makes this all the more frustrating.

Now you even come around with having a kvm switch connected. You’re really on your own here.

So the new switch solved my problem. I switched from this to this.

I am thinking it has to do with the EDID emulator, the 60hz refresh rate compatibility, or both in the new KVM switch. Hopefully this thread might help someone in the future.

Cheers!