Score:1

How use multiple monitors with hybrid discrete/integrated gpu on laptop with ubuntu 18.04?

gb flag

I am a bit confused of what is needed to make my laptop work with an external monitor. I have a Gigabyte Aero 15. I had no issues installing Ubuntu 18, but the intel gpu is used by default. I installed the nvidia drivers, and now, I am only able to use either the external monitor or my laptop screen based on the GPU I select.

For example:

  • if I run sudo prime-select nvidia, I can connect an external monitor via the hdmi port, but the laptop screen is black with a cursor at the top left,
  • if I run sudo prime-select intel, I cannot connect an external monitor via the hdmi port (i.e., the external monitor doesn't detect the computer is connected), but the laptop screen works.

I tried searching, and I think my GPU may be an NVIDIA Optimus GPU (although unsure how to verify). My issue is I want to be able to use the nvidia gpu or intel gpu with both monitors (I don't need the graphics to switch in real-time, I am fine with rebooting as needed to switch from nvidia to intel - although I do want to be able to use the laptop screen + external monitor with nvidia).

Is bumblebee the solution? If so, do I need to reinstall drivers or use different drivers? update the kernal? I am not familiar with nvidia optimus or bumblebee, and I am a bit confused as to what I need to do, and I don't want to start installing and editing system files naively.

Ralff avatar
gb flag
@guiverc I edited the title as I am using 18.04. I understand 18.04 is nearing end of life. How do I check the kernel stack option? I can check then update my question to include it
guiverc avatar
cn flag
You can look at what kernel you're running using `uname -r`. The GA kernel will be 4.15 where as the last & final kernel of HWE is 5.4 (the GA kernel from the next LTS release of Ubuntu 20.04 LTS). Kernel of course impacts kernel modules in use; kernel modules being referred to mostly as *drivers*. *Most of the remaining digits are update indicators, generic kernel will say so, or low-latency etc, if using an OEM kernel you'll see that in the text etc*
Ralff avatar
gb flag
@guiverc Gotcha. My kernel is 5.4.X, but I would need to check for the X digits
guiverc avatar
cn flag
Nah, the bit that was of interest is 5.4 so you're using the HWE kernel stack (for more details you can read https://wiki.ubuntu.com/Kernel/LTSEnablementStack). The X just lets you easily check what security flaws you're patched for; or if you're behind on applying security fixes. if you read the security notices etc. they'll always tell you what .X includes the fix (.X gets larger as more fixes are applied)
Ralff avatar
gb flag
@guiverc Thanks for the info. Do you think upgrading to ubuntu 20.04 will resolve my issue in the op? I broke my ubuntu messing with bumblebee, and I think the quickest fix at this point is reinstalling. I may upgrade to 20.04 in the process
guiverc avatar
cn flag
Sorry I have no experience with `bumblebee` thus can't comment there. Ubuntu 20.04 LTS if using the GA kernel stack will mean you're using the same kernel you are now, so differences in relation to your hardware (ie. kernel related) should be almost identical; but Ubuntu Desktop defaults to HWE which will mean you're using the newer 5.15 kernel... Beyond kernel though a lot of the software stack changes (newer GTK, newer GNOME etc) being two years newer... Sorry I can't provide any meaningful advice.
guiverc avatar
cn flag
FYI: I do agree that a re-install can fix many issues (*if in system directories, or system configs & we're talking about desktop systems!*) but you're using I suspect much 3rd party software that can complicate things... I somewhat regularly perform *upgrade via re-install* or a *repair installation* type of upgrade to switch releases with no consequences to my user files (anything in $HOME isn't touched), my *manually installed* packages (ie. those I added) get auto-reinstalled, but I have few 3rd party etc & am keep *somewhat* good records of what can influence this for reviews I do first
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.