Xrandr doesn't detect my internal laptop monitor

Hi, I have installed nvidia-dkms and when I run xrandr it can detect my HDMI(externam monitro) that is connected, but it doesn’t detect my laptop monitor (it doesn’t even list it). now my laptop is blank screen my mouse can go over there, what’s the problem?

my laptop model Asus G531GW
my xorg log file: https://pastebin.com/g7JaD8gy

xrandr | grep connect https://pastebin.com/me8QSfiC

lspci -v | grep -A1 -e VGA -e 3D https://pastebin.com/pbnCL36A

My grub options: GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=a614f924-e309-4f67-b89f-3cb1b763a79b loglevel=3 nowatchdog nvidia-drm.modeset=1 i915.enable_psr=0"

my /etc/X11/xorg.conf file: https://pastebin.com/estFFaRB

my /usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf file: https://pastebin.com/1bVsgrsq

If I remove my xorg.conf file, then I can’t login in my desktop environment at all.
Please help me about configuring nvidia and intel correct, which packages should I install, which files should I remove or reconfig, and what’s an ideal installation of nvidia and intel together for 2 monitors on a laptop, with nvidia 2070.
thank you so much!
UPDATE: my xrandr output: (there is no eDP-1 listed)

Screen 0: minimum 8 x 8, current 2560 x 1080, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 2560x1080+0+0 (normal left inverted right x axis y axis) 677mm x 290mm
   2560x1080     60.00*+
   1920x1080     60.00    59.94    50.00    29.97  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93 

whats the model of the laptop?

edit: mayby you can check https://wiki.archlinux.org/title/NVIDIA/Troubleshooting#xrandr_BadMatch

model of laptop: ASUS G531GW

Was everything running fine without nvidia?

Who created this file and why? It is not created by default AFAIK.

Why did you add this kernel param? Describe your issue it solved.
Remove it and test if your current issue has some change.

Intel Tips

Not true. This is a filtered part. Post the complete file.

240 Hz screen? :thinking:

  1. without nvidia, yes it’s fine but as I want to play games too, then I need nvidia
  2. I created xorg.conf file, because after I installed nvidia, without a manual xorg.conf file, it didn’t work, and even using X or nvidia-xconfig it didn’t work.
  3. now I removed i915.enable_psr=0 and still it doesn’t work.
  4. the full xorg log file: https://pastebin.com/u4Ay4PX4

The question is does it actual use Nvidia then? How do you switch from Intel?

inxi -Ga

inxi -Ga:

  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK
    driver: i915 v: kernel ports: active: eDP-1 empty: none bus-ID: 00:02.0
    chip-ID: 8086:3e9b class-ID: 0300
  Device-2: NVIDIA TU106M [GeForce RTX 2070 Mobile] vendor: ASUSTeK
    driver: nvidia v: 510.60.02 alternate: nouveau,nvidia_drm pcie: gen: 1
    speed: 2.5 GT/s lanes: 8 link-max: gen: 3 speed: 8 GT/s lanes: 16 ports:
    active: none off: HDMI-A-1 empty: DP-1 bus-ID: 01:00.0 chip-ID: 10de:1f10
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1
    compositor: gnome-shell v: 42.0 driver: X: loaded: intel,nvidia
    gpu: i915,nvidia,nvidia-nvswitch display-ID: :0 screens: 2
    default screen: 0
  Screen-1: 0 s-res: 2560x1080 s-dpi: 97 s-size: 670x283mm (26.38x11.14")
    s-diag: 727mm (28.63")
  Monitor-1: HDMI-0 res: 2560x1080 hz: 60 dpi: 96
    size: 677x290mm (26.65x11.42") diag: 736mm (29") modes: N/A Screen: 1
    s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Screen-2: 0 s-res: 2560x1080 s-size: <missing: xdpyinfo>
  Monitor-1: HDMI-0 res: 2560x1080 hz: 60 dpi: 96
    size: 677x290mm (26.65x11.42") diag: 736mm (29") modes: N/A
  OpenGL: renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.60.02 direct render: Yes

Yes it’s using nvidia right now, but one of my monitors works, the other one is blank(a black screen, my mouse can goes there but nothing is there). I’m Ok to use just nvidia for both monitors, I don’t know how to do that, it seems I have to reconfig my xorg.conf file so that it can detect my laptop monitor, but I don’t know which settings should I do.

Have you looked at this?

https://wiki.archlinux.org/title/multihead#Configuration_using_xorg.conf

Yes, the problem is that xrandr -q doesn’t list my laptop monitor, it only lists the HDMI one :frowning:

Does it recognize it if the other monitor is not hooked up?

No, if I detach HDMI cable, my laptop monitor is still a black screen.

Okay? But it’s still running on Nvidia? How do you switch from Intel to Nvidia and back? Maybe the laptop monitor only runs on Intel when switched to Nvidia because when it’s on nvidia it outputs to the other monitor whether it’s plugged in or not maybe? I don’t know how the hardware works on this laptop.

I don’t know either :sweat_smile: I just read some arch wiki about xorg.conf and tried to make one, I don’t switch from intel to nvidia or vice versa
at the moment I just want to use 2 monitors or turn off the laptop monitor (becuase it’s turned on with a black screen).
is there a way to use just nvidia for both laptop and HDMI monitor? should I reconfig xorg for such aim? if yes how?

xorg configuration is in /etc/X11/xorg.conf.d/

example 20-nvidia.conf

you are right, but there I have just keyboard and healess configs, my video and some of input devices configs are at /etc/X11/xorg.conf right now

I changed the xorg.conf file, in section “ServerLayout”, I commented this line:
#Screen 1 "laptop" RightOf "lg" and now my laptop monitor turned off(instead of being black screen), but still xrandr can’t detect my laptop monitor at all.

Disclaimer: It’s been a long time since I stopped playing with xorg files, and I don’t intend to start RTFMing on them again. Feel free to do it. It adds to your knowledge! :smile:

Having little or no experience with xorg conf files, you should be lucky to not fail in such complicated (for Xorg) setup. Copy/paste helps but not always gives the expected result.

In short, your custom xorg file is the one that creates the original issue (laptop monitor not detected). On this, if you are lucky, you may get your monitor if you change the name used in the conf file:

Option "Monitor-eDP0"
# to
Option "Monitor-eDP1"

You can try one of these, in order of my preference for best case:

  • Disable Hybrid and enable dGPU only in BIOS, if a similar setup is possible.
  • Install and use optimus-switch or optimus-manager and setup to only use nvidia (with their relevant instructions)
  • IIRC Archwiki has instructions how to disable a gpu completely, although it’s a rough action and I don’t recommend it

Xorg and/or nvidia (xconfig) should not normally have any conf file at all at /etc/X11/xorg.conf.d/*.conf. Everything is designed/configured from upstream Arch to be automatic, which is successful in the majority of HW/SW cases.
You should delete /etc/X11/xorg.conf and never use it again. It is a fallback and overrides all other config, so when it has a wrong or extra setting, it breaks Xorg in an ugly way. Use the path mentioned above.

I suggest you start clean.
Delete(backup) your conf file and reboot.
Get into BIOS and try to make it dGPU only.
In whatever option is chosen, you should have at least one monitor to work with.
If it fails to light up the monitor, post the new Xorg log, so we can see what is wrong.

Before starting, post

inxi -SMGaz
pacman -Qs nvidia
ls /etc/modules-load.d/ 2>/dev/null
ls /etc/modprobe.d/ 2>/dev/null
systemctl status display-manager

Good luck! :slightly_smiling_face:

2 Likes

OK! You have to co-operate contribute a little bit…
Marking solved is not enough for the community.
Future readers would benefit with your info.

Please, be so kind and explain what exactly you have done and fixed your system.
It’s the least you could do to thank the community. :person_shrugging:

3 Likes

Yes you right, sorry for delay :slight_smile:
I just edited xorg.conf file and changed the

Option "Monitor-eDP0"
# to
Option "Monitor-eDP1"

and after a restart, now it can detect my laptop monitor as well, (I just realized that). now everything is working so well.
I can share my final xorg.conf file for others, maybe it helps as an example:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "lg" 0 0
    #Screen      1  "laptop" RightOf "lg"
    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"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "hdmi"
    VendorName     "Unknown"
    ModelName      "LG Electronics LG ULTRAWIDE"
    Option "Primary" "true"
    HorizSync       30.0 - 90.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier	"asus"
    Option "Primary" "false"
EndSection

Section "Device"
    Identifier	"intel"
    Driver	"intel"
    BusID	"PCI:00:02:0"
    Option	"Monitor-eDP1" "asus"
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 2070"
    BusID          "PCI:01:00:0"
    Option	"Monitor-HDMI0" "hdmi"
EndSection

Section "Screen"
    Identifier     "laptop"
    Device         "intel"
    Monitor        "asus"
    SubSection "Display"
    Modes      "1920x1080"
    EndSubSection
EndSection


Section "Screen"
    Identifier     "lg"
    Device         "nvidia"
    Monitor        "hdmi"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "2560x1080_60 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
        Modes      "2560x1080"    
    EndSubSection
EndSection

Thank you again for all the helps!

2 Likes