Debian on Macbook Air
The small details
After being a Debian user for years, I switched to Ubuntu when I bought my Macbook air. I was worried that the exotic hardware wouldn't work well out of the box with Debian and I didn't have time to debug. Turns out I did spend a lot time tweaking things and they were never perfect. Now that time is more abundant, I'm back to Debian unstable. Things were great out of the box. For the rest, I'm documenting here how I got things to work. Work in progress.
Getting smooth scrolling in chrome
Navigate to chrome://flags and activate Smooth scrolling. Although this improves things a lot, it's still not quite a smooth as
Note: Firefox looks great in the latest Debian unstable. And its scrolling is smooth out of the box.
Using the Oracle java VM
Use make-jpkg to make a .deb from the official Oracle tarball of the JRE.
"Apple" type trackpad scrolling
The trackpad worked great out of the box. It has the correct sensitivity settings, support for middle-button using a three-finger click, support for right-click using a two-finger click. The only detail I like which is missing is the "reverse" scrolling which I got used to with MacOS.
To get the Apple-style scrolling, a line must be added in the InputClass section of the /usr/share/X11/xorg.conf.d/50-synaptics.conf file. In order to avoid the change be overwritten, the edited file should go in /etc/X11/xorg.conf.d. The line to add is marked below.
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 "VertScrollDelta" "-237" ## Add this line EndSection
Other reports online seemed to have success setting a button mapping option in the evdev configuration, but that didn't work for me. The X log file was useful in figuring out which driver was being used for the touchpad.
Special keyboard buttons
I use the special laptop keys to change the screen brightness, etc. Window managers sort of try to address this but don't do very well in general. In addition, in my view, this is a problem that should have a more general solution than the window manager since I may very well have multiple X servers running or I might be in a native console. There's no reason for my buttons not to work then.
The way I'm solving this now is with a very simple daemon that I've made that monitors for keys being pressed and runs commands as a result.
Automatic LCD brightness management.
Work in progress. Looks like a command such as:
brightd -w 30 -v -f -f -x -c acpi_video0
might help a lot.
Raising the CPU frequency
Not sure why, but one day I noticed that the cpus were running too slowly. I'm pretty sure they were running faster at some point. The problem was that they were using the speed governor "powersave" instead of "performance". I fixed this by installing
cpufrequtils and running the following command.
for c in 0 1 2 3; do cpufreq-set --governor performance --cpu $c; done
The Debian Wiki explains how to make the change permanent.
The builtin microphone on the machine appears to be setup such that its single channel is in fact channel 2 in alsa (the right side channel). This means that mono recording records nothing but silence.
One solution is to create a virtual alsa device in ~/.asoundrc:
It's then necessary to use that device when recording.