Second monitor not detected

Hello everyone,

I’m writing to you because I’m having trouble with my screen. I’m on a laptop, and when I plug in an external screen it’s not detected:

$ xrandr
Screen 0: minimum 16 x 16, current 3072 x 1920, maximum 32767 x 32767
eDP-1 connected primary 3072x1920+0+0 (normal left inverted right x axis y axis) 340mm x 220mm
   3072x1920     59.99*+
   2048x1536     59.95  
   1920x1440     59.97  
   1600x1200     59.87  
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.52  
   2560x1600     59.99  
   1920x1200     59.88  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.97  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.90  
   720x480       59.71  
   640x400       59.95  
   320x200       58.96  
   2880x1620     59.96  
   2560x1440     59.96  
   2048x1152     59.90  
   1920x1080     59.96  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.55  
   640x350       59.77 

I tried reinstalling the nvidia drivers and testing different ones, but nothing worked…

I’m convinced it works because I have no problem using this screen when I log on with my Windows session.

$ sudo mhwd                                                                                                          ✔ 
[sudo] Mot de passe de leom : 
> 0000:01:00.0 (0300:10de:2520) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
          video-nvidia            2023.03.23               false            PCI
    video-nvidia-470xx            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:00:02.0 (0300:8086:46a6) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

$ inxi -Fxxz                                                                                                  ✔  7s  
System:
  Kernel: 6.1.31-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    Desktop: GNOME v: 44.1 tk: GTK v: 3.24.37 wm: gnome-shell dm: GDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Inspiron 16 Plus 7620 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0V98G2 v: A00 serial: <superuser required> UEFI: Dell
    v: 1.11.0 date: 03/14/2023
Battery:
  ID-1: BAT0 charge: 78.6 Wh (100.0%) condition: 78.6/84.3 Wh (93.2%)
    volts: 12.9 min: 11.4 model: BYD DELL M59JH25 serial: <filter> status: full
CPU:
  Info: 14-core (6-mt/8-st) model: 12th Gen Intel Core i7-12700H bits: 64
    type: MST AMCP arch: Alder Lake rev: 3 cache: L1: 1.2 MiB L2: 11.5 MiB
    L3: 24 MiB
  Speed (MHz): avg: 2587 high: 2700 min/max: 400/4600:4700:3500 cores:
    1: 2700 2: 2700 3: 2700 4: 2700 5: 2700 6: 2700 7: 2700 8: 2700 9: 2700
    10: 2700 11: 2700 12: 2700 13: 446 14: 2700 15: 2700 16: 2700 17: 2700
    18: 2700 19: 2700 20: 2700 bogomips: 107560
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics vendor: Dell driver: i915
    v: kernel arch: Gen-12.2 ports: active: eDP-1 empty: DP-1,DP-2,HDMI-A-1
    bus-ID: 0000:00:02.0 chip-ID: 8086:46a6
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Dell
    driver: nvidia v: 530.41.03 arch: Ampere bus-ID: 0000:01:00.0
    chip-ID: 10de:2520
  Device-3: Microdia Integrated_Webcam_FHD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-6:4 chip-ID: 0c45:6739
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.1
    compositor: gnome-shell driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa dri: iris gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: BOE Display 0x09d5 res: 3072x1920 dpi: 226
    diag: 407mm (16")
  API: OpenGL v: 4.6 Mesa 23.0.4 renderer: Mesa Intel Graphics (ADL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl bus-ID: 0000:00:1f.3 chip-ID: 8086:51c8
  Device-2: NVIDIA GA106 High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 0000:01:00.1 chip-ID: 10de:228e
  API: ALSA v: k6.1.31-2-MANJARO status: kernel-api with: aoss
    type: oss-emulator
  Server-1: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin 4: pw-jack type: plugin
Network:
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 0000:00:14.3 chip-ID: 8086:51f0
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s
    lanes: 1 bus-ID: 1-10:5 chip-ID: 8087:0033
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 bus-ID: 0000:00:0e.0 chip-ID: 8086:467f
Drives:
  Local Storage: total: 953.87 GiB used: 228.58 GiB (24.0%)
  ID-1: /dev/nvme0n1 vendor: KIOXIA model: KBG50ZNS1T02 NVMe 1024GB
    size: 953.87 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 48.9 C
Partition:
  ID-1: / size: 335.36 GiB used: 37.53 GiB (11.2%) fs: ext4
    dev: /dev/nvme0n1p8
  ID-2: /boot/efi size: 511 MiB used: 332 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p7
  ID-3: /home size: 385.77 GiB used: 191.04 GiB (49.5%) fs: ext4
    dev: /dev/nvme0n1p9
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 44.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 386 Uptime: 15m Memory: available: 31.04 GiB
  used: 4.38 GiB (14.1%) Init: systemd v: 253 default: graphical Compilers:
  gcc: 13.1.1 clang: 15.0.7 Packages: 1462 pm: pacman pkgs: 1439 pm: flatpak
  pkgs: 11 pm: snap pkgs: 12 Shell: Zsh v: 5.9 running-in: gnome-terminal
  inxi: 3.3.27

Does anyone have any tips for me? Thanks in advance for your help!

Léo

Have you tried an X11 session? (On the login screen, click the gear icon in the bottom right corner, and select “GNOME on Xorg”.)

It’s weird, I can’t. I enter my password and immediately return to the login screen… It won’t open the desktop in Xorg mode

That’s definitely not how it should be. You could check the log files in ~/.local/share/xorg and
journalctl -b0 --user-unit org.gnome.Shell@x11.service --user-unit gnome-session-manager@gnome.service

It felt like it was discussed 1 million times here and also on the big wide internet. In order to use the monitor output of the Nvidia graphics card on a hybrid system with Intel/Amd + Nvidia, you have to switch to the Nvidia driver. See optimus-manager or envycontrol, or create your own Xorg configuration. This is a limitation of the proprietary Nvidia driver, which is not compatible with open source drivers here, to put it bluntly.

See the “hybrid” mode of optimus-manager, for example; that won’t entirely switch over to the nvidia gpu, in fact, all rendering will still be done on the integrated gpu. Also, I am not sure that external monitors shouldn’t work on Wayland out of the box.

They are not using the open source drivers, are they?

I must correct myself. GDM still disables the wayland session when a hybrid configuration is detected. I thought this had changed since the last time I checked.

@LeoVitorino But then I wonder how you could log into the wayland session in the first place.

What you call hybrid is just the default setup. It runs on the iGPU, and you can switch GLX to Nvidia on demand, but you don’t have access to the monitor port of the nvidia card here.

No, it won’t work since nvidia doesn’t run with KMS by default.

nvidia → modesetting = nvidia output available :white_check_mark:
modesetting → nvidia = nvidia output unavailable :x:

The reason is simply that:

The NVIDIA DRM KMS implementation does not yet register an overlay plane: only primary and cursor planes are currently provided.
Chapter 36. Direct Rendering Manager Kernel Modesetting (DRM KMS)

I am pretty sure external monitors work in hybrid mode. I have used external monitors multiple times myself in the “hybrid” mode.

Hi,

This is the log i got :

juin 17 09:48:16 Rincevent systemd[1630]: Starting GNOME Session Manager (session: gnome)...
juin 17 09:48:16 Rincevent gnome-session[1703]: gnome-session-binary[1703]: WARNING: Desktop file /home/leom/.config/autostart/li>
juin 17 09:48:16 Rincevent gnome-session-binary[1703]: WARNING: Desktop file /home/leom/.config/autostart/libinput-gestures.deskt>
juin 17 09:48:16 Rincevent gnome-session[1703]: gnome-session-binary[1703]: WARNING: Desktop file /home/leom/.config/autostart/ma>
juin 17 09:48:16 Rincevent gnome-session-binary[1703]: WARNING: Desktop file /home/leom/.config/autostart/manjaro-app-folder-sett>
juin 17 09:48:16 Rincevent gnome-keyring-pkcs11.desktop[1721]: discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/1000/keyri>
juin 17 09:48:16 Rincevent gnome-keyring-daemon[1721]: discover_other_daemon: 1
juin 17 09:48:16 Rincevent gnome-session[1703]: gnome-session-binary[1703]: GnomeDesktop-WARNING: Could not create transient scop>
juin 17 09:48:16 Rincevent gnome-session-binary[1703]: GnomeDesktop-WARNING: Could not create transient scope for PID 1716: GDBus>
juin 17 09:48:16 Rincevent gnome-keyring-ssh.desktop[1722]: discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/1000/keyring
juin 17 09:48:16 Rincevent gnome-keyring-ssh.desktop[1722]: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
juin 17 09:48:16 Rincevent gnome-keyring-daemon[1722]: discover_other_daemon: 1
juin 17 09:48:16 Rincevent gnome-keyring-secrets.desktop[1723]: discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/1000/keyr>
juin 17 09:48:16 Rincevent gnome-keyring-secrets.desktop[1723]: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
juin 17 09:48:16 Rincevent gnome-keyring-daemon[1723]: discover_other_daemon: 1
juin 17 09:48:16 Rincevent systemd[1630]: Started GNOME Session Manager (session: gnome).
juin 17 09:48:16 Rincevent systemd[1630]: Starting GNOME Shell on X11...
juin 17 09:48:16 Rincevent systemd[1630]: org.gnome.Shell@x11.service: Skipped due to 'exec-condition'.
juin 17 09:48:16 Rincevent systemd[1630]: Condition check resulted in GNOME Shell on X11 being skipped.
juin 17 09:48:18 Rincevent gnome-session-binary[1703]: Entering running state
juin 17 09:48:18 Rincevent gnome-session[1703]: gnome-session-binary[1703]: GnomeDesktop-WARNING: Could not create transient scop>
juin 17 09:48:18 Rincevent gnome-session-binary[1703]: GnomeDesktop-WARNING: Could not create transient scope for PID 2197: GDBus>

you’ve switched to X11-session and nvidia-gpu as adviced ?
please post the output of

echo $XDG_SESSION_TYPE

and

glxinfo | grep server

you’ll need to install the package “mesa-utils” if glxinfo isn’t avaiable

Hi @Olli ,

I can’t switch to X11-session, Every time I try, I immediately go back to the login screen…

I confirm that I’m on a wayland session. And the output of glxinfo | grep server is :

server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:

thank you for your help !

Léo

i’m not an expert at gnome while using plasma but as far as i know a config entry should be defined at gnome.
please try this

cat /etc/gdm/custom.conf

does it exist ?
then reuse it and search for Wayland

cat /etc/gdm/custom.conf | grep Way

what is displayed ?

For your first command, this is what i got :

# GDM configuration storage

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
#Enable=true

Isn’t that weird?

we’ll that’s okay and as you can see you’ll have to uncomment the line

#WaylandEnable=false

to

WaylandEnable=false

you’ll need to edit with sudo rights. kate is a good choice.
after editing and succesful saving please post the output of

cat /etc/gdm/custom.conf

again. please post if you did it

OK, I changed it, but now I can’t start manjaro (I can’t reach the log screen) … I think I’ve to reinstall completely manjaro…

can you login at console with ctrl-alt-F5 ?
also turn on the second display at boot.

Yes I can access to the console!

please login at console and use

sudo systemctl restart gdm

any error messages, booting. please report what happens

I still have a black screen, just a “_” on the top left side

So I revert the changes and now I can go again on the connexion screen