2

This will be fairly long post because I'd like to provide a lot of detail and information on what I've already tried and hasn't worked

I've just installed Ubuntu 18.04.1 on a mid-2012 15" Macbook Pro (model 9,1).

I want to be able to switch between my integrated and discrete GPUs. Currently my system is locked to my discrete GPU, an nvidia 650m.

First off, I'm running an EFI boot so Ubuntu is indeed able to recognize both GPUs.

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 650M Mac Edition] (rev a1)

I am using the nvidia-driver-390 driver currently.

Driver installed from "additional drivers"

Alongside which I have the nvidia-prime and nvidia-settings packages installed. prime-select lists profiles for both integrated and discrete graphics, and I am able to switch between them

$ sudo prime-select
Usage: /usr/bin/prime-select nvidia|intel|query
$ sudo prime-select nvidia
Info: selecting the nvidia profile
$ sudo prime-select intel
Info: selecting the intel profile

However, even after selecting the intel profile and rebooting, my computer continues to render everything using the discrete graphics card. I know this because if I run glmark2 then I see that

  1. glmark2 itself will report that the OpenGL renderer being used in my 650m

    $ glmark2
    .......................................................
    glmark2 2014.03+git20150611.fa71af2d
    .......................................................
    OpenGL Information
    
    GL_VENDOR:     NVIDIA Corporation
    GL_RENDERER:   GeForce GT 650M/PCIe/SSE2 
    GL_VERSION:    4.6.0 NVIDIA 390.77
    
    .......................................................
    [build] use-vbo=false: FPS: 3846 FrameTime: 0.260 ms
    .......................................................
                                        glmark2 Score: 3846 
    .......................................................
    
  2. I can see in "Nvidia X Server Settings" that my GPU utilization spikes to 100% 100% GPU usage auuugh!

There is also another issue with nvidia-settings, which is that it does not display a "PRIME profiles" tab, as shown in other guides actually has prime profiles :(


The lack of prime-select not doing anything might be related to missing "prime profiles" tab, though I'm not sure.

In the meantime, there's a lot of "solutions" I've found online which haven't worked. I'll enumerate them here (all of these changes have since been reverted)

  1. Using proprietary drivers (I'm already on proprietary drivers, just thought I'd mention this)

  2. Tried installing Bumblebee using the instructions for 14.04+ from here. This just prevented the graphical display manager from starting up, then I had to uninstall. Furthermore, whatever configuration that it did actually made installing proprietary drivers trigger the same issue as well, essentially making proprietary drivers uninstallable (before attempting installation of Bumblebee, I was able to install them fine)

  3. This source suggests that blacklisting Nouveau will fix this issue. I tried the solution given here, no result

  4. I actually tried disabling the discrete card entirely using the instructions here but it just ended up disabling graphics entirely (I couldn't even get to GRUB, I had to use a live usb to revert the changes)

Anyways, I can provide more details if needed but I was hoping that someone might be able to help. This guide looked promising but I'm not sure quite how to translate it to Ubuntu.

Anyways I can provide more details as needed, but I was hoping that someone might be able to help with this.

EDIT 1:

As requested, I'm getting some info on what happens why I try an run without proprietary drivers.

If I run sudo apt-get purge nvidia* and reboot, everything looks fine. Some diagnostics:

$ sudo lshw -c video
*-display 
   description: VGA compatible controller
   product: GK107M [GeForce GT 650M Mac Edition]
   vendor: NVIDIA Corporation
   physical id: 0
   bus info: pci@0000:01:00.0
   version: a1
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
   configuration: driver=nouveau latency=0
   resources: irq:45 memory:c0000000-c0ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:2000(size=128) memory:c1000000-c107ffff
*-display
   description: VGA compatible controller
   product: 3rd Gen Core processor Graphics Controller
   vendor: Intel Corporation
   physical id: 2
   bus info: pci@0000:00:02.0
   version: 09
   width: 64 bits
   clock: 33MHz
   capabilities: msi pm vga_controller bus_master cap_list
   configuration: driver=i915 latency=0
   resources: irq:47 memory:c1400000-c17fffff memory:b0000000-bfffffff ioport:3000(size=64)

Running glmark2 now gives me

$ glmark2
.......................................................
glmark2 2014.03+git20150611.fa71af2d
.......................................................
OpenGL Information
GL_VENDOR:     nouveau
GL_RENDERER:   NVE7
GL_VERSION:    3.0 Mesa 18.0.5
.......................................................
[build] use-vbo=false: FPS: 751 FrameTime: 1.332 ms
.......................................................
                                  glmark2 Score: 751 
.......................................................

I still don't think my integrated GPU is in use. The frame time is quadrupled but that could just be Nouveau being slow. In addition, the GL_VENDOR string is nouveau, which is only listed as the driver for my discrete card (if my integrated card were being used I'd expect to see i915 based on the output from lshw.

For what it's worth, if I reinstall just the nvidia-settings package then the "Nvidia X Server Settings" application becomes much simpler enter image description here

  • I wonder if you have installed all of the video packages you need for the Intel graphics. I suggest removing Nvidia temporarily, make sure you can start. If Intel does work, then consider using Nvidia 410 or 415 from graphics ppa. Another thing, make sure you are using an x11 session, not Wayland. – pauljohn32 Dec 19 '18 at 04:20
  • @pauljohn32 Using the instructions here (https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used) I verified that I am on x11. Also, could you be more specific on how I should "remove nvidia?" Are you suggesting I uninstal the proprietary drivers and blacklist nouveau? – pipsqueaker Dec 19 '18 at 05:10
  • Yes, remove the deb packages, restart system, see what happens. If Intel drivers are not installed, system will run on some prehistoric VESA drivers that will be fuzzy ugly. If Intel video is OK, then we have important info. On removing Nvidia, you'll find various advice. I would think you need to boot to terminal in order to get that done. If you have trouble, I can check. Or start new question "how to remove Nvidia proprietary driver". Please don't confuse yourself about nouveau. That is just the 3d support. It is separate issue. – pauljohn32 Dec 19 '18 at 05:18
  • @pauljohn32 I can do sudo apt-get purge nvidia* and reboot without any issues, however the system still uses the nvidia card under the nouveau driver (actually it might be i915, let me check quickly) – pipsqueaker Dec 19 '18 at 06:12
  • I've edited the post with the new information – pipsqueaker Dec 19 '18 at 06:20

0 Answers0