Comment 17 for bug 1262068

Revision history for this message
Rob (robertdavidlee) wrote :

I spent some more time and was able to get things working on my machine, so I though I'd share how. Note this is definitely a hack but it works and perhaps Alberto or Tim could give directions on a temporary fix that is less hacky while we wait for the official fix to be posted somewhere.

1. In /etc/gdm/Init/Defaut, add the line /sbin/prime-offload right before the exit 0. Or better, write your own script to call "Default" and then run prime-offload.

2. Unlike older version of nvidia-prime, newer versions don't appear to generate an xorg.conf file. But with my hack fix, it still needed when in "nvidia" mode. So after I do a "prime-select nvidia" I create an xorg.conf file in /etc/X11/ with the following contents:

########################################
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection

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

Section "Screen"
Identifier "nvidia"
Device "nvidia"
# Uncomment this line if your computer has no display devices connected to
# the NVIDIA GPU. Leave it commented if you have display devices
# connected to the NVIDIA GPU that you would like to use.
Option "UseDisplayDevice" "none"
EndSection

Section "Device"
Identifier "intel"
Driver "modesetting"
EndSection

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

Then reboot for nvidia mode. Note that when you want to enable intel mode, you'll need to remove this file and reboot.

Like I said, a total hack but it enables nvidia mode for me which is all I needed for now.

One other issue I saw was that the /etc/init/nvidia-prime.conf has some specific use of lightdm. Whatever it's doing there, I guess it needs to do for gdm as well.