Macbook pro 13″ Installs Ubuntu 18.04

  • Post author:
  • Post category:其他


最新版的 MacBook对Ubuntu的支持(或者反过来?)不是很好,但是除了Suspend和resume功能没找到方法使用外,其他都还好,可用。

1、mac在OSX中先安装refind引导,如果开启了spi,还需要在安全模式的terminal中关闭spi。安全模式terminal是在开机时command+R。关闭spi可以google。

2、制作正常Ubuntu的U盘安装盘,在mac中用dd命令就可以。具体可以google。

3、安装ubuntu时需要外接键盘。

4、安装好后,用下面网页所用的办法安装键盘和触控板驱动。

https://nixaid.com/linux-on-macbookpro/

由于我的macbook的wifi、Bluetooth等 都 OK,其实只要下面几步:

DKMS: Keyboard, touchpad and touchbar

To avoid hassle with plugging the external keyboard/mouse, you can already build in the keyboard, touchpad and touchbar drivers:

apt-get install git dkms

cd ~
echo -e "\n# macbook12-spi-drivers\napplespi\nappletb\nspi_pxa2xx_platform\nintel_lpss_pci" >> /etc/initramfs-tools/modules

git clone https://github.com/roadrunner2/macbook12-spi-driver.git
cd ./macbook12-spi-driver
git checkout touchbar-driver-hid-driver
dkms add .
dkms install -m applespi -v 0.1

# lsinitramfs /boot/initrd.img-4.13.0-36-generic | grep -iE "appletb|applespi"
lib/modules/4.13.0-36-generic/updates/dkms/appletb.ko
lib/modules/4.13.0-36-generic/updates/dkms/applespi.ko

If you want the F-keys to be always on by default and the Fn button for switching from F-keys to special keys, then use the following command:

echo 'options appletb fnmode=2' | sudo tee /etc/modprobe.d/appletb.conf


Touchpad configuration

Next, you need to set the proper dpi for the touchpad:

cat > /etc/udev/hwdb.d/61-evdev-local.hwdb << 'EOF'
# MacBook8,1 (2015), MacBook9,1 (2016), MacBook10,1 (2017)
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook8,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook9,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook10,1:*
 EVDEV_ABS_00=::95
 EVDEV_ABS_01=::90
 EVDEV_ABS_35=::95
 EVDEV_ABS_36=::90

# MacBookPro13,* (Late 2016), MacBookPro14,* (Mid 2017)
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,2:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,2:*
 EVDEV_ABS_00=::96
 EVDEV_ABS_01=::94
 EVDEV_ABS_35=::96
 EVDEV_ABS_36=::94

evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,3:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,3:*
 EVDEV_ABS_00=::96
 EVDEV_ABS_01=::95
 EVDEV_ABS_35=::96
 EVDEV_ABS_36=::95
EOF
cat > /etc/udev/hwdb.d/61-libinput-local.hwdb << 'EOF'
libinput:name:*Apple SPI Touchpad*:dmi:*
 LIBINPUT_MODEL_APPLE_TOUCHPAD=1
 LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal
 LIBINPUT_ATTR_TOUCH_SIZE_RANGE=200:150
 LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1200
EOF


转载于:https://www.cnblogs.com/andrew-wang/p/9251910.html