Macbook pro 13" Installs Ubuntu 18.04

最新版的 MacBook對Ubuntu的支持(或者反過來?)不是很好,可是除了Suspend和resume功能沒找到方法使用外,其餘都還好,可用。linux

 

一、mac在OSX中先安裝refind引導,若是開啓了spi,還須要在安全模式的terminal中關閉spi。安全模式terminal是在開機時command+R。關閉spi能夠google。git

二、製做正常Ubuntu的U盤安裝盤,在mac中用dd命令就能夠。具體能夠google。github

三、安裝ubuntu時須要外接鍵盤。ubuntu

四、安裝好後,用下面網頁所用的辦法安裝鍵盤和觸控板驅動。安全

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

因爲個人macbook的wifi、Bluetooth等 都 OK,其實只要下面幾步:svn

 

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:ui

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:google

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:code

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
相關文章
相關標籤/搜索