Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Getting Optimus working

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
shiremog
Posts: 3
Joined: 2018-02-18 18:32

Getting Optimus working

#1 Post by shiremog »

After many happy hours installing & re-installing Debian in an attempt to get the Intel/Nvida Optimus system working, I finally came up with a method which has worked for the last 3 clean installs, 2 of stretch 64 bit & 1 of stretch 32 bit. Hopefully, this will work for some others...
Here's my hardware:

Code: Select all

00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #7 (rev f1)
00:1c.7 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #8 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 950M] (rev ff)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
Firstly, I installed Stretch, adding non-free repositories & Mate ( I haven't tried any other desktops).

Using synaptic,
After the first boot, install dkms, then the linux-headers matching the installed image ( the dkms install appears to install headers for another image.)
If the correct headers are missing, dkms will not build the bbswitch & nvidia-current modules when bumblebee is installed & optimus won't work.

Next install bumblebee-nvidia. You should see the modules being built.
I did find that nvidia-legacy-check failed & the install failed. Reboot & at the grub menu, hit 'e' to edit & add acpi=off to the linux line. Mine looked like this:

Code: Select all

linux   /boot/vmlinuz-4.9.0-4-amd64 root=UUID=33284232-950d-4912-9226-365dd8f72505 acpi=off ro quiet
then hit F10 to continue.
After booting, a

Code: Select all

dpkg --configure -a
should clear things up, then back to synaptic & install bumblebee-nvidia again.

Now disable bumblebeed

Code: Select all

systemctl disable bumblebeed

As far as I can tell, the problem with freezing on boot is caused by bumblebee starting too soon. Disabling the daemon allows us to boot.

Edit /etc/bumblebee/bumblebee.conf. Look for the line KernelDriver=nvidia & change it to KernelDriver=nvidia-current. For some reason, the bumblebee install builds the nvidia-current module, but sets up bumblebee.conf to use nvidia...

Add your user to the bumblebee group. Without this, you won't be allowed to run optirun.

Reboot to your, hopefully, working system. At this point, you should be able to boot normally, but optirun won't work as the bumblebeed daemon is not running. As root, do a

Code: Select all

systemctl start bumblebeed
, then try running an application using

Code: Select all

optirun application-name
With any luck, the application will start & you should find optimus working.

Finally, to save having to start bumblebeed each time, I added a cron job as root,

Code: Select all

* * * * * systemctl start bumblebeed
which works OK but you do need to wait for up to 1 minute from boot before optirun is available.

I hope this helps someone...

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1388
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 65 times

Re: Getting Optimus working

#2 Post by None1975 »

No need to reinvent the bike. He's already invented. Everything is arranged in Debian wiki.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

shiremog
Posts: 3
Joined: 2018-02-18 18:32

Re: Getting Optimus working

#3 Post by shiremog »

Trouble is, following these instructions leaves me with a frozen laptop, hence the description of a method that works for me.

Post Reply