This is a short write-up of my experiences with installing Debian on a ThinkPad W540.
All commands should be run as root, unless indicated otherwise.
## Debian Install NotesWith debian-testing-amd64-netinst.iso (from 20140217), when installing from an USB stick created with Rufus, the installation failed with an error saying that no package sources were configured. Burning the same ISO to a CD and installing from it solved the problem.
## NVIDIA Graphics DriverAfter installing the system and booting into the system for the first time, we are going to install the graphics drivers for the Quadro K1100M/K2100M:
- Add the non-free and contrib repositories to /etc/apt/sources.list
- Add multiarch support for i386:
dpkg --add-architecture i386
- Run
apt-get update
and install the necessary packages:apt-get install nvidia-kernel-dkms bumblebee-nvidia primus primus-libs:i386
- Add users to the bumblebee group with
adduser $USER bumblebee
- Reboot and check whether GPU switching works:
# 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
- If GPU switching works, edit
/etc/bumblebee/bumblebee.conf
and change the following two lines:
Driver = nvidia
KernelDriver = nvidia-current
- Reboot and check whether optirun works with
optirun glxgears
. If there are no errors on the console, bumblebee is now correctly configured!
Most likely, the brightness keys will not work out of the box. To make them work, edit /etc/default/grub
:
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=\"!Windows 2012\""
Run update-grub
and reboot.
Since the W540 doesn't have physical TrackPoint buttons anymore, an adjustment to the synaptics driver configuration is needed to get (approximately) the same feel as in Windows. I haven't gotten scrolling using the middle button working yet, but I will update this document when I do.
- Create the directory
/etc/X11/xorg.conf.d
if it doesn't exist yet - Create a file named
50-synaptics-clickpad.conf
in the above directory with the following contents:
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
MatchDevicePath "/dev/input/event*"
Option "HorizScrollDelta" "0"
Option "MinSpeed" "1"
Option "MaxSpeed" "1"
Option "AccelerationProfile" "2"
Option "AdaptiveDeceleration" "16"
Option "ConstantDeceleration" "16"
Option "VelocityScale" "32"
# enable tap-to-click as default (bnc#722457)
Option "TapButton1" "1"
Option "TapButton3" "2"
Option "TapButton2" "3"
EndSection
Section "InputClass"
Identifier "touchpad ignore duplicates"
MatchIsTouchpad "on"
MatchOS "Linux"
MatchDevicePath "/dev/input/mouse*"
Option "Ignore" "on"
EndSection
# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
# Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
Option "AreaTopEdge" "2700"
Option "SoftButtonAreas" "65% 0 0 3500 35% 65% 0 3500"
# To disable the bottom edge area so the buttons only work as buttons,
# not for movement, set the AreaBottomEdge
EndSection
After a reboot, you should now be able to use the upper part of the clickpad as TrackPoint buttons. If desired, you can change the AreaTopEdge
parameter in the configuration file. Increasing the value moves the top edge of the active area further away from the top edge of the clickpad, meaning that there will be a bigger area in which you will not be able to move the mouse pointer with the touchpad; decreasing it will do the opposite.
- Install the necessary packages:
apt-get install git libmagickcore-dev libusb-1.0-0-dev libnss3-dev libglib2.0-dev libtool fprintd automake libxv-dev libpam-fprintd build-essential fprint-demo
- Grab the driver sources:
git clone git://github.com/abbradar/fprint_vfs5011.git
- In the
fprint_vfs5011
directory, run./autogen.sh && ./configure --prefix=/usr
- There is a bug in the makefile, so you have to edit
libfprint/Makefile
and find thefprint-list-udev-rules
target. At the end of the line that starts with$(AM_V_CCLD)
, add$(GLIB_LIBS)
:
$(AM_V_CCLD)$(fprint_list_udev_rules_LINK) $(fprint_list_udev_rules_OBJECTS) $(fprint_list_udev_rules_LDADD) $(LIBS) $(GLIB_LIBS)
- Now we can compile and install the library:
make && make install
- In order for users to be able to access the fingerprint reader, we are going the have to add the following section to
/lib/udev/rules.d/60-libfprint0.rules
:
# Validity VFS5011
SUBSYSTEM=="usb", ATTRS{idVendor}=="138a", ATTRS{idProduct}=="0017", ATTRS{dev}=="*", ATTR{power/control}="auto", MODE="0664", GROUP="plugdev"
- Reboot your machine and run
fprint_demo
. The fingerprint reader should be recognized and you should be able to enroll your fingers.
I can turn it off and on but when I run "optirun glxgears" I get the error below and no longer able to turn the switch off and on.
[ 767.777830] [ERROR]Cannot access secondary GPU - error: XORG NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please
[ 767.777869] [WARN]The Bumblebee server was not available.
Error: couldn't open display (null)
Any ideas?