MHWD Nvidia Prime Proprietary Driver boots into black screen

I have nvidia-optimus hardware:

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)

When I install nvidia proprietary driver using mhwd:

sudo mhwd -a pci nonfree 0300

It correctly installs video-hybrid-intel-nvidia-450xx-prime along with video-modesetting. But when I reboot it boots into black screen. I can access console though.

See: Xorg.0.log

Any help is appreciated.


UPDATE

My primary display is 4K (3840 × 2160). Strange thing is, when I boot my laptop with an Full HD (1920 × 1200) monitor attached, everything works fine. The sddm login screen loads, The KDE loads perfectly after login. nvidia-settings works. Both of the displays works perfectly. glxinfo | grep -i renderer shows:

OpenGL renderer string: GeForce RTX 2070/PCIe/SSE2

However the following things still appears in Xorg.0.log:

[    24.786] (II) LoadModule: "nouveau"
[    24.787] (WW) Warning, couldn't open module nouveau
[    24.787] (EE) Failed to load module "nouveau" (module does not exist, 0)
[    24.787] (II) LoadModule: "nv"
[    24.787] (WW) Warning, couldn't open module nv
[    24.787] (EE) Failed to load module "nv" (module does not exist, 0)
[    24.791] (II) LoadModule: "fbdev"
[    24.792] (WW) Warning, couldn't open module fbdev
[    24.792] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    24.792] (II) LoadModule: "vesa"
[    24.792] (WW) Warning, couldn't open module vesa
[    24.792] (EE) Failed to load module "vesa" (module does not exist, 0)
[    27.689] (EE) Failed to open authorization file "/var/run/sddm/{f5a7a9d0-995e-4bff-a687-7b44f14e35a0}": No such file or directory

Just for reference, mhwd -li currently shows:

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-450xx-prime            2019.10.25               false            PCI

The problem seems like a BUG!!!

Same situation here. I’ve followed this post

Here is my xorg.log
and system info:

System:    Kernel: 5.8.6-1-MANJARO x86_64 bits: 64 compiler: N/A Console: tty 4 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: Inspiron 15 7000 Gaming v: N/A serial: <filter> 
           Mobo: Dell model: 0P84C9 v: A01 serial: <filter> UEFI: Dell v: 1.8.1 date: 08/15/2018 
Battery:   ID-1: BAT0 charge: 36.9 Wh condition: 42.4/74.0 Wh (57%) model: SMP DELL 71JF452 status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP arch: Kaby Lake rev: 9 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 44817 
           Speed: 900 MHz min/max: 800/3800 MHz Core speeds (MHz): 1: 978 2: 943 3: 946 4: 944 5: 982 6: 947 7: 947 8: 948 
Graphics:  Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] vendor: Dell driver: nvidia v: 450.66 bus ID: 01:00.0 
           Device-3: Sunplus Innovation Integrated Webcam type: USB driver: uvcvideo bus ID: 1-12:3 
           Display: server: X.org 1.20.8 driver: modesetting,nvidia tty: 240x67 
           Message: Advanced graphics data unavailable in console for root. 
Audio:     Device-1: Intel CM238 HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Device-2: NVIDIA GP107GL High Definition Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Sound Server: ALSA v: k5.8.6-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Dell driver: N/A port: d000 
           bus ID: 02:00.0 
           Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter vendor: Dell driver: ath10k_pci v: kernel 
           port: d000 bus ID: 03:00.0 
           IF: wlp3s0 state: up mac: <filter> 
           Device-3: Qualcomm Atheros type: USB driver: btusb bus ID: 1-4:2 
           IF-ID-1: docker0 state: down mac: <filter> 
Drives:    Local Storage: total: 1.14 TiB used: 167.62 GiB (14.3%) 
           ID-1: /dev/sda vendor: LITE-ON model: CV3-8D256-11 SATA 256GB size: 238.47 GiB 
           ID-2: /dev/sdb vendor: Western Digital model: WD10JPVX-75JC3T0 size: 931.51 GiB 
RAID:      Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 bus ID: 00:17.0 
Partition: ID-1: / size: 109.03 GiB used: 75.68 GiB (69.4%) fs: ext4 dev: /dev/sda5 
           ID-2: /var size: 51.89 GiB used: 44.20 GiB (85.2%) fs: ext4 dev: /dev/sdb2 
Swap:      ID-1: swap-1 type: partition size: 1000.0 MiB used: 0 KiB (0.0%) dev: /dev/sda6 
Sensors:   System Temperatures: cpu: 43.0 C mobo: 33.0 C sodimm: 37.0 C 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 172 Uptime: 7m Memory: 15.51 GiB used: 365.6 MiB (2.3%) Init: systemd Compilers: gcc: 10.2.0 
           clang: 10.0.1 Packages: 1952 Shell: Bash v: 5.0.18 inxi: 3.1.05

I just read your logs seems you are not loading the nvidia driver but noveau and others, check that in the driver section of xorg.conf

nvidia is getting loaded:

[    24.895] (II) LoadModule: "nvidia"
[    24.895] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    24.902] (II) Module nvidia: vendor="NVIDIA Corporation"
[    24.902]    compiled for 1.6.99.901, module version = 1.0.0
[    24.902]    Module class: X.Org Video Driver

What I don’t understand is why the following modules are being loaded:

[    24.902] (II) LoadModule: "nouveau"
[    24.902] (WW) Warning, couldn't open module nouveau
[    24.902] (EE) Failed to load module "nouveau" (module does not exist, 0)
[    24.903] (II) LoadModule: "nv"
[    24.903] (WW) Warning, couldn't open module nv
[    24.903] (EE) Failed to load module "nv" (module does not exist, 0)
[    24.908] (II) LoadModule: "fbdev"
[    24.909] (WW) Warning, couldn't open module fbdev
[    24.909] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    24.909] (II) LoadModule: "vesa"
[    24.910] (WW) Warning, couldn't open module vesa
[    24.910] (EE) Failed to load module "vesa" (module does not exist, 0)

I checked /etc/modules.d/ and /etc/modeprobe.d/, there is no mention of these modules!

Try to boot blocking them on the kernel parameters. Just a guess.

I should mention that my primary display is 4K (3840 × 2160).
Strange thing is, when I boot my laptop with an Full HD (1920 × 1200) monitor attached, everything works fine. The sddm login screen loads, The KDE DE loads perfectly after login. nvidia-settings works. However the following things still appears in Xorg.0.log:

[    24.786] (II) LoadModule: "nouveau"
[    24.787] (WW) Warning, couldn't open module nouveau
[    24.787] (EE) Failed to load module "nouveau" (module does not exist, 0)
[    24.787] (II) LoadModule: "nv"
[    24.787] (WW) Warning, couldn't open module nv
[    24.787] (EE) Failed to load module "nv" (module does not exist, 0)
[    24.791] (II) LoadModule: "fbdev"
[    24.792] (WW) Warning, couldn't open module fbdev
[    24.792] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    24.792] (II) LoadModule: "vesa"
[    24.792] (WW) Warning, couldn't open module vesa
[    24.792] (EE) Failed to load module "vesa" (module does not exist, 0)

The problem seems like a BUG!!!

nouveau is already blacklisted by autogenerated mhwd.conf