-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Audio! Macbook pro 14.1! Running Arch Linux #134
Comments
If I use usb headphones I get audio. If I use the audio-jack I get nothing. |
Just checked under Ubuntu - I see Built in Analog Audio under pavucontrol Output Device and under Configuration I see Analog Stereo Duplex. Current suspicion is my audio module is not loaded - unfortunately there is a base kernel module with same name now which if loaded means audio wont work ie just because you see the module doesnt mean its my module. The audio jack has problems - you need to explicitly set it as the output (it should switch if you plug in while playing) - but headphones work for me for output - input has issues. PS I have confirmed on my machine (basic Ubuntu) if I use the system version of the sound module I get Dummy Output not pro audio - you must have something extra in your audio setup - unless its a kernel version issue. |
I have a 14,1 running Ubuntu which also lost sound recently. $ sudo ./install.cirrus.driver.sh $ uname -mrs $ apt-cache search linux-generic $ sudo ./install.cirrus.driver.sh |
Hey David, So I think the kernel module isnt being loaded. How would I check which one is? I am running i3, using pavucontrol via pipwire |
I could have the wrong kernel I followed the t-2 linux guideline lol Could I compile the kernel and just apply your patches? |
It may be OK - if you didnt see build errors when running the install script it likely created the module - for a while now new kernel versions havent had changes which cause the module not to build. So the usual kernel structure is that kernel modules are stored under /lib/modules using eg for me with 6.8 kernel and ubuntu the folder 6.8.0-40-generic (if using a generic kernel). Note that the 40 can vary. If my module exists under updates you can live dangerously and do the following. Obviously at some point should move the original kernel module back - and redo sudo depmod -a. |
Hello, I'm not entirely sure if this is the right place to ask this, but I have tried to build this kernel module patch for NixOS but haven't been successful in getting it to install. There is a patch that was applied to enable the cs8409 codec which might be similar. The audio driver loaded by the sound card on my mac is |
This is a good enough place - which model do you have - MacBook Pro 14.1 as in the title?? |
I think I'm going to have to switch distros for this to work properly, I was using NixOS with the hardware tree enabled and it mentioned the codec that is patched here simply being enabled not patched. I am not aware of an easy way to write a nix script to build and patch the module because of the way this system builds the patched module. If you have any better insight in how to get that patched, I'd greatly appreciate it :) |
Ive never used NixOS so cant really help - from what little Ive seen is seems quite different to other distributions. |
Yeah it has something similar to that, but the structure is dependent on the nix store, so for current kernel the |
I just found the following - which seems to have a description on how to build out of tree kernel modules - and has an example script. |
Ah I did see that blog post, I think what I'm getting lost in is reading your scripts and makefile there are some hardcoded paths that I'll have to modify. But also that it doesn't seem like the script builds the module more than it patches the existing module, but I could be wrong? I think I'll have to go through the install script you provide and rewrite that into the nix build script, which if I find time this week I'll try to do.
…________________________________
From: davidjo ***@***.***>
Sent: Tuesday, October 1, 2024 9:23:04 AM
To: davidjo/snd_hda_macbookpro ***@***.***>
Cc: naed3r ***@***.***>; Comment ***@***.***>
Subject: Re: [davidjo/snd_hda_macbookpro] No Audio! Macbook pro 14.1! Running Arch Linux (Issue #134)
I just found the following - which seems to have a description on how to build out of tree kernel modules - and has an example script.
See https://blog.prag.dev/building-kernel-modules-on-nixos
—
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJWEPOI4GRRPTVYVOIT3CUDZZK45JAVCNFSM6AAAAABNBADSGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBWGMYDMMJSGE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Essentially the install script does 2 things:
(note that when I started I did all this manually, set up the build directory then manually run the kernel Makefile). So it seems to me you could update the postUnpack phase to do the file copying/patching and adjust the buildPhase to use the build directory (as far as I can tell the $sourceroot/blackmagic-.. directory is the out of kernel source module directory). |
Ohhh ok this was very helpful, so what I'm thinking is getting the sources for the module by hand, applying your patch, and then running a kernel module build on that instead of trying to shoehorn your script into my build script for nix. I'm thinking maybe this should be a different issue so we can document it in case other people come along and try the same thing? Thats up to you though, since I'll have time later today I might give that a try and see how far it will take me :) |
Sadly I ran out of time, and painfully ended up hopping distros to fedora, If I end up not getting swamped with school and feel like attempting this again, I might but for now I just wanted a working system. Sorry for taking up your time in this issue :/ |
One of the reasons I stick with one linux OS is precisely this - I just want a working system - just dont want to get involved with multiple OS types. |
Hey! Been a while sorry, I decided to just use bluetooth headphones and call it day. I ran I saw in #63 >When I reset the NVRAM, audio works for the first boot. Thereafter, it's dead again, until I reset the NVRAM again. Then from #80 seems like a boot issue. Solution which has worked even with reboot, and suspend etc was to simply update my grub bootloader after NVRAM reset |
explicitly I ran
|
So, I came across this thread and also had time to try things out. In case you want to give NixOS another shot, I also found this post for building and installing the snd_hda_cs8409 as a module. I am using NixOS on a macbookpro 14,1, with nixos-24.05. I modified the first {
# ... description stuff ...
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = inputs@{ self, nixpkgs, nixos-hardware }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
# ... stuff ...
packages = {config, ...}: ({
boot.extraModulePackages = [
(pkgs.callPackage ./snd_hda_codec_cs8409.nix {
kernel = config.boot.kernelPackages.kernel;
})
];
});
in
{
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
packages
./configuration.nix
nixos-hardware.nixosModules.apple-macbook-pro-14-1
];
};
};
} As a reminder, when copying Makefile code over, be wary of (eliminated) tabs ! There should be some before the two "make"s after colons. Fortunately, I didn't waste much time on it, but I know my past self would had. My plan was to try and build that, see it fail, then modify it using the diff files from this repo. To my surprise, once I rebooted my system, I had another "Built-in Audio Pro" entry listed as a sounds device, and it just works ! I think maybe this has something to do with this PR on nixos-hardware, but to be honest, this is a bit out of my depth so don't quote me on that. Edit: Input audio doesn't work. Then, I'm guessing the situation is similar to what's listed on this repo. |
Hi Folks. I'm just posting my findings here and what worked for me. I'm not 100% sure it will work for you, but it's quick and easy to try... See TLDR at the end if you're impatient . Here goes: I've a MacbookPro14,1, Arch, via GRUB. No other OS on the machine. I've installed Audio not working. I get I also have a MacbookPro13,3 and that works fine using similar patches. Difference being that the 13,3 runs via rEFInd alongside macOS. Audio works, flawlessly. I then by chance read something about trying to boot but by holding the Option key, and manually selecting your EFI boot. Doing this, the audio worked! I kept using the machine that way, but each time I turned it on and forgot to hold Option I had to reboot. Less than ideal. I then kept reading and found a random old post about EFI, DSDT and CRS. You can read more here if you want: https://discussions.apple.com/thread/250137979?sortBy=rank&page=1 I then just thought I'd give the I'm guessing rEFInd somehow discards the ACPI PCI init stuff (lack of understanding on my part, calling it stuff...), but GRUB kept it. Manually specifying the Anyway, hope this could help someone. TLDR: Boot by holding option key and selecting your EFI option. If audio works, try setting the EDIT: turns out, the EFI vars are persistent when you reboot, but not power cycle. My testing after adding |
I run the make with no errors.
Heres the specs:
➜ ~ inxi -Fxxrzc0 System: Kernel: 6.10.6-arch1-Adashima-T2-1-t2 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1 Console: pty pts/0 DM: startx Distro: Arch Linux Machine: Type: Laptop System: Apple product: MacBookPro14,1 v: 1.0 serial: <superuser required> Chassis: type: 9 v: Mac-B4831CEBD52A0C4C serial: <superuser required> Mobo: Apple model: Mac-B4831CEBD52A0C4C v: MacBookPro14,1 serial: <superuser required> UEFI: Apple v: 499.40.2.0.0 date: 08/22/2022 Battery: ID-1: BAT0 charge: 39.8 Wh (100.0%) condition: 39.8/54.6 Wh (72.8%) volts: 12.8 min: 11.4 model: SMP bq20z451 serial: N/A status: full CPU: Info: dual core model: Intel Core i5-7360U bits: 64 type: MT MCP arch: Amber/Kaby Lake note: check rev: 9 cache: L1: 128 KiB L2: 512 KiB L3: 4 MiB Speed (MHz): avg: 3591 high: 3597 min/max: 400/3600 cores: 1: 3591 2: 3589 3: 3597 4: 3589 bogomips: 18406 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx Graphics: Device-1: Intel Iris Plus Graphics 640 vendor: Apple driver: i915 v: kernel arch: Gen-9.5 ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:5926 Display: unspecified server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.2 driver: X: loaded: modesetting alternate: fbdev,intel,vesa dri: iris gpu: i915 tty: 108x28 Monitor-1: eDP-1 model: Apple Color LCD res: 2560x1600 dpi: 227 diag: 337mm (13.3") API: OpenGL Message: GL data unavailable in console, glxinfo missing. Audio: Device-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9d71 Device-2: Broadcom 720p FaceTime HD Camera driver: N/A pcie: speed: 5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 14e4:1570 API: ALSA v: k6.10.6-arch1-Adashima-T2-1-t2 status: kernel-api Server-1: PipeWire v: 1.2.2 status: active with: 1: pipewire-pulse status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin Network: Device-1: Broadcom BCM4350 802.11ac Wireless Network Adapter vendor: Apple driver: brcmfmac v: kernel pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 14e4:43a3 IF: wlan0 state: up mac: <filter> Drives: Local Storage: total: 233.76 GiB used: 10.91 GiB (4.7%) ID-1: /dev/nvme0n1 vendor: Apple model: SSD SM0256L size: 233.76 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 37.9 C Partition: ID-1: / size: 232.76 GiB used: 10.59 GiB (4.5%) fs: btrfs dev: /dev/nvme0n1p2 ID-2: /boot size: 1021.9 MiB used: 330.2 MiB (32.3%) fs: vfat dev: /dev/nvme0n1p1 ID-3: /home size: 232.76 GiB used: 10.59 GiB (4.5%) fs: btrfs dev: /dev/nvme0n1p2 ID-4: /var/log size: 232.76 GiB used: 10.59 GiB (4.5%) fs: btrfs dev: /dev/nvme0n1p2 Swap: ID-1: swap-1 type: zram size: 3.81 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0 Sensors: System Temperatures: cpu: 58.0 C mobo: N/A Fan Speeds (rpm): N/A Repos: Packages: pm: pacman pkgs: 769 Active pacman repo servers in: /etc/pacman.conf 1: https://mirror.funami.tech/arch-mact2/os/x86_64 Active pacman repo servers in: /etc/pacman.d/mirrorlist 1: https://archlinux.uk.mirror.allworldit.com/archlinux/$repo/os/$arch 2: https://mirror.osbeck.com/archlinux/$repo/os/$arch 3: https://archlinux.mailtunnel.eu/$repo/os/$arch 4: https://london.mirror.pkgbuild.com/$repo/os/$arch 5: https://geo.mirror.pkgbuild.com/$repo/os/$arch 6: https://mirror.moson.org/arch/$repo/os/$arch 7: https://packages.oth-regensburg.de/archlinux/$repo/os/$arch 8: https://mirror.ubrco.de/archlinux/$repo/os/$arch 9: https://europe.mirror.pkgbuild.com/$repo/os/$arch 10: https://arch.phinau.de/$repo/os/$arch 11: https://arch.mirror.constant.com/$repo/os/$arch 12: https://archlinux.thaller.ws/$repo/os/$arch 13: https://md.mirrors.hacktegic.com/archlinux/$repo/os/$arch 14: https://america.mirror.pkgbuild.com/$repo/os/$arch 15: https://archlinux.za.mirror.allworldit.com/archlinux/$repo/os/$arch 16: https://archlinux.c3sl.ufpr.br/$repo/os/$arch 17: https://seoul.mirror.pkgbuild.com/$repo/os/$arch 18: https://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch 19: https://asia.mirror.pkgbuild.com/$repo/os/$arch 20: https://sydney.mirror.pkgbuild.com/$repo/os/$arch Info: Memory: total: 8 GiB available: 7.63 GiB used: 1.21 GiB (15.9%) Processes: 190 Power: uptime: 5m wakeups: 0 Init: systemd v: 256 default: graphical Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: Zsh v: 5.9 running-in: pty pts/0 inxi: 3.3.35
checked the usual, I dont have an audio out other than "pro audio" via pavucontrol but that does nothing. Im fairly stumped.
The text was updated successfully, but these errors were encountered: