Ubuntu 18.10 external monitor with intel graphics
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.
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.
- git clone https://github.com/hhfeuer/nvhda
- cd nvhda
- make
- sudo make install
- echo nvhda | sudo tee -a /etc/initramfs-tools/modules
- echo "options nvhda load_state=1" | sudo tee /etc/modprobe.d/nvhda.conf
- sudo update-initramfs -u