External monitor (primary) behind laptop freezes frequently

hi.

after resent upgrade, my manjaro gnome started experiencing this issue.

i would be very thankful, if anyone could help me with this issue. here are my specs:

OS: Manjaro Linux x86_64 
Host: GF65 Thin 10SDR REV:1.0 
Kernel: 6.1.7-1-MANJARO 
Uptime: 3 hours, 5 mins 
Packages: 1705 (pacman) 
Shell: zsh 5.9 
Resolution: 1920x1080 @ 144.15Hz, 1920x1080 @ 143.98Hz 
DE: GNOME 43.2 
WM: Mutter 
WM Theme: Matcha-sea 
Theme: Matcha-light-sea [GTK2/3] 
Icons: Papirus-Maia [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i7-10750H (12) @ 5.000GHz 
GPU: NVIDIA GeForce GTX 1660 Ti Mobile 
Memory: 14.66GiB / 31.17GiB 
Disk (/): 35G / 48G (77%) 
Disk (home): 71G / 420G (18%) 
Disk (disk): 500G / 916G (58%) 

i got dual GPU on my laptop! integrated and nvidia.

if i change the display settings from my laptop, i get the primary to unfreeze. also re-plugging the monitor cable helps. sometimes it freezes for few seconds, sometimes completely. i have no idea, how to debug it.

i was using kernel 5.15 and upgraded to latest to see if this fixes the problem.

i’ll provide more information as you ask!

We’ll need a little more information than that.

Please see:

what type of information you need? i’ll gladly provide additional information. i am just a simple user. do not know how to dig any deeper.

First of all your full system information as described in the link I already provided:

The wiki and tutorials are there for a reason. Please read them. If you have any questions, feel free to ask.

tnx! here is the requested information

System:
  Kernel: 6.1.7-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=1edf72db-d3e8-47d1-9201-a5cfa27e1efb rw quiet
    udev.log_priority=3
  Desktop: GNOME v: 43.2 tk: GTK v: 3.24.36 wm: gnome-shell dm: GDM v: 43.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Micro-Star product: GF65 Thin 10SDR v: REV:1.0
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Micro-Star model: MS-16W1 v: REV:1.0 serial: <superuser required>
    UEFI: American Megatrends v: E16W1IMS.50B date: 05/19/2020
Battery:
  ID-1: BAT1 charge: 50.7 Wh (100.0%) condition: 50.7/51.3 Wh (98.9%)
    volts: 12.8 min: 11.4 model: MSI Corp. MS-16W1 type: Li-ion serial: N/A
    status: full
  Device-1: hidpp_battery_0 model: Logitech MX Keys Wireless Keyboard
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
  Device-2: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
Memory:
  RAM: total: 31.17 GiB used: 3.19 GiB (10.2%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-10750H bits: 64 type: MT MCP arch: Comet Lake
    gen: core 10 level: v3 note: check built: 2020 process: Intel 14nm family: 6
    model-id: 0xA5 (165) stepping: 2 microcode: 0xF4
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 2000 high: 2600 min/max: 800/5000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 2600 2: 2600 3: 800
    4: 2600 5: 2600 6: 800 7: 2600 8: 800 9: 2600 10: 2600 11: 800 12: 2600
    bogomips: 62431
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs
    ibrs_enhanced ida intel_pt invpcid invpcid_single lahf_lm lm mca mce
    md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx ospke pae pat
    pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts
    rdrand rdseed rdtscp rep_good sdbg sep smap 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 x2apic xgetbv1 xsave xsavec xsaveopt
    xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Micro-Star MSI
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:9bc4
    class-ID: 0300
  Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] vendor: Micro-Star MSI
    driver: nvidia v: 525.85.05 alternate: nouveau,nvidia_drm non-free: 525.xx+
    status: current (as of 2022-12) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-22 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:2191
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.6 with: Xwayland v: 22.1.7
    compositor: gnome-shell driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa dri: iris gpu: i915 display-ID: :1
    screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x286mm (40.00x11.26")
    s-diag: 1055mm (41.55")
  Monitor-1: HDMI-1-0 pos: primary,left res: 1920x1080 hz: 144 dpi: 93
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A
  Monitor-2: eDP-1 pos: right res: 1920x1080 hz: 144 dpi: 142
    size: 344x193mm (13.54x7.6") diag: 394mm (15.53") modes: N/A
  API: OpenGL v: 4.6 Mesa 22.3.3 renderer: Mesa Intel UHD Graphics (CML GT2)
    direct render: Yes
Audio:
  Device-1: Intel Comet Lake PCH cAVS vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:06c8 class-ID: 0403
  Sound API: ALSA v: k6.1.7-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.64 running: yes
Network:
  Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:06f0 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: down mac: <filter>
  IF-ID-1: br-28fa11b00737 state: up speed: 10000 Mbps duplex: unknown
    mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  IP v6: <filter> scope: link
  IF-ID-2: docker0 state: down mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  IF-ID-3: veth2f20346 state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-4: veth7e9f65e state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-5: vethd13a04e state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-6: vethded97e3 state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-7: vetheb85bf0 state: up speed: 10000 Mbps duplex: full mac: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-14:5
    chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
  Device-1: luks-cab6c7fd-4b0a-4197-8b19-d8f2119cc7e4 maj-min: 254:0
    type: LUKS dm: dm-0 size: 427.62 GiB
  Components:
  p-1: nvme1n1p3 maj-min: 259:4 size: 427.62 GiB
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 1.38 TiB used: 605.28 GiB (43.0%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:1 vendor: Samsung
    model: SSD 970 EVO Plus 1TB size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 3B2QEXM7 temp: 33.9 C
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Western Digital model: PC SN530
    SDBPNPZ-512G-1032 size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 21111000 temp: 34.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 48.83 GiB size: 47.76 GiB (97.81%) used: 34.89 GiB (73.1%)
    fs: ext4 dev: /dev/nvme1n1p2 maj-min: 259:3 label: N/A
    uuid: 1edf72db-d3e8-47d1-9201-a5cfa27e1efb
  ID-2: /boot/efi raw-size: 500 MiB size: 499 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:2
    label: NO_LABEL uuid: 3ED8-9B8B
  ID-3: /disk raw-size: 931.51 GiB size: 915.82 GiB (98.31%)
    used: 499.82 GiB (54.6%) fs: ext4 dev: /dev/nvme0n1 maj-min: 259:1
    label: disk uuid: fd9709f4-de6f-4289-b2e3-61b5ac58233e
  ID-4: /home raw-size: 427.62 GiB size: 419.83 GiB (98.18%)
    used: 70.57 GiB (16.8%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-cab6c7fd-4b0a-4197-8b19-d8f2119cc7e4 label: N/A
    uuid: a62fb052-0601-468e-81d4-1fd028bc804b
Swap:
  Alert: No swap data was found.
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-2:2 info: Genesys Logic Hub ports: 4 rev: 2.1 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0610 class-ID: 0900
  Device-1: 1-3:3 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: 1-4:4 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-3: 1-14:5 info: Intel AX201 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0026
    class-ID: e001
  Hub-3: 2-0:1 info: Super-speed hub ports: 8 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-4: 2-2:2 info: Genesys Logic Hub ports: 4 rev: 3.2 speed: 5 Gb/s
    chip-ID: 05e3:0626 class-ID: 0900
Sensors:
  System Temperatures: cpu: 44.0 C pch: 51.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 375 Uptime: 2m wakeups: 5 Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 1705 libs: 476 tools: gnome-software,pamac,yay pm: flatpak pkgs: 0
  Shell: Zsh v: 5.9 running-in: gnome-terminal inxi: 3.3.24
e[1me[31m> e[m0000:01:00.0 (0300:10de:2191) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
          video-nvidia            2021.11.04               false            PCI
    video-nvidia-470xx            2021.11.04               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


e[1me[31m> e[m0000:04:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


e[1me[31m> e[m0000:00:02.0 (0300:8086:9bc4) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.11.04               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI
e[32mCurrently running:e[0m 6.1.7-1-MANJARO (linux61)
The following kernels are installed in your system:
   * linux510
   * linux515
   * linux61
ManjaroLinux 22.0.1 Sikaris

It appears the proper drivers are installed.

Change the display settings how?

Maybe your Xorg log could provide more details.

Run this command to upload it to 0x0.st and paste the generated link here:

curl -F 'file=@-' 0x0.st < ~/.local/share/xorg/Xorg.0.log

i have a file Xorg.1.log → http://0x0.st/oFqQ.txt

here’s a journal → http://0x0.st/oFqe.txt

also i noticed, that nvidia.conf is empty

➜  xorg cat /etc/X11/mhwd.d/nvidia.conf 
##
## Generated by mhwd - Manjaro Hardware Detection
##
 
 
➜  xorg 

edit: by changing the display setting i mean putting monitors in mirror mode and/or change the primary monitor. that usually unfreezes the primary external monitor.

That’s normal with hybrid graphics.

Close, but no cigar. Notice I said the Xorg.0.log. :wink:

However, since you posted your boot log, it’s printed there as well. :+1:

Not sure what’s happening, but this looks a bit suspect:

jaan  26 00:25:09 laptop /usr/lib/gdm-x-session[1524]: (WW) NVIDIA(G0): Failed to set the display configuration
jaan  26 00:25:09 laptop /usr/lib/gdm-x-session[1524]: (WW) NVIDIA(G0):  - Setting a mode on head 0 failed: Insufficient permissions
jaan  26 00:25:09 laptop /usr/lib/gdm-x-session[1524]: (WW) NVIDIA(G0):  - Setting a mode on head 1 failed: Insufficient permissions
jaan  26 00:25:09 laptop /usr/lib/gdm-x-session[1524]: (WW) NVIDIA(G0):  - Setting a mode on head 2 failed: Insufficient permissions
jaan  26 00:25:09 laptop /usr/lib/gdm-x-session[1524]: (WW) NVIDIA(G0):  - Setting a mode on head 3 failed: Insufficient permissions
jaan  26 00:25:11 laptop /usr/lib/gdm-x-session[3737]: (II) event11 - Logitech MX Master 3: SYN_DROPPED event - some input events have been lost.
jaan  26 00:25:11 laptop kernel: nvidia-modeset: ERROR: GPU:0: Idling display engine timed out: 0x0000c57e:0:0:1128
jaan  26 00:25:11 laptop /usr/lib/gdm-x-session[1524]: (II) NVIDIA(GPU-0): Deleting GPU-0
jaan  26 00:25:11 laptop /usr/lib/gdm-x-session[1524]: (II) Server terminated successfully (0). Closing log file.
jaan  26 00:25:11 laptop gnome-session-f[4276]: Cannot open display: 

It detects it properly after you do your fiddling as you mentioned, but I’m a bit stumped why it’s happening. Perhaps someone else has an idea.

Xorg.0.log file does not exist

It does, but for some reason it did not write it to ~/.local/share/xorg/. It’s in /var/log/:

jaan  26 00:24:47 laptop /usr/lib/gdm-x-session[1524]: (--) Log file renamed from "/var/log/Xorg.pid-1524.log" to "/var/log/Xorg.0.log"

i hope someone helps me out here or i have to do a reinstall (hopefully it works), but linux should be flexible enough to fix problems.

there’s more of a mulder and scully going on. this morning external primary monitor was switched off from display settings. i am 110% sure i did not do that last night!

anyone?

edit: this might be related External display hangs or freezes regularly when Chrome with hardware acceleration is open on reverse PRIME setup - Linux - NVIDIA Developer Forums

i think disabling google chrome chrome’s hardware acceleration (read the nvidia forum topic) fixed the majority of the issue. no more freezing of the external monitor while working. but somehow gnome will not let me move the external monitor to the left in display settings. when i try to do this, the monitor will freeze.

any feedback is much appriciated!

came across this thread since I think I have the same issue on Ubuntu 22.04, I posted a question titled “External displays freezing” on askubuntu as well (I’m not allowed to post links). Did you make any progress?