Skip to content

Instantly share code, notes, and snippets.

@WayneBuckhanan
Last active October 6, 2018 19:47
Show Gist options
  • Save WayneBuckhanan/0420afe1ae4123036388 to your computer and use it in GitHub Desktop.
Save WayneBuckhanan/0420afe1ae4123036388 to your computer and use it in GitHub Desktop.
Debian 7 on Lenovo W540

BIOS

  • Security->Secure Boot [Disabled] // boot from other drives
  • Startup->UEFI/Legacy Boot [Legacy Only] // allow more distros to boot from USB key; may also prevent bricking the laptop (sketchy correlation in forum posts between Both/UEFI Only modes booting into Linux after install and having to replace motherboard)
  • Startup->Boot Order: M.2 SSD before spinning disk
  • Config->Keyboard/Mouse->Fn and Ctrl Key swap [Enabled]

Boot -> install

  • Used Rufus to image debian-live-7.6.0-amd64-gnome-desktop.iso to USB key (7.1.0 didn't include appropriate network support)
  • use a USB3 port (You have no chance to survive make your time.)
  • edit boot entry to add "nomodeset" so display works (otherwise bombs when the nouveau driver errors)
  • add $USER to sudo group
$ su - 
# addgroup $USER sudo
# vi /etc/default/grub
  // add support for brightness buttons?
  GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=\"!Windows 2012\""
# update-grub

/etc/apt/sources.list

Bumblebee / NVidia Optimus -> render with NVidia card, display with Intel card

  • $ sudo apt-get install -t wheezy-backports bumblebee primus // use open nouveau drivers (not working for me)
  • $ sudo apt-get install -t wheezy-backports bumblebee-nvidia primus // use closed source nvidia drivers (sort of works, glxgears segfaults, removing nomodeset and trying to get the Intel GL hw accel sorted)
  • $ sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install -t wheezy-backports bumblebee-nvidia primus primus-libs:i386 // 64-bit systems wanting to use bumblebee in 32-bit apps need MultiArch support and the i386 primus-libs

test bumblebee after a reboot:

$ cat /proc/acpi/bbswitch
0000:01:00.0 OFF
$ echo ON > /proc/acpi/bbswitch && cat /proc/acpi/bbswitch
0000:01:00.0 ON
$ echo OFF > /proc/acpi/bbswitch 

/etc/bumblebee/bumblebee.conf

  • Driver = nvidia
  • KernelDriver = nvidia-current

reboot and test:

$ vblank_mode=0 glxgears -info
$ vblank_mode=0 optirun glxgears -info 
// should display gears window; if not, check /var/log/syslog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment