Hdmi connected display shows black screen.

Hi, I would like to ask a question about setting up an external display connected through Hdmi port.

My device is Lenovo S340 optimus laptop. It has Nvidia GeForce MX230.

My desired goal is to use both laptop display and hdmi connected display together (ie, use both displays at the same time and move windows from one display to another)

I have installed NVIDIA driver by following this guide: https://en.opensuse.org/SDB:NVIDIA_drivers

I believe that I have installed NVIDIA driver successfully, however, when I plug in the hdmi cable, second display does not work at all (it switches to energy saving mode)

Here I share relevant information which may help you to understand my current setup.

This is link to my Xorg log: https://susepaste.org/38186730

**# inxi -G

Graphics:  Device-1:** Intel UHD Graphics 620 **driver:** i915 **v:** kernel  
           **Device-2:** NVIDIA GP108M [GeForce MX230] **driver:** nvidia **v:** 390.141  
           **Device-3:** IMC Networks **type:** USB **driver:** uvcvideo  
           **Display:** x11 **server:** X.Org 1.20.3 **driver:** modesetting,nvidia **resolution:** 1920x1080~60Hz  
           **OpenGL:****renderer:** GeForce MX230/PCIe/SSE2 **v:** 4.6.0 NVIDIA 390.141 

# sudo lsmod | grep nvidia
nvidia**_drm             53248  3
**nvidia**_modeset       1056768  4 **nvidia**_drm
**nvidia**_uvm            876544  0
**nvidia**              15831040  401 **nvidia**_uvm,**nvidia**_modeset
ipmi_msghandler        69632  2 ipmi_devintf,**nvidia**
drm_kms_helper        229376  2 **nvidia**_drm,i915
drm                   544768  6 drm_kms_helper,**nvidia**_drm,i915

# sudo lspci -nnk | grep -i -E 'VGA|3D|Display' -A 5

00:02.0 **VGA** compatible controller [0300]: Intel Corporation UHD Graphics 620 (Whiskey Lake) [8086:3ea0] (rev 02)
        Subsystem: Lenovo Device [17aa:39f6]
        Kernel driver in use: i915
        Kernel modules: i915
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8
086:1903] (rev 0c)
        Subsystem: Lenovo Device [17aa:382c]
01:00.0 **3D** controller [0302]: NVIDIA Corporation GP108M [GeForce MX230] [10de:1d11] (rev a1)
        Subsystem: Lenovo Device [17aa:39f6]
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01)
        Subsystem: Lenovo Device [17aa:3811]

# xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x240; cap: 0x1 (Source Output); crtcs: 0; outputs: 0; associated providers: 1; name: NVIDIA-0
Provider 1: id: 0x44; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 2; associated providers
: 1; name: modesetting
    output eDP-1-1
    output DP-1-1

# xrandr --listmonitors

Monitors: 1
 0: +*eDP-1-1 1920/309x1080/174+0+0  eDP-1-1

I assume that there is problem of detecting external display as

xrandr --listmonitors

returns only one monitor.

I am totally lost now… any advises will be highly appreciated. Please let me know what I can try to make it work.

Thank you very much in advance

Perhaps a hardware switch??? FN+some key???

gogalthorp thank you for your reply!

For fn + some keys, do you mean something like this?
(Screenshot: https://paste.pics/3e73035ae908ddbfca10134884563a5a)

I have tried all options but all options result in displaying at laptop screen only.

For hardware switch, do you mean switching between intel and nvidia?

I have also tried to switch through prime-select and here is my current output…

sudo prime-select get-current
Driver configured: nvidia

What should I look for? Any other suggestions? Thank you!

Is this laptop a new acquisition, or are you using Linux for the first time now with it? Has it ever worked as you wish with two displays? Did you try it before installing NVidia’s drivers to determine whether it can work as you wish without them? Exactly which model S340 do you have? Apparently there are multiple hardware configurations using the S340 moniker, so multiple sub-models. The first one I found shows a picture of an HDMI port, and you say it has an HDMI port, but, the software, Xorg.0.log and xrandr, is reporting the external port is a DisplayPort: “DP-1-1”. Xorg.0.log reports no serious errors, just one warning: (WW) NVIDIA(0): Option “AllowExternalGpus” is not used. Whether that is significant WRT your problem I have no idea.

mrmazda thank you for your reply)

Few things to clarify:

Model name of my laptop is S340-14IWL (81N7) (i7-8565U, MX230). I have never setup this laptop to work with external displays (not even with windows!). And I have no experience on setting up graphic card with external display with linux… Actually display was a new acquisition and I decided to make use of it. (Display was tested with other device (same operating system, LEAP 15.2, it works as i need but the device is not optimus system))

I have tried to use external display without installing NVidia’s drivers but it was not working. And I thought the reason why it was not working is not having Nvidia driver so I installed one to see…

The first one I found shows a picture of an HDMI port, and you say it has an HDMI port, but, the software, Xorg.0.log and xrandr, is reporting the external port is a DisplayPort: “DP-1-1”.

I think this is where the problem lives… I am saying that “I connected to HDMI port” because literally my laptop has HDMI slot where I connected the external display.
(For your information, https://paste.pics/36b922218d86beff08cb74cb0916d8a8)

What do you think that why is it showing as a DP-1-1? instead of HDMI? I will be grateful if you can share me any resources that I can look into regarding this problem…

Thank you very much in advance!

Just solved this problem!

The problem was from BIOS settings.


Changing the boot mode from legacy to UEFI solved problem.

HDMI connector working depending on setting BIOS to UEFI boot smells like a broken BIOS. There should be zero relationship between the two. Video port labeled DisplayPort in software but with physical connector HDMI also smells like bad BIOS. I saw in that thread that the UEFI setting for some users stops working after some time. If this laptop is new enough to return for refund and buy some other laptop it is what I would do. If not, at least be sure to update the BIOS to the newest version.

Lenovo’s devices are working bad by design, if they are working at all.
ILL they decided to use DP for output, but users prefer HDMI, but we need active converter for DP → HDMI (chip inside). So they realized it for EFI, and dropped for legacy BIOS …

I have bad experience with Lenovo.

Not this user. I have had far more bad experiences with HDMI than with DP. I won’t buy any motherboard or gfxcard that doesn’t have at least one DP. Anything computer that I have that has no DP is either old, or I got it for free. Even my last new TV had DP, but I returned it to vendor after three weeks of firmware and remote control frustration (LG).