Ubuntu 18.10 external monitor with intel graphics

5,345

Solution 1

The short version:

Your laptop's HDMI port is wirred to the nVidia card in Hardware. No software solution can change this, you need to resort to a mini-DP --> HDMI hardware convertor to make this work.

TL;DR:

From: Aero 15X v8 annoyances:

Second issue has to do with Nvidia optimus and essentially requires me to relog or restart the pc when I disconnect from an external display to keep the battery from draining running on the gtx 1070. Assuming I boot the PC without any external displays connected, non-game applications will utilize the onboard gpu as expected. If I boot the PC with an external display connected however, everything (web browsers, even windows shell) will use the dedicated gtx 1070. This also applies to any applications started when connecting an external monitor after booting. None of the applications will switch to the integrated gpu after disconnecting the monitor and nothing short of a relog/restart will solve the issue.

I've tried forcing global settings in Nvidia control panel to the integrated gpu, updated all drivers but all to no avail.

Any advice would be greatly appreciated.

In the answers section this is discovered:

This is not the case with the Aero 15 however. It seems that the display outputs are wired to the GTX 1070 which forces all applications that were started on any display connected to the HDMI/mDP port to be rendered with the GTX 1070.

I tested this by having the laptop's screen enabled while connected via mDP to an external monitor. If the built-in screen is set as primary, applications launched will run on the iGPU. When the external monitor is set as primary, all applications started will run on the 1070.

Note: My Alienware AW17R3 has the external HDMI port hardwired to the nVidia Geforce GTX970M GPU as well and I cannot use the Intel iGPU to drive the Laptops HDMI external port. The Intel iGPU will only drive the builtin display and Thunderbolt 3 USB-C port which has a DPI-->HDMI adapter ($25) to another external monitor.

Solution 2

The above answer is not correct. First of all HDMI port & the mini DP are all linked to the nvidia Card. Only the (thunderbolt PORT / USB C) uses INTEL CARD.

When you're using NVIDIA YOU NEED TO USE LIGHTDM to make the external monitor work:

$ sudo apt install lightdm & sudo dpkg-reconfigure lightdm 

Then choose lightdm. With this option audio wouldn't work! You need to use this library hhfeuer/nvhda

NB: Only works on prime-select nvidia.

  1. git clone https://github.com/hhfeuer/nvhda
  2. cd nvhda
  3. make
  4. sudo make install
  5. echo nvhda | sudo tee -a /etc/initramfs-tools/modules
  6. echo "options nvhda load_state=1" | sudo tee /etc/modprobe.d/nvhda.conf
  7. sudo update-initramfs -u
Share:
5,345

Related videos on Youtube

DoubleBass
Author by

DoubleBass

Updated on September 18, 2022

Comments

  • DoubleBass
    DoubleBass over 1 year

    I wanted to attach an external monitor through HDMI to my optimus laptop (Gigabyte Aero 15x) but it did not work. I found a solution that works for me in this thread: https://askubuntu.com/a/1094034/827960

    Due to too little reputation, it is not possible to ask a question there, hence this new one.

    I figured out that it only works with prime-select Nvidia and lightdm. My question now is if there is any way to make it work with Intel GPU? It is not a huge problem as most of the time I can be plugged in, as Nvidia draws much more power, but sometimes with presentations, it would be nice to save that battery.

    Thanks

    • WinEunuuchs2Unix
      WinEunuuchs2Unix over 5 years
      I'm wondering if you are using G-Sync?: forum.notebookreview.com/threads/… Also in BIOS your settings might be for Performance which might override to use nVidia all the time?
    • sudodus
      sudodus over 5 years
      1. Do you know how to turn off the nvidia driver/chip? 2. What's the model name of your Intel GPU?
  • DoubleBass
    DoubleBass over 5 years
    Thank you for the precise answer @WinEunuuchs2Unix :) Just to make sure I understood the conclusion, sorry if it looks stupid, if I would get a cable to connect the monitor through the USB-C port it would work? That would be amazing.
  • DoubleBass
    DoubleBass almost 5 years
    I can now confirm that a Thunderbolt 3-USB-C to VGA/HDMI works with the iGPU :)
  • WinEunuuchs2Unix
    WinEunuuchs2Unix almost 5 years
    Um good? Do I need to change my answer in any way?
  • DoubleBass
    DoubleBass almost 5 years
    Now, your answer is still perfect, thank you for that. I just answered my own question because I was not sure whether it would work. Just wanted to confirm.
  • Melchia
    Melchia almost 5 years
    For future references the mini-DP is also connected to NVIDIA this might save you buying a mini DP like I did
  • V-Mark
    V-Mark over 4 years
    I have to argue with the statement: "using NVIDIA YOU NEED TO USE LIGHTDM". My case: Acer NITRO5 (Inter corei7-8750H; nVidia Geforce GTX 1050 Ti Mobile). OS: Kubuntu 19.04. External HDMI works from nVidia with sddm (default dm of KUbuntu).
  • V-Mark
    V-Mark over 4 years
    I have the feeling this (hardwired to dedicated GPU) is the case with my laptop as well. My laptop is Acer NITRO5 (Inter corei7-8750H; nVidia Geforce GTX 1050 Ti Mobile). I will check the USB-C to HDMI way.