aunali1 / linux-mbp-arch Goto Github PK
View Code? Open in Web Editor NEWArch Linux kernel with 2018+ MacBook Pro patches.
Arch Linux kernel with 2018+ MacBook Pro patches.
I guess this is because of incompatibility between the latest bce
driver and this old version of kernel.
My question - Does apple-bce-dkms-git
support the latest mbp kernel only? Is it OK to upgrade my kernel to the latest with my keyboard & touchpad working from the beginning to the end?
I'm asking this because I don't have an additional USB keyboard or mouse, since I'm in my college at present. If anything goes wrong, I will lose control of my Arch Linux system, having to buy one and wait for days...
Current situation (Kernel version: 5.5.7-1-mbp
)
pacman -S apple-bce-dkms-git
...
(2/2) Install DKMS modules
==> dkms install --no-depmod -m apple-bce -v r183.c884d9c -k 5.5.7-1-mbp
Error! Bad return status for module build on kernel: 5.5.7-1-mbp (x86_64)
Consult /var/lib/dkms/apple-bce/r183.c884d9c/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m apple-bce -v r183.c884d9c -k 5.5.7-1-mbp' returned 10
==> depmod 5.5.7-1-mbp
Here's make.log.
Unfortunately, I can't build virtualbox-host-dkms with this kernel, is is possible to update this to the latest kernel? Or do the patches need updating to do that?
edit: It looks like a simple rebuild will work
Hi, just a quick question: Where did the package repository (http://dl.t2linux.org/archlinux/$repo/$arch) go?
I recently tried to update arch, but the package repo failed to update.
Best regards
Stefan
This holds for both 8cca9c0 and 7f38ded. Using prebuilt packages from packages.aunali1.com. Model: MacBookPro15,1 (MV902xx/A). This is still an issue when using the default Arch Linux kernel, but given all of the other newer MBP-specific issues that this project fixes, maybe this issue is not completely irrelevant.
Commented out kernel modules listed in /etc/mkinitcpio.conf
, removed all dkms modules, and re-ran mkinitcpio
. There were no errors making the initcpios with mkinitcpio -k /boot/vmlinuz-linux-mbp -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-mbp.img
. Also commmented out udev rules, everything in /etc/modules-load.d
, and /etc/modprobe.d
. Tried the linux
kernel as well. Same result (black screen)
Kernel parameters: cryptdevice=UUID=...:cryptroot root=/dev/mapper/cryptroot audit=0 loglevel=3 quiet
The laptop's screen is completely black, but my 2 external monitors are usable. They both show the same screen, trying to split them with xrandr
yields:
xrandr: Output eDP is not disconnected but has no modes
Disabling all video drivers, Xorg uses modesetting. The 2 external displays can show separate screens, xrandr
detects the MBP's main display and calls it the primary display, and the screen's backlight turns on when starting X, but the MBP screen itself stays black.
Output of ls -1 /dev/dri
:
by-path
card0
renderD128
Nothing sticks out to me in dmesg -e
or journalctl -xe
. When comparing logs, everything I see that fails in 5.6.x also failed in 5.5.18 and does not seem related to the black screen.
Hello,
The certificate "aunali1.com" of your repo just expired.
Ondrej B.
Does this include MCMrARM/mbp2018-bridge-drv or will I need to install separately?
Respect for your work, but could you give a bit of guidance on how to get till running linux with this? Have been through multiple wikis now and I still cant grasp it.
I see you put all modules here https://packages.aunali1.com/archlinux/mbp/x86_64/ is there a way to build linux using them? As I recall you need to have bzImage to start up linux
I followed the instructions as mentioned here, making sure to install the linux-mbp
and linux-mbp-headers
from the repo http://dl.t2linux.org/archlinux/$repo/$arch. It installed 5.12.19-2 version of the kernel and the headers. However, even after installing them, I still do not have keyboard, trackpad and touchbar working.
When installing the packages, pacman gives the following errors:
(3/5) Install DKMS modules
==> dkms install --no-depmod apple-ibridge/0.1 -k 5.12.19-2-mbp
Deprecated feature: REMAKE_INITRD
Error! Bad return status for module build on kernel: 5.12.19-2-mbp (x86_64)
Consult /var/lib/dkms/apple-ibridge/0.1/build/make.log for more information.
==> WARNING: `dkms install --no-depmod apple-ibridge/0.1 -k 5.12.19-2-mbp' exited 10
==> dkms install --no-depmod macbook12-spi-driver/0+git.304 -k 5.12.19-2-mbp
Error! Bad return status for module build on kernel: 5.12.19-2-mbp (x86_64)
Consult /var/lib/dkms/macbook12-spi-driver/0+git.304/build/make.log for more information.
==> WARNING: `dkms install --no-depmod macbook12-spi-driver/0+git.304 -k 5.12.19-2-mbp' exited 10
==> dkms install --no-depmod apple-bce/r185.f93c656 -k 5.12.19-2-mbp
Error! Bad return status for module build on kernel: 5.12.19-2-mbp (x86_64)
Consult /var/lib/dkms/apple-bce/r185.f93c656/build/make.log for more information.
==> WARNING: `dkms install --no-depmod apple-bce/r185.f93c656 -k 5.12.19-2-mbp' exited 10
When I checked the make.log
files for the three modules apple-bce
, apple-ibridge
and macbook12-spi-driver
, it shows me the following
After searching for the issue, I found out that downgrading gcc
and gcc-libs
should fix the issue (source). I tried downgrading gcc
by downloading gcc-8.3.0
from here but it's showing me
error: missing package metadata in gcc-8.3.0.tar.xz
error: 'gcc-8.3.0.tar.xz': invalid or corrupted package
The above make.log
screenshot I've posted is the same for all three.
What should I be doing to get this to work?
When I update from 5.4.6-1
to 5.4.7-1
, systemd complains that it can't load Kernel Modules. I then have non working keyboard and mouse and my hfsplus formated drive can't be mounded by systemd.
Thank you for this patch!
I'm using this for my macbookair9,1(2020), and enjoy it!
Its DEVICE_ID has 0x0280, I would like to add this id as USB_DEVICE_ID_APPLE_WELLSPRINGXX_T2_X
.
Where can I find the version WELLSPRING"XX" ?
https://github.com/74th/linux-mbp-arch/blob/9faed1ed80f32b1a47c68a2a3f084cd5419de106/4001-touchpad.patch
I think it's same as MacBookPro16,1, since MacbookAir9,1 was released after MacbookPro16,1.
@aunali1 I'm very thankful to you for kind help with keyboard and touchpad. But unfortunately I found that my touchbar is not working so I did the followings
git clone https://github.com/roadrunner2/macbook12-spi-driver.git /usr/src/apple-ibridge-0.1
dkms install -m apple-ibridge -v 0.1
modprobe apple-ib-tb
modprobe apple-ib-als
I also tagged Apple-ibridge to mkinitcpio.conf
Mkinitcpio -p Linux-mbp
Reboot
But that didn't help
Hope the information here and in the attached photo helps to sort out my problem thanks in advance
Will it ever be versions of these patches for more recent kernels like 5.14.xx?
I installed the kernel using makepkg-si then mkinitcpio -p Linux-mbp but when i boot using refind it dropped me to emergency shell any help will be appreciated
My Hardware: MacBookPro16,1
After upgrading from kernel 5.7.17 to 5.8.10 the apple-bce
module doesn't work for me anymore. I get the following error:
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce-vhci: Possible desync, cmd cancel timed out
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_dequeue 81
Sep 21 19:13:46 myhost kernel: general protection fault, probably for non-canonical address 0x2f316273752f6963: 0000 [#1] PREEMPT SMP PTI
Sep 21 19:13:46 myhost kernel: CPU: 8 PID: 420 Comm: kworker/u24:3 Tainted: G W OE 5.8.10-1-mbp #1
Sep 21 19:13:46 myhost kernel: Hardware name: Apple Inc. MacBookPro16,1/Mac-E1008331FDC96864, BIOS 1037.147.1.0.0 (iBridge: 17.16.16065.0.0,0) 07/09/2020
Sep 21 19:13:46 myhost kernel: Workqueue: bce-vhci-tq-state bce_vhci_urb_cancel_w [apple_bce]
Sep 21 19:13:46 myhost kernel: RIP: 0010:usb_hcd_check_unlink_urb+0xf/0x50
Sep 21 19:13:46 myhost kernel: Code: 09 d0 89 47 7c 48 8b 47 60 f0 ff 80 60 02 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 89 d7 48 8b 56 48 48 8d 4e 18 <48> 8b 42 18 48 83 c2 18 48 39 d0 75 0a eb 18 48 8b 00 48 39 d0 74
Sep 21 19:13:46 myhost kernel: RSP: 0018:ffffbd3e810a7e58 EFLAGS: 00010046
Sep 21 19:13:46 myhost kernel: RAX: ffffa2cbb79770e8 RBX: ffffa2cbb1aa4b28 RCX: ffffa2cbb7632318
Sep 21 19:13:46 myhost kernel: RDX: 2f316273752f6963 RSI: ffffa2cbb7632300 RDI: 00000000ffffff94
Sep 21 19:13:46 myhost kernel: RBP: ffffa2cbb14d2700 R08: 0000000000000000 R09: ffffa2cbbeb2c470
Sep 21 19:13:46 myhost kernel: R10: 000000000000025c R11: 00000000000000a9 R12: 0000000000000246
Sep 21 19:13:46 myhost kernel: R13: ffffa2cbb7632300 R14: ffffa2cbb1aa4b78 R15: 00000000ffffff94
Sep 21 19:13:46 myhost kernel: FS: 0000000000000000(0000) GS:ffffa2cbbec00000(0000) knlGS:0000000000000000
Sep 21 19:13:46 myhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 21 19:13:46 myhost kernel: CR2: 00000000022bca78 CR3: 000000065640a005 CR4: 00000000003606e0
Sep 21 19:13:46 myhost kernel: Call Trace:
Sep 21 19:13:46 myhost kernel: bce_vhci_urb_cancel_w+0x71/0x130 [apple_bce]
Sep 21 19:13:46 myhost kernel: process_one_work+0x1da/0x3d0
Sep 21 19:13:46 myhost kernel: worker_thread+0x4d/0x3d0
Sep 21 19:13:46 myhost kernel: ? rescuer_thread+0x410/0x410
Sep 21 19:13:46 myhost kernel: kthread+0x142/0x160
Sep 21 19:13:46 myhost kernel: ? __kthread_bind_mask+0x60/0x60
Sep 21 19:13:46 myhost kernel: ret_from_fork+0x22/0x30
Sep 21 19:13:46 myhost kernel: Modules linked in: xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_nat br_netfilter bridge stp llc intel_rapl_msr iTCO_wdt intel_pmc_bxt iTCO_vendor_support overlay 8250_dw mei_hdcp ccm algif_aead des_generic libdes ecb algif_skcipher cmac md4 algif_hash intel_rapl_common af_alg a>
Sep 21 19:13:46 myhost kernel: acpi_tad evdev apple_bl ac mac_hid nf_log_ipv6 ip6t_REJECT nf_reject_ipv6 xt_hl ip6t_rt nf_log_ipv4 nf_log_common ipt_REJECT nf_reject_ipv4 xt_LOG xt_limit xt_addrtype xt_tcpudp xt_conntrack ip6table_filter ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_co>
Sep 21 19:13:46 myhost kernel: ---[ end trace db9e719f23512838 ]---
Sep 21 19:13:46 myhost kernel: RIP: 0010:usb_hcd_check_unlink_urb+0xf/0x50
Sep 21 19:13:46 myhost kernel: Code: 09 d0 89 47 7c 48 8b 47 60 f0 ff 80 60 02 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 89 d7 48 8b 56 48 48 8d 4e 18 <48> 8b 42 18 48 83 c2 18 48 39 d0 75 0a eb 18 48 8b 00 48 39 d0 74
Sep 21 19:13:46 myhost kernel: RSP: 0018:ffffbd3e810a7e58 EFLAGS: 00010046
Sep 21 19:13:46 myhost kernel: RAX: ffffa2cbb79770e8 RBX: ffffa2cbb1aa4b28 RCX: ffffa2cbb7632318
Sep 21 19:13:46 myhost kernel: RDX: 2f316273752f6963 RSI: ffffa2cbb7632300 RDI: 00000000ffffff94
Sep 21 19:13:46 myhost kernel: RBP: ffffa2cbb14d2700 R08: 0000000000000000 R09: ffffa2cbbeb2c470
Sep 21 19:13:46 myhost kernel: R10: 000000000000025c R11: 00000000000000a9 R12: 0000000000000246
Sep 21 19:13:46 myhost kernel: R13: ffffa2cbb7632300 R14: ffffa2cbb1aa4b78 R15: 00000000ffffff94
Sep 21 19:13:46 myhost kernel: FS: 0000000000000000(0000) GS:ffffa2cbbec00000(0000) knlGS:0000000000000000
Sep 21 19:13:46 myhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 21 19:13:46 myhost kernel: CR2: 00000000022bca78 CR3: 000000065640a005 CR4: 00000000003606e0
Sep 21 19:13:46 myhost kernel: note: kworker/u24:3[420] exited with preempt_count 1
As recommended in #22 I load the module before any hooks are run:
MODULES=(apple-bce)
HOOKS=(base udev autodetect modconf block keyboard encrypt filesystems fsck)
The keyboard works while entering the password to decrypt the filesystem, after that I get the errors from above and the computer shuts down after a while.
Hi,
I am new to this. So, could you please help me out for installing this on Ubuntu? @aunali1
I've recently upgraded to big sur. After some unsuccessful boot attempts into Arch Linux (it crashed during boot several times) it booted and keyboard was functional a entered my login credentials and started gnome desktop environment by typing
systemctl start gdm 
It started and my touchpad was also functional but unfortunately my touchbar was not functioning correctly although it was functional before upgrading to big sur...
@aunali1 what do you advising me to do? And please help me should I remove Arch Linux and install it virtually on macOS or should I deal with these inconsistencies that arch Linux on Mac has? Thank you @aunali1 in advance...
I could not proceed with the ISO build since it couldn't verify the linux-mpb
and linux-mbp-headers
packages.
There also seems to be an issue with the repo server as the download keeps on getting cut-off and I had to retry the download multiple times.
Archiso build fails due to this error.
I tried building a base arch linux iso from releng without adding the mbp repo and archiso would build the image without problems. Upon adding the linux-mbp and linux-mbp-headers packages instead of the default linux and linux-headers, the build would then fail with the error I mentioned in the title.
EDIT: It seems like the cause of this is because the resulting kernel file name in work/x86_64/airootfs/boot
is vmlinuz-linux-mbp
but mkinitcpio is expecting a vmlinuz-linux
file instead.
Hi,
I'm trying to make my 2019 Air work with Arch. I pacstrapped base and linux-firmware, then installed linux-mbp and apple-bce-git from your repository.
It boots but the keyboard doesn't work. I'm not able to find out what it's wrong or even if this is supposed to work, but if you want to add support for this model I'm willing to help testing things.
Cheers
The root partition device can not be found during boot; though GRUB resides on the same drive and is able to detect the root partition. In the emergency shell, only the internal drive is listed. Are there additional drivers that need to be baked into the initrd to detect an external drive on USB? A previous install when on MacOS 10.14 worked, now attempting to create a new install after the MacOS 11 update.
Hi, thank you so much for your work! Do you have any plans to submit these patches?
Need the 4364 files and your site is 404.
Hi, does this patched Linux kernel support the newly released mbp 2019 16inch?
Hi,
I followed the tutorial on https://t2linux.org/ but I'm stuck in the instalation of Arch.
Get errors and I can't connect or scan my wifi with iwctl I tried even just the command.
$ iwctl --passphrase passphrase station device connect SSID
but didn't work my errors are.
[1814.538323] ieee80211 phy0: brcmf_msgbuf_query_dcmd: Timeout on response for query command
[1814.538443] ieee80211 phy0: brcmf_run_escan: error (-5)
[1814.538511] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-5)
I have a macbook air 2020
I had to install these packages:
I also got an error in line 233 of PKGBUILD, where it says "removing unneeded files", it said "no such file or directory". I just uncommented it, but I guess it makes the package bigger.
This happens with wget, firefox and pacman. Unfortunately there seems to be an SSL error on your server.
I can use wget to get it, but unfortunately not pacman which makes the repository not work as intended.
wget log:
linux-mbp-5.2.14-3-x86_64.pkg.tar.xz 76%[++++++++++++++++++++++++++==============================================================> ] 55.86M 4.64MB/s in 7.9s
2019-09-16 16:55:46 (4.99 MB/s) - Read error at byte 58574290/76319228 (Error in the pull function.). Retrying.
I've tried from my PC running arch and the macbook pro, I'm trying to install the kernel on. I'm not sure what the issue is but there's some kind of SSL error
edit: wget even needs tries=inf as the default of 20 is not enough. It keeps getting disconnected.
When I use the latest version of it .Probably 5.8 When I run uname -r. It shows 5.5.13. This will affect driver installation.Maybe you could correct version.
Model: MacBookPro15,1
CPU: i7-9750H
As it's known that 15-inch MBPs suffer a throttling issue due to overheating of VRM. This issue is partly resolved by Apple's factory undervolting the CPU.
It turns out that the throttling issue still exists when running Linux, which features very few optimizations specifically for this particular hardware. The issue is even more serious in Linux, as the CPU runs at 0.8GHz even nothing is being done.
So, I think there might be a significant effect after undervolting the CPU.
I've tried several undervolting tools (intel-undervolt, for example). They doesn't work properly (problems like "values do not equal", etc). It seems that the adjustments are blocked.
Is there any possibility to work around?
I updated the kernel version from 5.7.17-1 to 5.8.10-1 today.
After rebooting I noticed that the fans in my mbp were speeding up. After a while (3 minutes or so) my mbp completely freezed and I had to manually shutdown.
Unfortunately I do not have dmesg output for this issue. I immediately switched back to kernel 5.7.17-1 without further investigation.
However, maybe someone else has the same issue and knows whats going on.
Hello,
first of all thanks for the amaizing work you put into this.
Today I encountered an issue when trying to download the compiled kernel from your repository.
The connection simply times out. Tried few machines on different networks but always with the same end.
Even the Build status link is not working.
Hope this is just a glitch and you are not shutting it down :)
Thanks
O.
Sorry if this isn't the best place to ask but. Currently, each time there's a kernel update, it requires manually rebuilding and updating the bce driver. It would be great if you could also include this in your repo as if you forget, it requires a USB keyboard to rebuild.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.