davidjo / snd_hda_macbookpro

Kernel audio driver for Macs with 8409 HDA chip + MAX98706/SSM3515 amps
GNU General Public License v2.0
279 stars 60 forks source link

No Audio! Macbook pro 14.1! Running Arch Linux #134

Open LukeW2002 opened 2 weeks ago

LukeW2002 commented 2 weeks ago

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.

LukeW2002 commented 2 weeks ago

If I use usb headphones I get audio. If I use the audio-jack I get nothing.

davidjo commented 2 weeks ago

Just checked under Ubuntu - I see Built in Analog Audio under pavucontrol Output Device and under Configuration I see Analog Stereo Duplex. Dont know where pro audio is coming from. What desktop environment are you running? Under Ubuntu gnome has a settings app which also shows the audio setup and you can set the output device etc. - havent used pavucontrol for a while.

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. OK just noticed you are running kernel 6.10 not 6.8.

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.

KevinDoughty commented 2 weeks ago

I have a 14,1 running Ubuntu which also lost sound recently.

$ sudo ./install.cirrus.driver.sh Ubuntu linux kernel source not found in /usr/src: /usr/src/linux-source-6.8.0.tar.bz2 assuming the linux kernel source package is not installed please install the linux kernel source package: sudo apt install linux-source-6.8.0 NOTE - This does not work for HWE kernels

$ uname -mrs Linux 6.8.0-40-generic x86_64

$ apt-cache search linux-generic $ sudo apt install linux-modules-extra-6.8.0-40-generic Reading package lists... Done Building dependency tree... Done Reading state information... Done linux-modules-extra-6.8.0-40-generic is already the newest version (6.8.0-40.40~22.04.3). linux-modules-extra-6.8.0-40-generic set to manually installed. The following packages were automatically installed and are no longer required: apturl apturl-common ffmpeg libavdevice58 libcue2 libdc1394-25 libdecor-0-0 libdecor-0-plugin-1-cairo libdvdnav4 libexiv2-27 libgexiv2-2 libgsf-1-114 libgsf-1-common liblua5.2-0 libmujs1 libopenal-data libopenal1 libplacebo192 libsdl2-2.0-0 libsixel1 libsndio7.0 libtracker-sparql-3.0-0 libwpe-1.0-1 libwpebackend-fdo-1.0-1 mpv nautilus-data python3-brotli python3-mutagen python3-proton-vpn-connection python3-proton-vpn-killswitch python3-proton-vpn-session python3-pycryptodome python3-pyxattr python3-websockets rtmpdump Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.

$ sudo ./install.cirrus.driver.sh Ubuntu linux kernel source not found in /usr/src: /usr/src/linux-source-6.8.0.tar.bz2 assuming the linux kernel source package is not installed please install the linux kernel source package: sudo apt install linux-source-6.8.0 NOTE - This does not work for HWE kernels

LukeW2002 commented 2 weeks ago

Hey David,

So I think the kernel module isnt being loaded. How would I check which one is? If its an issue with the kernel I could downgrade?

I am running i3, using pavucontrol via pipwire

LukeW2002 commented 2 weeks ago

I could have the wrong kernel I followed the t-2 linux guideline lol

Could I compile the kernel and just apply your patches? Im not well versed on kernel development

davidjo commented 2 weeks ago

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. One thing to look for in the kernel log files (usually under /var/log either syslog or kern.log) is a line containing "Primary patch_cs8409 NOT FOUND trying APPLE" - this is my print to indicate my module is loaded.

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. Non ubuntu may see something like 6.10.6-generic. In that folder, the default kernel module is stored under kernel/sound/pci/hda - snd-hda-codec-cs8409.ko (or possibly snd-hda-codec-cs8409.ko.zst). My module should be installed in another directory updates (directly under for me 6.8.0-40-generic). So first check if there is a module snd-hda-codec-cs8409.ko in that folder - if not then you wont get sound - the default module will be loaded. This directory updates is special for kernel modules - modules with the same name as an existing module (only file name needs to match ie just the snd-hda-codec-cs8409 part) should override an existing module and get loaded in preference to the existing module (this does require a sudo depmod -a being done - the install script should be doing this).

If my module exists under updates you can live dangerously and do the following. Move the existing kernel module (ie under kernel/sound/pci/hda) to somewhere else safe in the file system (will need sudo). Run sudo depmod -a, reboot and see if you get sound. (I have done this procedure a number of times to really ensure my module is being loaded when having issues).

Obviously at some point should move the original kernel module back - and redo sudo depmod -a.