You are not logged in.

#1 2021-02-11 18:31:40

hardrock
Member
Registered: 2016-12-20
Posts: 28

[SOLVED] External HDMI monitor wont work

I have a laptop model: HP Pavilion 15-BC523NS, with two graphic cards:

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 3 GB Max-Q] (rev a1)

It has an HDMI connection where I used to put a second monitor to extend my desktop. At first, it had some issues: When I waked up the system from suspend, it stopped detecting the external monitor so I had to reboot the system to make it work again, but it was a minor annoyance and I didn't care much about it.

But, a few months ago, after a system update, it stopped working at all. It no longer detects the external monitor, no matter what I do.

This is my xrandr output:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
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    59.93    39.27  
   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  
HDMI-1 disconnected (normal left inverted right x axis y axis)

I have the nvidia drivers installed, if I run nvidia-settings I get:

ERROR: Unable to load info from any available system


That's without having a xorg.conf file. However, if I generate a xorg.conf file like this and put it on /etc/X11/:

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc"
	FontPath     "/usr/share/fonts/TTF"
	FontPath     "/usr/share/fonts/OTF"
	FontPath     "/usr/share/fonts/Type1"
	FontPath     "/usr/share/fonts/100dpi"
	FontPath     "/usr/share/fonts/75dpi"
EndSection

Section "Module"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "kmsdev"             	# <str>
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "PageFlip"           	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "DoubleShadow"       	# [<bool>]
        #Option     "Atomic"             	# [<bool>]
	Identifier  "Card1"
	Driver      "modesetting"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Then it's the HDMI monitor the one that will work, but, as soon as the X server starts, the laptop monitor will go black and will stop working, and xrandr will now only detect the external HDMI monitor. Also, nvidia-setting will work fine.

So, I have to choose between having the HDMI monitor working or the laptop monitor working, but I want them BOTH to work so I can have an extended desktop as I had before.

What is wrong?

Thanks

Last edited by hardrock (2021-02-21 21:35:31)

Offline

#2 2021-02-21 18:13:45

hardrock
Member
Registered: 2016-12-20
Posts: 28

Re: [SOLVED] External HDMI monitor wont work

I bump this to add that I've been trying with different monitors, even an smartTV on the hdmi port and it's all the same, only 1 monitor is active at any moment depending on xorg.conf.

I read somewhere that the nvidia GPU is probably hardwired to the HDMI port and the intel one to the laptop monitor, and when one graphics card activates, the other one goes to sleep, if it is the nvidia one it will output to the HDMI monitor, while the other one will activate the laptop monitor.

What is the configuration to have both graphics cards active at the same time?, it must be possible because it worked fine on the past.

Offline

#3 2021-02-21 19:21:37

bjornp_
Member
Registered: 2020-12-31
Posts: 42

Re: [SOLVED] External HDMI monitor wont work

The newest bunch of nvidia drivers have support for running the configuration you want. For me, the solution was to delete xorg.conf (so also don't let nvidia-settings generate one) (be sure to back xorg.conf up though) and then in /etc/modules-load.d/ create two files:

nvidia.conf containing:

nvidia

nvidia-drm.conf containing:

nvidia-drm

(Yes literally just that one bit of text)

These two files ensure the proper modules get loaded on boot. (So reboot after trying this)

It could be, of course, that you have some different issue. Please show the output of `inxi -G` before (and if you want after) doing the above modification, so that we can see which drivers are loaded by Xorg.

To add, the configuration outlined above has Xorg (and your window manager or desktop environment) run on the Intel card. To run applications on the nvidia card, you will have to use

$ prime-run <application>

Last edited by bjornp_ (2021-02-21 19:25:22)


Fun fact: I actually have no clue what I'm doing

Offline

#4 2021-02-21 20:19:52

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: [SOLVED] External HDMI monitor wont work

In order to have the server run on the intel chip, but access the output on the nvidia one, you need to redirect the output, https://wiki.archlinux.org/index.php/PR … erse_PRIME
It's possible that you're facing a race condition and the nvidia chip is not ready when the server starts.
In that case you'll require https://wiki.archlinux.org/index.php/Ke … _KMS_start - for the relevant nvidia modules, see https://wiki.archlinux.org/index.php/NV … de_setting

Remove any config you had autogenerated, they'll not work and just break stuff.

Offline

#5 2021-02-21 21:34:54

hardrock
Member
Registered: 2016-12-20
Posts: 28

Re: [SOLVED] External HDMI monitor wont work

bjornp_ wrote:

The newest bunch of nvidia drivers have support for running the configuration you want. For me, the solution was to delete xorg.conf (so also don't let nvidia-settings generate one) (be sure to back xorg.conf up though) and then in /etc/modules-load.d/ create two files:

nvidia.conf containing:

nvidia

nvidia-drm.conf containing:

nvidia-drm

(Yes literally just that one bit of text)

These two files ensure the proper modules get loaded on boot. (So reboot after trying this)

It could be, of course, that you have some different issue. Please show the output of `inxi -G` before (and if you want after) doing the above modification, so that we can see which drivers are loaded by Xorg.

To add, the configuration outlined above has Xorg (and your window manager or desktop environment) run on the Intel card. To run applications on the nvidia card, you will have to use

$ prime-run <application>

Yes!!

Adding nvidia and nvidia-drm modules did it!!

Thank you very much

Offline

Board footer

Powered by FluxBB