HP Omen 15 [Ryzen 4600h + Nvidia 1660Ti] - no display over HDMI

HP Omen 15 (Ryzen 5 4600H + NVIDIA 1660Ti) running Debian 11/SDDM

Hi @generix and @aplattner,

Thanks for your contributions to these threads.

My system

I have a HP Omen 15 (Ryzen 4600H + NVIDIA 1660Ti), the same machine as the OP, but I’m running KDE (with SDDM) on Debian Bullseye (testing) and not Gnome (with GDM) on Ubuntu. On this machine, the HDMI port is connected directly to the eGPU.

I know how to set up my system in both of these modes:

  • the iGPU renders the image on the laptop’s display but external displays don’t work (the default configuration out-of-the-box), and
  • the NVIDIA eGPU renders the image on the external display but the laptop’s display does not work (by doing some xorg.conf modifications listed on some relevant threads, described later in ths post).

What I’d like

I would like to know how to configure my machine in one of these configurations:

  1. The AMD iGPU renders all applications and displays them on the laptop’s display (natively) and on external monitor(s) via HDMI (by passing through the NVIDIA eGPU)
  2. The NVIDIA eGPU renders all applications and displays them on the external monitor via HDMI (natively) and on the laptop’s display (by passing through the AMD iGPU)

Despite the configuration, I’d like certain applications to run on the NVIDIA eGPU if desired.

My understanding so far

As far as I can tell, Configuration 1 (the ideal hybrid graphics configuration) is not possible yet (from this post, but is being worked on (?)

Configuration 2 (more battery intensive) has instructions on several threads, but they all seem to refer to GNOME/GDM/Ubuntu systems and not KDE/SDDM/Debian systems.

Some relevant outputs

lspci | grep "VGA"

01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c7)

nvidia-smi

Tue Jun 29 11:25:51 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01    Driver Version: 460.73.01    CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 166...  On   | 00000000:01:00.0  On |                  N/A |
| N/A   44C    P8     4W /  N/A |    472MiB /  5944MiB |      5%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       907      G   /usr/lib/xorg/Xorg                168MiB |
|    0   N/A  N/A      1304      G   /usr/bin/kwin_x11                  60MiB |
|    0   N/A  N/A      1371      G   /usr/bin/plasmashell               41MiB |
|    0   N/A  N/A      1608      G   ...mail/bridge/proton-bridge        1MiB |
|    0   N/A  N/A      1636      G   /app/lib/librewolf/librewolf      166MiB |
|    0   N/A  N/A      4715      G   ...AAAAAAAAA= --shared-files       25MiB |
+-----------------------------------------------------------------------------+

Configuration that that allows only external monitors to work (using NVIDIA eGPU)

I cobbled this together by reading the Debian documentation for using only the NVIDIA eGPU (but that only refers to Intel/NVIDIA combinations) and some of the threads you’ve contributed to.

/etc/X11/xorg.conf

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "AMD"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier  "nvidia"
    Driver      "nvidia"
    BusID       "PCI:01:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier  "AMD"
    Driver      "modesetting"
    BusID       "PCI:06:0:0"
    Option "DRI" "3"
    Option "TearFree" "true"
EndSection

Section "Screen"
    Identifier "AMD"
    Device "AMD"
EndSection

./xsessionrc

xrandr --setprovideroutputsource modesetting NVIDIA-G0
xrandr --auto
xrandr --dpi 96

/usr/share/sddm/scripts/Xsetup

#!/bin/sh
# Xsetup - run as root before the login dialog appears

xrandr --setprovideroutputsource modesetting NVIDIA-G0
xrandr --auto
xrandr --dpi 96

if [ -e /sbin/prime-offload ]; then
    echo running NVIDIA Prime setup /sbin/prime-offload
    /sbin/prime-offload
fi

I was expecting that this configuration would also allow my laptop’s display to work (in addition to the external monitor), but apparently not, and I’m not sure why (my understanding of the technicalities involved is limited).

Looking forward to your help!

Thank you :)

EDIT: Partially resolved

I managed to achieve Configuration 2 by tweaking some settings further. Oddly, when I ran xrandr --listproviders, I got the output:

Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 5 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1fe cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 1 associated providers: 1 name:modesetting

Earlier (before the configuration changes I described, the NVIDIA GPU was named NVIDIA-G0, but now it’s somehow named NVIDIA-0. I replaced this name in ~/.xsessionrc and in /usr/share/sddm/scripts/Xsetup and now it works perfectly! I had a minor issue where KDE Plasma refused to display panels on the screens, but I found a fix for that too on https://askubuntu.com/questions/930183/plasma-multiple-displays-panel-disappears (sorry, as a new user, I can only add 3 links per post).

I’d still appreciate knowing if the ideal hybrid graphics configuration would be possible on this machine though!

2 Likes