State of Linux on the MacBook Pro 2016 & 2017

https://github.com/Dunedan/mbp-2016-linux

Hardware

MacBook Pro 2017 with touch bar

准备工作

http://zhongce.sina.com.cn/article/view/32740

镜像换源

https://blog.csdn.net/zhangjiahao14/article/details/80554616

输入法

http://blog.zedyeung.com/2018/08/05/Ubuntu-18-04-fcitx-chinese-input-setup-google-and-sogou/

问题排查

Touchpad Touchbar 无法正常工作

首先切到root: su -

https://blog.csdn.net/Vince_/article/details/88772177
https://nixaid.com/linux-on-macbookpro/

Touchpad 手势

https://www.youtube.com/watch?v=t1kUGASMiIA

防止合盖后休眠

安装 Gnome Tweaks Tool 工具

Wifi 信号弱

注:2.4 GHz
https://bugzilla.kernel.org/show_bug.cgi?id=193121#c52
https://bugzilla.kernel.org/show_bug.cgi?id=193121#c62
https://bugzilla.kernel.org/show_bug.cgi?id=193121#c63
https://bugzilla.kernel.org/show_bug.cgi?id=193121#c58
https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers
https://askubuntu.com/questions/1099671/what-is-options-iwlwifi-11n-disable-1-in-wifi-setting

  1. Knowing what Broadcom wireless card you have

    1. (base) mr@mr-ubuntu:~/Desktop$ lspci -nn -d 14e4:
    2. 03:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43602 802.11ac Wireless LAN SoC [14e4:43ba] (rev 02)

    [14e4:43ba] (rev 02)
    **

  2. How I was able to reinstall the proper WiFi driver if you experience the No WiFi Adapter is available issue in Settings>WiFi

    1. sudo apt-get purge bcmwl-kernel-source
    2. sudo apt update
    3. sudo update-pciids
    4. sudo apt install firmware-b43-installer
    5. sudo reboot
  3. Downloaded brcmfmac43602-pcie.txt here: https://bugzilla.kernel.org/attachment.cgi?id=285753

removed the macaddress of xx:xx:xx:xx:xx:xx and replaced it with 00:90:4c:0d:f4:3e

  1. sudo cp brcmfmac43602-pcie.txt /lib/firmware/brcm
  1. iwlwifi 11n_disable=1

    1. > sudo vim /etc/modprobe.d/iwlwifi.conf
    2. 在文尾添加
    3. options iwlwifi 11n_disable=1
  2. reloading the brcmfmac driver

    1. > sudo rmmod brcmfmac && sudo modprobe brcmfmac

开发环境

Idea 系统环境变量未引入

https://stackoverflow.com/a/58919324
默认的.desktop文件为.local/share/applications/jetbrains-idea.desktop

gdb won’t attach

https://askubuntu.com/questions/41629/after-upgrade-gdb-wont-attach-to-process

  1. # edit /etc/sysctl.d/10-ptrace.conf and change the line
  2. kernel.yama.ptrace_scope = 1
  3. > sudo service procps restart

autostart

vim ~/.Xmodmap

  1. remove Lock = Caps_Lock
  2. remove Control = Control_L
  3. keysym Control_L = Caps_Lock
  4. keysym Caps_Lock = Control_L
  5. add Lock = Caps_Lock
  6. add Control = Control_L

vim ~/.Xmodmap_filco

  1. remove Lock = Caps_Lock
  2. remove Control = Control_L
  3. keysym Control_L = Caps_Lock
  4. keysym Caps_Lock = Control_L
  5. add Lock = Caps_Lock
  6. add Control = Control_L
  7. remove mod1 = Alt_L
  8. remove mod4 = Super_L
  9. keysym Alt_L = Super_L
  10. keysym Super_L = Alt_L
  11. add mod1 = Alt_L
  12. add mod4 = Super_L

vim ~/.config/autostart/xmodmap.desktop

  1. Desktop Entry]
  2. Name[en_US]=Xmodmap
  3. Comment[en_US]=xmodmap ~/.Xmodmap
  4. Exec=/usr/bin/xmodmap .Xmodmap
  5. Icon=application-default-icon
  6. X-GNOME-Autostart-enabled=true
  7. Type=Application