2

I have a situation with RHEL 7.9 and an RTX 2070 in an Alienware M15 that I haven't made much progress on lately. I downloaded the latest compatible driver from Nvidia (file name: NVIDIA-Linux-x86_64-510.60.02.run), blacklisted the nouveau driver, and then dropped to init level 3, and successfully installed the driver (lsmod shows it is loaded). But during the guided prompts in the install process it asks if you want it to build an xorg.conf file for you and I selected "yes" but it essentially is non-functional, and would only get so far upon a reboot with displaying the RHEL 7 gray wallpaper but never load the rest of X11 / GDM. The logs showed why.

>>Nvidia Driver Loads but Xorg finds no Available Screens<<

The Xorg logs have shown that it is attempting to enumerate various output screen devices like DP-0, -1, -2, etc. (apparently in xorg speak DP (or DFP) = digital flat panel screens) but is failing to connect and then it eventually stops or fails to load X. Since the X11 boot screen would hang at displaying the RHEL 7 wallpaper, I've been having to interact with the OS in one of the alternate text terminals (<Ctrl><Alt><Fn> (n=1..6)) and I discovered X11 was not actually running (despite something graphical being on terminal 1) when xrandr kept erroring saying it couldn't connect to anything.

After much googling about how to build xorg.conf files from scratch I tried building a config file specifying the BusID for the RTX 2070 card and specified the nvidia driver, but got the same "blank screen" (wall paper only) result.

So (following a troubleshooting thread I found online) I deleted my xorg.conf, ran startx (I wasn't expecting this to work, but miraculously I finally got a full desktop!), then could run xrandr to see the DP and other monitors attached. I finally saw the screen ID for the local laptop screen (see below).

(Quick note: The Alienware M15 does have a built-in Intel card which I believe it is using the driver for to display that though, so this is not a success for working with the nvidia driver.)

>>What I'm Looking For<<

Here's a sneak peek of where I'm going with this question: How do I specify specific monitors I've detected with xrandr in xorg.conf?

So here's the thing. This is a laptop and I wasn't intending on hooking it up initially to an external monitor. With a desktop GUI up and running xrandr a new device that had not so much as been named or detected in the Xorg logs prior called eDP-1 (note the additional e prefix) apparently is the name for the local laptop screen.

In addition, today I decided to hook it up to an external HDMI screen and xrandr showed its device name as well. So here is my question: Armed with this information from xrandr, how do I build my xorg.conf to use those screen and use the nvidia driver for the RTX2070 to handle them?

Also, assumption check here: Am I wrong in thinking that when the Alienware M15 is not hooked up to any monitors that the RTX 2070 can be used to render things on the local screen? Is it a card that can only handle external monitors? If the RTX 2070 can't control the local/builtin laptop screen then no wonder my nvidia driver can't display to it. At this point though I don't even know how to get it to display to the external hdmi connected monitor either (even with the intel driver the external monitor is detected at a signal level, but is totally black for some reason).


Update: Interesting. I removed the nouveau driver blacklisting and updated the grub settings, rebooted, then blacklisted it again, and rebooted (with lsmod showing that the nvidia driver loaded) and with no xorg.conf present (it may be descending into xorg.conf.d and pulling some default config) I did get a GUI this time, just like I do if I manually launch startx. Not sure what changed other than that there is no xorg.conf file present at all. However I really doubt it's using the nvidia driver to do so / display on my local laptop screen, and is instead using the intel driver). Here are some outputs from various commands. Let me know if I should include anything else please.

I'm seeing something new in /var/log/messages which I think is happening when I plug in my HP Envy monitor via HDMI:

Mar 31 11:23:06  kernel: ACPI Exception: AE_NOT_FOUND, Evaluating _DOD (20130517/video-1257)
Mar 31 11:23:12  kernel: ACPI Exception: AE_NOT_FOUND, 
Evaluating _DOD (20130517/video-1257)
Mar 31 11:23:18  kernel: ACPI Exception: AE_NOT_FOUND, Evaluating _DOD (20130517/video-1257)
Mar 31 11:23:20  kernel: ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20130517/nsarguments-95)
Mar 31 11:23:20 kernel: ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20130517/nsarguments-95)
Mar 31 11:23:20  kernel: ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20130517/nsarguments-95)
# lspci | egrep "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2070 Mobile] (rev a1)
# xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.01*+  60.01    59.97    59.96    48.01    59.93  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
# nvidia-xconfig --query-gpu-info
Number of GPUs: 1

GPU #0:
  Name      : NVIDIA GeForce RTX 2070 with Max-Q Design
  UUID      : GPU-ccc50115-935f-364f-d0a5-46e1799a9092
  PCI BusID : PCI:1:0:0

  Number of Display Devices: 1

  Display Device 0 (TV-0):
      EDID Name             : HPN HP ENVY 27
      Minimum HorizSync     : 135.000 kHz
      Maximum HorizSync     : 135.000 kHz
      Minimum VertRefresh   : 40 Hz
      Maximum VertRefresh   : 60 Hz
      Maximum PixelClock    : 600.000 MHz
      Maximum Width         : 3840 pixels
      Maximum Height        : 2160 pixels
      Preferred Width       : 3840 pixels
      Preferred Height      : 2160 pixels
      Preferred VertRefresh : 60 Hz
      Physical Width        : 600 mm
      Physical Height       : 340 mm

Note how xrandr detects eDP-1 (the laptop screen) but the nvidia command only detects my external HP Envy Monitor.

Here also is a previous attempt at an xorg.conf which was renamed as a backup file. Since this did not work though I deleted xorg.conf, which is its current state.

# nvidia-xconfig:  version 510.60.02


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Inactive       "IntelDevice"
#    InputDevice    "Keyboard0" "CoreKeyboard"
#    InputDevice    "Mouse0" "CorePointer"
EndSection


Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
#    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "NvidiaDevice"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection


Section "Device"
    Identifier     "IntelDevice"
    VendorName     "Intel Corporation"
    BusID          "PCI:0:2:0"
EndSection


Section "Screen"
    Identifier     "Screen0"
    Device         "NvidiaDevice"
    Monitor        "Monitor0"
    Option         "UseDisplayDevice" "None"
#    DefaultDepth    24
#    SubSection     "Display"
#        Depth       24
#    EndSubSection
EndSection
9
  • 1
    If the command nvidia-xconfig exists on your system, which I think it should, run nvidia-xconfig --query-gpu-info and add it to your question. The output should show information about the GPU and the display devices that the GPU is aware are connected to it. Laptops with GPUs like this will often switch back and forth between iGPUs on the CPU and the dedicated GPU. This is a setting that can usually be tweaked in the bios. Once you check into both of those things, I can probably help out with the xorg.conf.
    – Natolio
    Mar 31 at 16:00
  • 1
    That sounds useful. Give me a bit and I will get that info! Mar 31 at 16:04
  • I have updated the above post now. Not sure what to make of the error I noticed, but I'm inclined to think that it's just due to my external monitor not apparently working with any driver (including the intel) at the moment. By the way, is there a command I can issue to tell which driver is actually being used for my laptop monitor that xrandr identifies as eDP-1? Mar 31 at 16:47
  • I'm more interested in getting the laptop screen to work with the nvidia driver, so maybe can ignore the issue with the HP Envy for now. But cf. my "assumption check" section above. Maybe this card only works with external monitors? I would be happy with either the Envy or laptop monitor working with the nvidia driver though. Mar 31 at 16:53
  • Are you able to check the bios settings to see if there is a setting for the default graphics card?
    – Natolio
    Mar 31 at 17:03

2 Answers 2

0

Very partial answer:

  • If no xorg.conf is present, X tries to autodetect everything, and make sensible choices. That's why having no xorg.conf is often superior to having one.

  • The xorg.conf you created during the install process probably didn't take the nvidia specialities into account.

  • The nvidia driver is an odd beast: It's using Nvidia's own abstraction on how drivers should work (because part of it is re-used on Windows), and tries to brute-force match this to the X abstractions. Which sometimes creates friction.

  • The place to look for information when you try to debug this is the Xorg log, usually in /var/log/Xorg.0.log (not sure about if RHEL puts it there as well).

  • Mandatory reading is Appendix B in the README for the Nvidia driver, e.g. here (check if this is your version). Note the ConnectedMonitor option.

2
  • Thanks. Yes, /var/log/Xorg.0.log is where I saw the messages about the DP-# devices not connecting. That is reminding me that I need to append an example to my post. Your first bullet explains a lot. Given Natolio's suggestion about Nvidia-Optimus though, and that fact that I clearly have the nvidia driver loaded (see the lsmod output and the successful interrogation of nvidia-xconfig --query-gpu-info, could it be that having no xorg.conf is simply defaulting to the Intel UHD Graphics 630. How can I tell which driver is actually actively being used for which display though? Mar 31 at 20:47
  • "could it be that having no xorg.conf is simply defaulting to the Intel UHD Graphics 630." Possibly. Looking at the log will tell you that. Laptops also sometimes have a kind of switch for the integrated display, which may or may not have driver support under Linux (and the driver support is outside the X ecosystem). So it's also possible that without driver support, you cannot use the internal display with the nvidia card.
    – dirkt
    Mar 31 at 20:53
0

If you want proprietary NVIDIA driver to be the primary rendering provider and use your builtin laptop display:

Create an xorg.file but use only an identifier in the (only) Screen section and specify the Busid and Driver (modesetting) in the intel Device section so that xorg can find the buitlin display.

  • The nvidia card will be used
  • No display resolution possible in the xorg file.

An example (Add your 2 InputDevice Sections and InputDevice entries in the Severlayout Section)

/etc/X11/xorg.conf

Section "ServerLayout"
Identifier "layout"
Screen  "ScreenU"
EndSection

Section "Device"
Identifier "nvidia"
Driver "nvidia"
EndSection
   
Section "Screen"
Identifier "ScreenU"
EndSection

Section "Device"
Identifier     "intel"
Driver         "modesetting"
BusID          "PCI:0:2:0"
EndSection

Check

prime-select query

And adjust if needed:

prime-select on-demand

You can set and position your displays with xrandr and you can put those commands in your ~.profile

The result should look like this:

xrandr --listproviders 
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 8 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x204 cap: 0x6, Sink Output, Source Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.