No sound on an iMac 27 5k 2017

Hello,

I just installed fedora 37 on an iMac 27 18,3. Everything is fine except there is no sound.


settings/sound/

  • the selected output device is Dummy output and there is no other choice.
  • there is no input.

uname -srm

Linux 6.1.8-200.fc37.x86_64 x86_64

lpsci -v

00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31)
	Subsystem: Intel Corporation Device 7270
	Flags: bus master, fast devsel, latency 64, IRQ 60
	Memory at 92720000 (64-bit, non-prefetchable) [size=16K]
	Memory at 4000000000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
	Flags: bus master, fast devsel, latency 0, IRQ 61
	Memory at 92660000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

lsmod | grep snd

snd_seq_dummy          16384  0
snd_hrtimer            16384  1
snd_hda_codec_cs8409    36864  1
snd_hda_codec_generic    98304  1 snd_hda_codec_cs8409
snd_hda_codec_hdmi     86016  1
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_intel          61440  3
snd_intel_dspcfg       36864  1 snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_hda_codec         184320  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_codec_cs8409,snd_hda_intel
snd_hda_core          114688  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_codec_cs8409,snd_hda_intel,snd_hda_codec
snd_hwdep              16384  1 snd_hda_codec
snd_seq                94208  7 snd_seq_dummy
snd_seq_device         16384  1 snd_seq
snd_pcm               151552  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              49152  3 snd_seq,snd_hrtimer,snd_pcm
snd                   126976  18 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_codec_cs8409,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
soundcore              16384  1 snd

cat /proc/asound/card0/codec* | grep Codec

Codec: Cirrus Logic CS8409

cat /proc/asound/card1/codec* | grep Codec

Codec: ATI R6xx HDMI

From the search results, I see this a known issue.

Most topics don’t provide a solution (ie on ask fedora /t/intel-audio-issues/19370/32).

This topic seems to be similar, but it points to this kernel module which I don’t know how to use.

Also, I tried

sudo nano /etc/modprobe.d/alsa-base.conf

options snd-hda-intel model=auto,imac27

But it does not work.


Do you know how to make the audio input and output work on an iMac 27 on linux?

Thank you

Linux Kernel Driver Database indicates the driver is available in Linux kernels: 5.15–5.19, 6.0–6.1, 6.2-rc+HEAD.

Here:

% find /lib/modules/ -name \*8409\*
/lib/modules/6.2.0-0.rc5.20230125git948ef7bb70c4.40.fc38.x86_64/kernel/sound/pci/hda/snd-hda-codec-cs8409.ko.xz
/lib/modules/6.1.7-200.fc37.x86_64/kernel/sound/pci/hda/snd-hda-codec-cs8409.ko.xz
/lib/modules/6.1.8-200.fc37.x86_64/kernel/sound/pci/hda/snd-hda-codec-cs8409.ko.xz

Your lsmod | grep snd shows it is loaded, and used by snd_hda_codec_generic, so this looks like an alsa configuration glitch. On my older iMac, snd_hda_codec_cirrus is being used – it is also possible that snd-hda-codec-cs8409 is the wrong module for your hardware.

Thank you for your answer.

Do you have any idea of what I could try to make this work?

Is F37 a fresh install on bare metal? (VM’s and upgrades have their own problems)
Are you using Gnome and Wayland (F37 default) or some other desktop configuration?

You can try QA:Testcase PipeWire ALSA backend

Then:
Troubleshooting Fedora Sound Issues directs you to the alsa-info.sh that script collects details of your sound configuration that are required when reporting bugs to the ALSA Project.

You may need the also-info.sh when working through the steps at ALSA Project Sound Card Testing.

Yes this is a fresh install of Fedora 37 on bare metal (almost because there is a bug in F37 installer, I had to install F36 then upgrade to F37 like explained here).

I ran alsa-info, but I don’t have a working kernel like suggested in the link. The generated file is here. And I opened a bug report.

On my computer, /etc/asound.conf is empty and /etc/modprobe.d/alsa-base.conf does not exist. Is it normal?

Same here, I think this is normal yes.
If you want to find more config files/paths for alsa try the command whereis alsa
I get the following paths.

$ whereis alsa
alsa: /usr/lib/alsa /etc/alsa /usr/include/alsa /usr/share/alsa

It is the same here. Your “card 0” is the CS8409 chip. My system uses an older CS4206 chip, but it is being used for output:

!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CS4206 Analog [CS4206 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: CS4206 Digital [CS4206 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Your system is only using the HDMI audio. On my system:

!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Cirrus Logic CS4206
[...]
Node 0x02 [Audio Output] wcaps 0xd041d: Stereo Amp-Out

All the Audio Output nodes include “Amp-Out”.

Spent several hours shovelling snow, which gave time to for odd corners of my memory to wake up. I wonder if your audio amplifier isn’t known to linux. snd_hda_macbookpro issue 11 describes what is needed to suss out the amplifier details if you can’t find them on the web.

Sound cards have been problematic in linux over the years, so I have a couple USB audio devices, one a small dongle with a headphone jack and one with RCA and TOSLINK optical connectors for use with an external amplified and much better speakers.

iMac 21.5 inch 2017 Retina teardown says “Texas Instruments TAS5764L audio amplifier”. The same amplifiers were found in the [27 in Retina Pro teardown].(iMac Pro Teardown - iFixit), so almost certainly in
in yours. Integrated amplifiers are used in laptops, but these are likely more powerful, so
not surprising that they aren’t supported.

The amplifiers are “i2c” device, see: Instantiating i2c devices.

Thank you very much for this informations.

In the github issue you linked, there is a comment about the 2017 imac.

Then I read the insctructions on kernel.org, but I don’t understand what I should do. Which of the three methods should I use? How can I do that?

I found a solution here to have the audio output and the internal speakers working.

I installed this module.

Instruction for Fedora 37:

# install the kernel headers
sudo dnf install kernel-devel

# clone the repo of the module
git clone https://github.com/egorenar/snd-hda-codec-cs8409.git

# make and install
cd snd-hda-codec-cs8409
make
sudo make install

reboot.

The mic input is visible in the system settings but it still doesn’t work.

arecord -l

**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CS8409/CS42L83 Analog [CS8409/CS42L83 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

wpctl status

PipeWire 'pipewire-0' [0.3.65, fr@imac-valerie, cookie:1752673102]
 └─ Clients:
        31. uresourced                          [0.3.65, fr@imac-valerie, pid:1662]
        32. WirePlumber                         [0.3.65, fr@imac-valerie, pid:1684]
        33. WirePlumber [export]                [0.3.65, fr@imac-valerie, pid:1684]
        39. pipewire-pulse                      [0.3.65, fr@imac-valerie, pid:1846]
        41. GNOME Shell Volume Control          [0.3.65, fr@imac-valerie, pid:1720]
        43. GNOME Volume Control Media Keys     [0.3.65, fr@imac-valerie, pid:2001]
        44. xdg-desktop-portal                  [0.3.65, fr@imac-valerie, pid:2228]
        57. GNOME Settings                      [0.3.65, fr@imac-valerie, pid:2594]
        72. libcanberra                         [0.3.65, fr@imac-valerie, pid:2001]
        73. wpctl                               [0.3.65, fr@imac-valerie, pid:3554]

Audio
 ├─ Devices:
 │      46. Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [alsa]
 │      47. Built-in Audio                      [alsa]
 │  
 ├─ Sinks:
 │  *   54. Built-in Audio Analog Stereo        [vol: 0.82]
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  *   55. Built-in Audio Analog Stereo        [vol: 1.00]
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:
        58. GNOME Settings                                              
             60. input_FL        < CS8409/CS42L83 Analog:monitor_FL	[active]
             61. monitor_FL     
             62. input_FR        < CS8409/CS42L83 Analog:monitor_FR	[active]
             63. monitor_FR     
        59. GNOME Settings                                              
             64. input_FL        < CS8409/CS42L83 Analog:capture_FL	[active]
             65. monitor_FL     
             66. input_FR        < CS8409/CS42L83 Analog:capture_FR	[active]
             67. monitor_FR     

Video
 ├─ Devices:
 │      42. FaceTime HD Camera (Built-in)       [v4l2]
 │      45. FaceTime HD Camera (Built-in)       [v4l2]
 │  
 ├─ Sinks:
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  *   48. FaceTime HD Camera (Built-in) (V4L2)
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Settings
 └─ Default Configured Node Names:

Glad your speakers are working. It does take time for recent changes to make their way into the “official” kernel modules, so it is great when people like you contribute to testing recent changes.

Chances are that the same microphone is used on many models, so hoping most of the work needed to support yours has been done. According to hw-probe, the microphone on my iMac is a USB device:

 % grep -i microphone hw.info/logs/*
hw.info/logs/lsusb:        wTerminalType      0x0201 Microphone

linux-hardware.org usb:0d8c-0201
I think this is a C-Media Electronics CM6501, which is no longer listed on the C-Media
site.

HW probe of Apple Mac-BE088AF8C5EB4FA2... (iMac18,3) #f5246578fe looks like your model. It has no USB audio, but some teardowns have the microphone sharing cable with the camera.

At one time, Apple camera firmware could be used after copying it into linux

1 Like