Nvidia 455.38 Driver Xinerama crashes linux gui (gtk 3.X & others) location detection issue

Scope

  • Nvidia 455.38 Linux Driver
  • With Enable Xinerama
  • Crashes GTK modules or more others linux UI kit location detection

Impact

  • (Technical) Makes windows are jumped into a without calculated full xinerma width / height
  • (Application) Windows are not located in correct position
  • Firefox drag & drop crashes entirely, need to force restart
  • Chromium right click menu jumped wrongly
  • fcitx panel show in incorrect direction
  • Cant take screenshots (xfce4-screenshooter -r)
  • Telegram cant select file to upload
  • Thunar Drag & drop into incorrect direction
  • Microsoft VSCode GUI crashes

Timeline

  • Found this issue 4 yrs ago, I decided to wait until the driver stable before jumping back to linux
  • @2020 Dec, I found it is not fixed , or may be no one notice this

Tested System

  • xubuntu 16.x, 20.02
  • Last tested : Kernel 5.4.0-58-generic
  • Nvidia 1050TI , 1050
OS: Ubuntu 20.04.1 LTS x86_64
Host: B250-HD3
Kernel: 5.4.0-56-generic
Uptime: 27 mins
Packages: 2083 (dpkg), 7 (snap)
Shell: zsh 5.8
WM: awesome
Theme: Greybird [GTK3]
Icons: elementary-xfce-darker [GTK3]
Terminal: HyperTerm
Terminal Font: Hack
CPU: Intel i7-7700 (8) @ 4.200GHz
GPU: NVIDIA GeForce GTX 1050 Ti (Gigabyte G1 Gaming)
GPU: NVIDIA GeForce GTX 1050    (Gigabyte G1 Gaming)
Memory: 5530MiB / 32076MiB

Monitors

  • 24" 1920x1080 x 4
  • 32" 2560x1440 x 2

Displays Card Config

Display Map

24 32 24
24 32 24
  • NVIDIA GeForce GTX 1050
    • 24"(HDMI)-32"(DVI)-34"(HDMI)
  • NVIDIA GeForce GTX 1050 Ti
    • 24"(HDMI)-32"(DVI)-34"(HDMI)

nvidia-bug-report.log.gz (980.1 KB)

Chrome & some others GTK application location detection failed, menu show in incorrect location

xfce4-screenshooter -r locate the wrong area, makes cant screenshot the app as expected

Drag & Drop Firefox tab bar=> crashes

Current Xinerama Setup

Root Cause Analysis

After I have tested enable and disable the xinerama, I found out this issue has gone when only single head mode.
The xinerama extends the display size, which makes some of the unknown GTK modules or other linux modules that calucate the Top & Left X,Y axis are excluding the xinerma size.

Multiple way to Reproduce this bug

  1. Download latest firefox
    Enable multihead
    Enable xinerma
    Drag & drop it, it will crashes

  2. Download Chrome/chromium

sudo apt install chromium

Goto any web page and right click, check the menu location.

  1. Execute the following command:
xfce4-screenshooter -r

Try to screenshot , you will soon find out the location is incorrect.

I also have tested the xinerma under other os, including the fedora, arch(Majaro), centos, debian,

Those OS requires extensive amount to config the multihead, which the sudo nvidia-config doesnt work out of the box like xubuntu.

I have tested this issue in 2016 with the exact same system build, and the issue still exists.

Need a fix for this. Please ><.
It is a critical user experience issue.
Really love linux and dont want to use mac.

You’re running Xorg Xinerama with Composite enabled, not supported and buggy combination. Please disable composition in xorg.conf

Section "Extensions"
Option "Composite" "Disable"
EndSection

It fixed some of those issues. But this issue still exists.
Thanks for the advice.

cat /etc/X11/xorg.conf | pbcopy

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 440.82


Section "ServerLayout"

# Removed Option "Xinerama" "1"
# Removed Option "Xinerama" "0"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 1440
    Screen      1  "Screen1" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "1"
EndSection

Section "Files"
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      "AUS VA32AQ"
    HorizSync       30.0 - 90.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "DELL U2417H"
    HorizSync       30.0 - 83.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1050 Ti"
    BusID          "PCI:8:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1050"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"

# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +0+720, DP-0.8: nvidia-auto-select +2560+0, DP-0.1: nvidia-auto-select +2560+1080"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +0+720, DP-0.1: nvidia-auto-select +2560+0, DP-0.8: nvidia-auto-select +2560+1080"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +0+360, DP-0.1: nvidia-auto-select +2560+0, DP-0.8: nvidia-auto-select +2560+1080"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +0+360, DP-0.8: nvidia-auto-select +2560+1080, DP-0.1: nvidia-auto-select +2560+0"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +0+0, DP-0.1: nvidia-auto-select +2560+0, DP-0.8: nvidia-auto-select +2560+1080"
# Removed Option "metamodes" "DVI-D-0: nvidia-auto-select +0+360, DP-0.1: nvidia-auto-select +2560+0, DP-0.8: nvidia-auto-select +2560+1080"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-D-0: nvidia-auto-select +1920+0, HDMI-1: nvidia-auto-select +4480+0, HDMI-2: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"

# Removed Option "metamodes" "HDMI-1-1: nvidia-auto-select +0+0 {AllowGSYNC=Off}, HDMI-1-2: nvidia-auto-select +0+1080"
# Removed Option "nvidiaXineramaInfoOrder" "DFP-4"
# Removed Option "metamodes" "HDMI-1: nvidia-auto-select +0+0, HDMI-2: nvidia-auto-select +0+1080"
# Removed Option "metamodes" "HDMI-1: nvidia-auto-select +0+360, HDMI-2: nvidia-auto-select +4480+360, DVI-D-0: nvidia-auto-select +1920+0"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "HDMI-1: nvidia-auto-select +4480+360, HDMI-2: nvidia-auto-select +0+360, DVI-D-0: nvidia-auto-select +1920+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option "Composite" "Disable"
EndSection


Fixed

Firefox drag & drop crashes entirely, need to force restart
Chromium right click menu jumped wrongly (Partialy Fixed, the drop down menu crashed in reverse UI
fcitx panel show in incorrect direction
Cant take screenshots (xfce4-screenshooter -r)
Telegram cant select file to upload
Thunar Drag & drop into incorrect direction
Microsoft VSCode GUI crashes

The Chrome menu UI is completely broken after disable the composite.

chrome is broken and cannot drag to xscreen 2 after this setup.

Kazam is okay for screenshots under w/e setup.

It fixed some of those annoying issues.
With a restart of chromium, sometimes it can reset the drag over 2 xscreen issue.

So far with the use of firefox + disable the composite its ok for browsing issue.

Fot the code editor, intellj its totally works out of the box as expected.
M$ vscode is not stable under xinerama.

Fcitx gtk 3 location issue is still exists.

VSCode crashing might be a different, known bug unrelated to Xinerama. To work around it, try disabling gpu hw accel in VSCode.
Positioning bugs might get better with the latest 460 beta driver, don’t know exactly, though.

The disable composite flag is a temporary fix for now.
I can use firefox as a substitution for this case.
However, it still quite a annoying bug , looking forward to have a complete fix to get to work under chromium and other gtk modules with nvidia.

For reference, can you please post the output of
xrandr --listmonitors
?

RandR extension missing