HDMI port doesn’t work Nvidia/Intel Bumblebee Driver for Laptop with Manjaro Linux

bumblebeehdmiintel graphicsmanjaronvidia

Informations

OS : Manjaro Linux 16.10 (Cinnamon Community Edition)

$ cat /etc/*-release                                                                                                
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=16.10
DISTRIB_CODENAME=Fringilla
DISTRIB_DESCRIPTION="Manjaro Linux"
Manjaro Linux
NAME="Manjaro Linux"
ID=manjaro
PRETTY_NAME="Manjaro Linux"
ANSI_COLOR="1;32"
HOME_URL="http://www.manjaro.org/"
SUPPORT_URL="http://www.manjaro.org/"
BUG_REPORT_URL="http://bugs.manjaro.org/"

Type : Laptop

Kernel : 4.4.28-2-MANJARO

CPU : Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz

GPUs :

  • Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
  • NVIDIA Corporation GF108M [GeForce GT 630M] (rev ff)

PCI Addresses :

  • Intel iGPU : 00:02.0
  • Nvidia GPU : 01:00.0

Driver from Bumblebee.

Problem

I found (and read) the NVIDIA and NVIDIA Optimus ArchLinux wiki (because yes, Manjaro is ArchLinux based).

But when I installed Manjaro I installed it with NON-FREE drivers and so nvidia, nvidia-libgl and xorg-xrandr are already installed and up-to-date.

And my HDMI port is not working. I think that's because only the Intel iGPU is present in the X11 conf (HDMI port is part of the Nvidia GPU).

While I was trying to find out why, I find that Manjaro does an Automated Identification and Installation of GPUs during the install.

$ sudo mhwd-gpu --check                                                                                             

[sudo] password for shark: 
Using default
Default lib32 support: true
xorg configuration symlink valid...
libGl and libglx symlinks valid...


$ sudo mhwd-gpu --status                                                                                            
Using default
Default lib32 support: true
:: status
  lib32-libGl: '/usr/lib32/mesa/libGL.so.1.2.0'
  lib32-libGLESv1: '/usr/lib32/mesa/libGLESv1_CM.so.1.1.0'
  lib32-libGLESv2: '/usr/lib32/mesa/libGLESv2.so.2.0.0'
  lib32-libEGL: '/usr/lib32/mesa/libEGL.so.1.0.0'
  libGl: '/usr/lib/mesa/libGL.so.1.2.0'
  libGLESv1: '/usr/lib/mesa/libGLESv1_CM.so.1.1.0'
  libGLESv2: '/usr/lib/mesa/libGLESv2.so.2.0.0'
  libEGL: '/usr/lib/mesa/libEGL.so.1.0.0'
  libglx: '/usr/lib/xorg/modules/extensions/libglx.xorg'
  xorg configuration file: '/etc/X11/mhwd.d/intel.conf'

The Manjaro Settings Manager (Hardware configuration) is telling me that hybrid bumblebee driver is installed in both case (see screenshot).

bumblebee driver

But my /etc/X11/xorg.conf.d folder is only containing the following symlink 90-mhwd.conf -> /etc/X11/mhwd.d/intel.conf.

/etc/X11/mhwd.d/intel.conf content:

##
## Generated by mhwd - Manjaro Hardware Detection
##


Section "Device"
    Identifier  "Device0"
    Driver      "intel"
    BusID       "PCI:0:2:0"
    Option      "AccelMethod" "sna"
    Option      "DRI"    "true"
EndSection


Section "DRI"
        Group  "video"
        Mode   0666
EndSection


Section "Extensions"
    Option "Composite" "Enable"
    Option "RENDER"    "Enable"
EndSection


Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard     "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

So what I have to do to make my HDMI port working? And how can I check that my Nvidia GPU is working or not?

I don't think I need to install more drivers but I can't figure if I need to use the mhwd tool provided by Manjaro to configure some more settings or if I need to create a new /etc/X11/xorg.conf.d/20-nvidia.conf file or even if I need to replace the intel.conf with a nvidia.conf.

This may help too:

$ glxinfo | grep OpenGL                                                                                             
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 13.0.0-rc2
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 13.0.0-rc2
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 13.0.0-rc2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

Edit : Is this post xrandr doesn't detect monitor on hdmi port answering my question?

Why I am questionning here

I apologize to ask this question here but ArchLinux forum say this

These boards are for the support of Arch Linux, and Arch ONLY If you
have installed Archbang, Antegros, Chakra, Evo/Lution, Manjaro,
Whatever, you are NOT running Arch Linux. Similarly, if you followed
some random video on YouTube or used an automated script you found on
a blog, you are NOT running Arch Linux, so do not expect any support,
sympathy or anything but your thread being closed and told to move
along. Arch is a DIY distro: if someone else has done it for you, then
showing up here asking to have your hand held for more help is just
help vampirism and is not welcome.

and I never received the confirmation mail for Manjaro Linux forum.

I made search and configuration efforts so I wish this is not help vampirism as some says. Plus I really don't want to trash my distro by installing wrong drivers (it already happened to me when I installed Nvidia drivers from their website, now I know that's a very bad idea).

Best Answer

I had this problem myself and solved it with this guide This should be on the Manjaro wiki but it is not. Attention that I did not figure it out myself I will just post the info here so it is reachable.

Step 1: Delete the current video driver.

$ sudo mhwd -r pci video-hybrid-intel-nvidia-bumblebee

Step 2: Install video-nvidia.

$ sudo mhwd -i pci video-nvidia -f

Step 3: Find your correct BUS ID:

$ lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GM204M [GeForce GTX 980M] (rev a1)

Step 4: Edit config for NVIDIA Prime Synchronization as well as screen tearing fix. Accelmethod might give you problems with SNA depending on your hardware. If so, change to UXA. The AllowEmptyInitialConfiguration must go into the Screen section as stated on Nvidia website.

$ cat /etc/X11/xorg.conf.d/90-mhwd.conf 
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 375.26
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID  "PCI:0:2:0"
EndSection

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

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "true"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Extensions"
    Option      "Composite" "Enable"
    Option  "RENDER" "Enable"
EndSection

Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard     "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Step 5: Make the X server use KMS with root rights.

$ cat /etc/X11/Xwrapper.config
needs_root_rights = yes

Step 6: Add the xrandr lines to SDDM config and than reboot after:

$ cat /usr/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Step 7: Put this in for GRUB settings for KMS and performance.

GRUB_CMDLINE_LINUX_DEFAULT="i915.enable_rc6=0 nvidia-drm.modeset=1 intel_idle.max_cstate=0"

Step 8: Add i915 and nvidia to mkinitcpio

MODULES="i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm"

Step 9: Reboot and enjoy.

Related Question