Displays Overlap after Sleep

Having installed NVIDIA proprietary drivers, configured the display layout (2 monitors, 4K left [primary], 1920x1200 right) via either xcfe4-display-settings GUI or nvidia-settings I can get the layout as desired and functional. The displays blank/sleep based on Power Manager settings.

When returning from sleep the position of the displays is changed, and both displays overlap (0,0 absolute, top left aligned), the Panel shifts to the ‘second’ monitor, individual desktop wallpapers still applied. The second display cannot be re-positioned (drag/drop position) from this state.

The only way I’ve found to resolve this so far is to ‘disable’ the second monitor, this re-positions it to the right of the primary monitor, and when re-enabled, will remain there.

Looking for hints/directions of where to look, what to try to resolve this.

How did you do that exactly?
Share some info about your system as described in How to provide good information

Also share from terminal:

cat /etc/X11/mhwd.d/nvidia.conf

Make sure to properly format the Terminal output.

Hi,

Settings were changed with the respective GUI’s accessed from the Menu appfinder Display and NVIDIA X Server Settings, and also following the wiki: Configure NVIDIA (non-free) settings and load them on Startup - Manjaro.

inxi output:

System:
  Kernel: 5.10.42-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=869b105f-9307-4aad-9dac-da90d6af48d3 ro quiet apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm4 vt: 7 
  dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Desktop System: Gigabyte product: Z87X-OC Force v: N/A 
  serial: <filter> Chassis: type: 3 serial: <filter> 
  Mobo: Gigabyte model: Z87X-OC Force-CF v: x.x serial: <filter> 
  BIOS: American Megatrends v: 10b date: 06/12/2014 
Battery:
  Message: No system battery data found. Is one present? 
Memory:
  RAM: total: 31.25 GiB used: 4.1 GiB (13.1%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: Quad Core model: Intel Core i7-4770K bits: 64 type: MT MCP 
  arch: Haswell family: 6 model-id: 3C (60) stepping: 3 microcode: 28 cache: 
  L2: 8 MiB bogomips: 55892 
  Speed: 3869 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 3869 2: 3866 
  3: 3875 4: 3844 5: 3849 6: 3836 7: 3852 8: 3828 
  Flags: abm acpi aes aperfmperf apic arat arch_perfmon avx avx2 bmi1 bmi2 bts 
  clflush cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm 
  dts ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht 
  ibpb ibrs ida invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor 
  movbe msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb 
  pebs pge pln pni popcnt pse pse36 pti pts rdrand rdtscp rep_good sdbg sep 
  smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow 
  tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid xsave xsaveopt xtopology 
  xtpr 
  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 Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics 
  vendor: Gigabyte driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0412 
  class-ID: 0300 
  Device-2: NVIDIA GP104 [GeForce GTX 1070] vendor: eVga.com. driver: nvidia 
  v: 465.31 alternate: nouveau,nvidia_drm bus-ID: 03:00.0 chip-ID: 10de:1b81 
  class-ID: 0300 
  Device-3: NVIDIA GP104 [GeForce GTX 1070] vendor: eVga.com. driver: nvidia 
  v: 465.31 alternate: nouveau,nvidia_drm bus-ID: 04:00.0 chip-ID: 10de:1b81 
  class-ID: 0300 
  Display: x11 server: X.Org 1.20.11 driver: loaded: nvidia display-ID: :0.0 
  screens: 1 
  Screen-1: 0 s-res: 5760x2160 s-dpi: 96 s-size: 1524x572mm (60.0x22.5") 
  s-diag: 1628mm (64.1") 
  Monitor-1: DP-0 res: 3840x2160 hz: 60 dpi: 157 size: 621x341mm (24.4x13.4") 
  diag: 708mm (27.9") 
  Monitor-2: DP-2 res: 1920x1200 hz: 60 dpi: 305 size: 160x90mm (6.3x3.5") 
  diag: 184mm (7.2") 
  OpenGL: renderer: NVIDIA GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 465.31 
  direct render: Yes 
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio 
  driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c 
  class-ID: 0403 
  Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Gigabyte 
  driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20 
  class-ID: 0403 
  Device-3: SAVITECH JDS Labs Element DAC type: USB 
  driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-7:5 chip-ID: 262a:1048 
  class-ID: 0102 
  Sound Server-1: ALSA v: k5.10.42-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.30 running: no 
Network:
  Device-1: Intel Ethernet I217-V vendor: Gigabyte driver: e1000e v: kernel 
  port: f080 bus-ID: 00:19.0 chip-ID: 8086:153b class-ID: 0200 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel I210 Gigabit Network vendor: Gigabyte driver: igb v: kernel 
  port: e000 bus-ID: 05:00.0 chip-ID: 8086:1533 class-ID: 0200 
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  Device-3: Qualcomm Atheros AR9462 Wireless Network Adapter vendor: Lite-On 
  driver: ath9k v: kernel port: e000 bus-ID: 06:00.0 chip-ID: 168c:0034 
  class-ID: 0280 
  IF: wlp6s0 state: down mac: <filter> 
  WAN IP: <filter> 
Bluetooth:
  Message: No bluetooth data found. 
Logical:
  Permissions: Unable to run lvs. Root privileges required. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 7.97 TiB used: 3.46 TiB (43.5%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/sda maj-min: 8:0 vendor: Crucial model: CT240M500SSD1 
  size: 223.57 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: MU03 scheme: GPT 
  ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST2000DM001-1CH164 
  size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: CC27 scheme: GPT 
  ID-3: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST2000DM001-1CH164 
  size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: CC27 scheme: GPT 
  ID-4: /dev/sdd maj-min: 8:48 vendor: Samsung model: SSD 870 EVO 500GB 
  size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: 1B6Q scheme: MBR 
  ID-5: /dev/sde maj-min: 8:64 vendor: Seagate model: ST1000DX002-2DV162 
  size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: CC41 scheme: GPT 
  ID-6: /dev/sdf maj-min: 8:80 vendor: Seagate model: ST1000DX002-2DV162 
  size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: CC41 scheme: GPT 
  ID-7: /dev/sdg maj-min: 8:96 vendor: Seagate model: ST2000DM008-2FR102 
  size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 7200 rpm serial: <filter> rev: 0001 scheme: GPT 
  ID-8: /dev/sdl maj-min: 8:176 type: USB vendor: Generic model: USB3.0 CRW -3 
  size: 14.92 GiB block-size: physical: 512 B logical: 512 B serial: <filter> 
  rev: 1.00 scheme: MBR 
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: BD-RE BH16NS40 rev: 1.01 
  dev-links: cdrom 
  Features: speed: 48 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
Partition:
  ID-1: / raw-size: 465.76 GiB size: 457.45 GiB (98.22%) 
  used: 21.16 GiB (4.6%) fs: ext4 dev: /dev/sdd1 maj-min: 8:49 label: N/A 
  uuid: 869b105f-9307-4aad-9dac-da90d6af48d3 
  ID-2: /mnt/Data raw-size: 1.82 TiB size: 1.82 TiB (100.00%) 
  used: 1.04 TiB (57.3%) fs: fuseblk dev: /dev/sdg2 maj-min: 8:98 label: Data 
  uuid: 84DEAD6CDEAD5768 
  ID-3: /mnt/Music raw-size: 1.82 TiB size: 1.82 TiB (100.00%) 
  used: 888.54 GiB (47.7%) fs: fuseblk dev: /dev/sdb2 maj-min: 8:18 
  label: Music uuid: 5CA86C12A86BE94A 
  ID-4: /mnt/Video raw-size: 1.82 TiB size: 1.82 TiB (100.00%) 
  used: 1.53 TiB (84.3%) fs: fuseblk dev: /dev/sdc2 maj-min: 8:34 label: Video 
  uuid: 904874A548748BAA 
Swap:
  Alert: No swap data was found. 
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 100 MiB fs: fat (32 bit) label: N/A 
  uuid: 98DF-1DE6 
  ID-2: /dev/sda2 maj-min: 8:2 size: 128 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-3: /dev/sda3 maj-min: 8:3 size: 222.82 GiB fs: ntfs label: N/A 
  uuid: F2D0E400D0E3C8C5 
  ID-4: /dev/sda4 maj-min: 8:4 size: 531 MiB fs: ntfs label: N/A 
  uuid: 1C3EA0003E9FD15E 
  ID-5: /dev/sdb1 maj-min: 8:17 size: 128 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-6: /dev/sdc1 maj-min: 8:33 size: 128 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-7: /dev/sde1 maj-min: 8:65 size: 128 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-8: /dev/sde2 maj-min: 8:66 size: 931.39 GiB fs: ntfs label: Steam 
  uuid: 1C94F82594F7FF58 
  ID-9: /dev/sdf1 maj-min: 8:81 size: 128 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-10: /dev/sdf2 maj-min: 8:82 size: 931.39 GiB fs: ntfs label: Data2 
  uuid: 7232208F32205A7D 
  ID-11: /dev/sdg1 maj-min: 8:97 size: 16 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-12: /dev/sdl1 maj-min: 8:177 size: 256 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-13: /dev/sdl2 maj-min: 8:178 size: 1.49 GiB fs: ext2 label: p\xefotgw 
  uuid: 7295bbc3-bbc2-4267-9fa0-099e18ef5b70 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 
  speed: 480 Mb/s chip-ID: 8087:8008 class-ID: 0900 
  Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 8 rev: 2.0 
  speed: 480 Mb/s chip-ID: 8087:8000 class-ID: 0900 
  Hub-5: 3-0:1 info: Full speed (or root) Hub ports: 14 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 3-3:2 info: Alcor Micro Multi Flash Reader type: Mass Storage 
  driver: usb-storage interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 100mA 
  chip-ID: 058f:6366 class-ID: 0806 serial: <filter> 
  Device-2: 3-5:3 info: Logitech G502 SE HERO Gaming Mouse type: Mouse,HID 
  driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  power: 300mA chip-ID: 046d:c08b class-ID: 0300 serial: <filter> 
  Device-3: 3-6:4 info: Holtek USB Keyboard type: Keyboard,Mouse 
  driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s 
  power: 100mA chip-ID: 04d9:0169 class-ID: 0301 
  Device-4: 3-7:5 info: SAVITECH JDS Labs Element DAC type: HID,Audio 
  driver: hid-generic,snd-usb-audio,usbhid interfaces: 3 rev: 1.1 
  speed: 12 Mb/s power: 94mA chip-ID: 262a:1048 class-ID: 0102 
  Hub-6: 3-9:10 info: Hitachi ports: 4 rev: 2.1 speed: 480 Mb/s 
  chip-ID: 045b:0209 class-ID: 0900 
  Hub-7: 3-10:11 info: Hitachi ports: 4 rev: 2.1 speed: 480 Mb/s 
  chip-ID: 045b:0209 class-ID: 0900 
  Device-1: 3-13:12 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID 
  driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s 
  power: 98mA chip-ID: 046d:c52b class-ID: 0300 
  Device-2: 3-14:15 
  info: Transcend Information microSD/SD/CF UHS-II Card Reader [RDF8 RDF9] 
  type: Mass Storage driver: usb-storage interfaces: 1 rev: 2.1 
  speed: 480 Mb/s power: 500mA chip-ID: 8564:4000 class-ID: 0806 
  serial: <filter> 
  Hub-8: 4-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-9: 4-5:2 info: Hitachi ports: 4 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 045b:0210 class-ID: 0900 
  Hub-10: 4-6:3 info: Hitachi ports: 4 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 045b:0210 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: nvidia temp: 56 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 16% 
Info:
  Processes: 308 Uptime: 21h 02m wakeups: 0 Init: systemd v: 248 
  tool: systemctl Compilers: gcc: N/A Packages: 1198 pacman: 1192 lib: 398 
  flatpak: 0 snap: 6 Shell: Bash v: 5.1.8 running-in: xfce4-terminal 
  inxi: 3.3.04 

nvidia.conf output:

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


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
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      "Ancor Communications Inc ASUS PB287Q"
    HorizSync       24.0 - 160.0
    VertRefresh     30.0 - 80.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1070"
    BusID          "PCI:4:0:0"
EndSection

Section "Screen"

# Removed Option "metamodes" "HDMI-0: 1920x1200_60 +3840+0, DP-0: 3840x2160_60 +0+905"
# Removed Option "metamodes" "DP-0: nvidia-auto-select +0+884, DP-2: nvidia-auto-select +3840+0"
# Removed Option "metamodes" "DP-0: 3840x2160_60 +0+0, DP-2: 1920x1200_60 +3840+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "DP-0: nvidia-auto-select +0+0, DP-2: nvidia-auto-select +3840+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

This /etc/X11/mhwd.d/nvidia.conf should work

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"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Ancor Communications Inc ASUS PB287Q"
    HorizSync       24.0 - 160.0
    VertRefresh     30.0 - 80.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1070"
    BusID          "PCI:4:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DP-0: 3840x2160_60 +0+0, DP-2: 1920x1200_60 +3840+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

but before you reboot, delete the file displays.xml

rm ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml

Thanks for the suggestion. Updated config installed/rebooted without issue (incl. removing display.xml noted), and displays correctly on logon however original issue reoccurs following display standby/sleep.

Did you noticed a difference in that file, before sleep and after wake from sleep ? If it gets modified that means the wake up protocol simply ignores the xorg config and initializes the monitors in different order and ends up with them overleaping … but at this point i have no idea what to suggest :man_shrugging: