6

yesterday I bought a laptop which contains both a Nvidia 940mx graphics card and Intel Integrated Graphics. I have found that it uses the Intel integrated graphics by default, but I wish for it to use the Nvidia card instead.

I have already tried switching while using Arch Linux and have switched to Ubuntu in hopes that it will work here, as when I made an attempt on Arch Linux, it resulted in the X Server being entirely unable to start, reporting that it is unable to locate the display, or something along those lines. Because I have already had this issue with switching, I am hesitant to try again without first ensuring that everything will work correctly.

There seem to be several conflicting (and outdated) guides for switching to the nvidia card. Using vga_switcheroo did not work, as the /sys/kernel/debug/vgaswitcheroo/switch did not even exist. Any existing questions on stack exchange which describe utilizing the nvidia card are either outdated, inconsistent with all the others, or are not consistent with my situation.

Some Hardware Information:

$ lspci -nnk | grep -i vga -A3 | grep 'in use'
Kernel driver in use: i915

$ lshw -short | grep display
/0/100/2                     display        Intel Corporation
/0/100/1c/0                  display        NVIDIA Corporation

$ lshw | grep -A10 "VGA\|3D"
         description: VGA compatible controller
         product: Intel Corporation
         vendor: Intel Corporation
         physical id: 2
         bus info: pci@0000:00:02.0
         version: 02
         width: 64 bits
         clock: 33MHz
         capabilities: vga_controller bus_master cap_list rom
         configuration: driver=i915 latency=0
         resources: irq:131 memory:b2000000-b2ffffff memory:c0000000-cfffffff ioport:5000(size=64) memory:c0000-dffff
--
            description: 3D controller
            product: NVIDIA Corporation
            vendor: NVIDIA Corporation
            physical id: 0
            bus info: pci@0000:01:00.0
            version: a2
            width: 64 bits
            clock: 33MHz
            capabilities: cap_list
            configuration: latency=0
            resources: memory:b3000000-b3ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:4000(size=128) memory:b4000000-b407ffff

$ lspci -nnk | grep -i "VGA\|3D" -A3
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:5916] (rev 02)
    Subsystem: Acer Incorporated [ALI] Device [1025:111a]
    Kernel driver in use: i915
    Kernel modules: i915
--
01:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:179c] (rev a2)
    Subsystem: Acer Incorporated [ALI] Device [1025:111a]
    Kernel modules: nvidiafb, nouveau
03:00.0 Network controller [0280]: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter [168c:0042] (rev 31)

$ sudo ubuntu-drivers devices                             
== cpu-microcode.py ==
driver   : intel-microcode - distro non-free

== /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0 ==
vendor   : NVIDIA Corporation
modalias : pci:v000010DEd0000179Csv00001025sd0000111Abc03sc02i00
driver   : xserver-xorg-video-nouveau - distro free builtin
driver   : nvidia-367 - distro non-free recommended

$ arch
x86_64

Given this information, what is the safest way for me to switch from the intel device to the nvidia graphics card without a risk of breaking the X server? This system is running Ubuntu 16.10 Yakkety.

1 Answers1

6

First you need to install the driver by

sudo apt install nvidia-367

and reboot.

You can check the status and switch adapters in the Nvidia X Server Settings application (PRIME Profiles).

Also you can check the status in a terminal by

prime-select query

Switch to Nvidia by

sudo prime-select nvidia

Switch to Intel by

sudo prime-select intel

You need to log out and it to apply the setting.

Pilot6
  • 92,041