No sound support on Linux AWS/Azure kernels (but supported on GCP)

Bug #1970586 reported by Pete Woods
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-aws (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Fix Released
Low
Tim Gardner
linux-azure (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Fix Released
Low
Tim Gardner

Bug Description

In GCP images it is possible to create virtual MIDI devices and generally do stuff like audio routing, etc.

At CircleCI, where we run many of our VMs on Ubuntu in GCP, several of our customers use this functionality to test audio equipment in their CI runs.

Unfortunately they cannot run their tests on our AWS based VMs, as there is no sound support compiled into the kernel on the AWS kernel and images.

See the package listings for the other kernels for, e.g. the loopback driver:
```
linux-modules-extra-5.4.0-99-generic: /lib/modules/5.4.0-99-generic/kernel/sound/drivers/snd-aloop.ko
linux-modules-extra-5.8.0-1031-oracle: /lib/modules/5.8.0-1031-oracle/kernel/sound/drivers/snd-aloop.ko
linux-modules-extra-5.8.0-1032-gcp: /lib/modules/5.8.0-1032-gcp/kernel/sound/drivers/snd-aloop.ko
```

We would love to be able to install the sound drivers (especially snd-aloop) with the linux-modules-extra-aws package, but currently cannot, and obviously do not want to start running our own kernels, as then we lose the immediacy of kernel patches provided upstream by Canonical.

You can see the difference in the GCP:
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-gcp/+git/jammy/tree/debian.gcp/config/config.common.ubuntu#n6884

and AWS kernel:
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-aws/+git/jammy/tree/debian.aws/config/config.common.ubuntu

again there. The reasoning for the removal appears to be in this commit from 2016:
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-aws/+git/jammy/commit/debian.aws/config/config.common.ubuntu?id=b5e310c4cc872c3fc7c7dd09ce67efb11eeaf07c

CVE References

Pete Woods (pete-woods)
description: updated
description: updated
description: updated
Pete Woods (pete-woods)
description: updated
Tim Gardner (timg-tpi)
Changed in linux-aws (Ubuntu Jammy):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :
Revision history for this message
Pete Woods (pete-woods) wrote :

Thankyou for doing this so quickly - let me see if I can get one of the customers setup to work with this kernel.

Revision history for this message
Pete Woods (pete-woods) wrote (last edit ):

I have asked the customer if they can provide a script so I get verify if their virtual MIDI devices will work on this new kernel (rather than guess at their needs).

Just guessing based on what they are doing at a high level, I think they'll need at least:

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DEVICE=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_SEQ_MIDI=m
CONFIG_SND_SEQ_MIDI_EMUL=m
CONFIG_SND_SEQ_MIDI_EVENT=m
CONFIG_SND_SEQ_VIRMIDI=m

Revision history for this message
Pete Woods (pete-woods) wrote :

With input from our customer, I have created a very simple NPM project to test out the sound / virtual MIDI support:

https://github.com/CircleCI-Public/midi-test

I'm getting the expected failures with it on the latest 22.04 AMI, so I'll try the new kernel next.

$ node .
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory

MidiOutAlsa::initialize: error creating ALSA sequencer client object.

ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory

MidiInAlsa::initialize: error creating ALSA sequencer client object.

ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory

MidiOutAlsa::initialize: error creating ALSA sequencer client object.

ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory

MidiInAlsa::initialize: error creating ALSA sequencer client object.

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Pete - try the kernel at https://kernel.ubuntu.com/~rtg/jammy-snd-aloop-lp1970586/5.15.0-1008.10~lp1970586.1/. It has all of the above listed config options set except CONFIG_SND_SEQ_MIDI_EMUL which requires CONFIG_SND_PCI. Lets see if you can get by without that.

rtg

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Pete - I forgot to mention that you may need to install linux-modules-extra in order to get some of these modules.

rtg

Revision history for this message
Pete Woods (pete-woods) wrote :

This appears to work with my simple script, and now pass the tests in the customer's MIDI library.

Thanks very much for your time here!

> mocha test/unit/*.js && node test/virtual-loopback-test-automated.js

  midi.Input
    ✔ should raise when not called with new
    ✔ should be an emitter
    .getPortCount
      ✔ .getPortCoun should return an integer
    .getPortName
      ✔ requires an argument
      ✔ requires an integer

MidiInAlsa::getPortName: error looking for port name!

      ✔ returns an empty string for unknown port
    .openPort
      ✔ requires an argument
      ✔ requires an integer
      ✔ requires a valid port
    .openVirtualPort
      ✔ requires an argument
      ✔ requires a string
    .on('message')
      ✔ allows promises to resolve

  midi.Output
    ✔ should raise when not called with new
    ✔ should not be an emitter
    .getPortCount
      ✔ should return an integer
    .getPortName
      ✔ requires an argument
      ✔ requires an integer

MidiOutAlsa::getPortName: error looking for port name!

      ✔ returns an empty string for unknown port
    .openPort
      ✔ requires an argument
      ✔ requires an integer
      ✔ requires a valid port
    .openVirtualPort
      ✔ requires an argument
      ✔ requires a string
    .closePort
      ✔ allows you to close a port that was not opened
    .send
      ✔ should require an array argument
    .sendMessage
      ✔ should require an array argument

  26 passing (61ms)

Enumerating inputs
Input found: Midi Through:Midi Through Port-0 14:0
Input found: RtMidi Output Client:node-midi Virtual Output 128:0
Enumerating outputs
Output found: Midi Through:Midi Through Port-0 14:0
Output found: RtMidi Output Client:node-midi Virtual Output 128:0
Sending message
Sending message
Sending message
Sending message

Revision history for this message
Tim Gardner (timg-tpi) wrote :
Tim Gardner (timg-tpi)
Changed in linux-aws (Ubuntu Jammy):
status: In Progress → Fix Committed
Changed in linux-aws (Ubuntu Jammy):
status: Fix Committed → Confirmed
status: Confirmed → Fix Committed
Tim Gardner (timg-tpi)
summary: - No sound support on Linux AWS kernel (but supported on GCP)
+ No sound support on Linux AWS/Azure kernels (but supported on GCP)
Changed in linux-azure (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → Tim Gardner (timg-tpi)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-aws/5.15.0-1009.11 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-jammy
Pete Woods (pete-woods)
tags: added: verification-done-jammy
removed: verification-needed-jammy
Stefan Bader (smb)
Changed in linux-azure (Ubuntu Jammy):
importance: Undecided → Low
Changed in linux-aws (Ubuntu):
status: New → Invalid
Changed in linux-azure (Ubuntu):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (102.2 KiB)

This bug was fixed in the package linux-aws - 5.15.0-1009.11

---------------
linux-aws (5.15.0-1009.11) jammy; urgency=medium

  * jammy/linux-aws: 5.15.0-1009.11 -proposed tracker (LP: #1974290)

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2022.04.18)

  * No sound support on Linux AWS/Azure kernels (but supported on GCP)
    (LP: #1970586)
    - [Config] aws: CONFIG_SOUND=m

  * config CONFIG_HISI_PMU for kunpeng920 (LP: #1956086)
    - [Config] aws: CONFIG_HISI_PMU=m

  * Miscellaneous Ubuntu changes
    - [Config] aws: Config update after rebase

  [ Ubuntu: 5.15.0-35.36 ]

  * CVE-2022-21499
    - SAUCE: debug: Lock down kgdb

  [ Ubuntu: 5.15.0-34.35 ]

  * jammy/linux: 5.15.0-34.35 -proposed tracker (LP: #1974322)
  * AMD APU s2idle is broken after the ASIC reset fix (LP: #1972134)
    - drm/amdgpu: unify BO evicting method in amdgpu_ttm
    - drm/amdgpu: explicitly check for s0ix when evicting resources
  * amd_gpio AMDI0030:00: Failed to translate GPIO pin 0x0000 to IRQ, err -517
    (LP: #1971597)
    - gpio: Request interrupts after IRQ is initialized
  * config CONFIG_HISI_PMU for kunpeng920 (LP: #1956086)
    - [Config] CONFIG_HISI_PMU=m
  * Mute/mic LEDs no function on EliteBook G9 platfroms (LP: #1970552)
    - ALSA: hda/realtek: Enable mute/micmute LEDs support for HP Laptops
  * network-manager/1.36.4-2ubuntu1 ADT test failure with linux/5.15.0-28.29
    (LP: #1971418)
    - Revert "rfkill: make new event layout opt-in"
  * PCIE LnkCtl ASPM not enabled under VMD mode for Alder Lake platforms
    (LP: #1942160)
    - SAUCE: vmd: fixup bridge ASPM by driver name instead
  * Mute/mic LEDs no function on HP EliteBook 845/865 G9 (LP: #1970178)
    - ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook
      845/865 G9
  * Enable headset mic on Lenovo P360 (LP: #1967069)
    - ALSA: hda/realtek: Enable headset mic on Lenovo P360
  * WCN6856 BT keep in OFF state after coldboot system (LP: #1967067)
    - Bluetooth: btusb: Improve stability for QCA devices
  * Screen sometimes can't update [Failed to post KMS update: CRTC property
    (GAMMA_LUT) not found] (LP: #1967274)
    - drm/i915/xelpd: Enable Pipe color support for D13 platform
    - drm/i915: Use unlocked register accesses for LUT loads
    - drm/i915/xelpd: Enable Pipe Degamma
    - drm/i915/xelpd: Add Pipe Color Lut caps to platform config
  * Jammy update: v5.15.35 upstream stable release (LP: #1969857)
    - drm/amd/display: Add pstate verification and recovery for DCN31
    - drm/amd/display: Fix p-state allow debug index on dcn31
    - hamradio: defer 6pack kfree after unregister_netdev
    - hamradio: remove needs_free_netdev to avoid UAF
    - cpuidle: PSCI: Move the `has_lpi` check to the beginning of the function
    - ACPI: processor idle: Check for architectural support for LPI
    - ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40
    - btrfs: remove unused parameter nr_pages in add_ra_bio_pages()
    - btrfs: remove no longer used counter when reading data page
    - btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()
    - soc: qcom: aoss...

Changed in linux-aws (Ubuntu Jammy):
status: Fix Committed → Fix Released
Tim Gardner (timg-tpi)
Changed in linux-azure (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (32.6 KiB)

This bug was fixed in the package linux-azure - 5.15.0-1014.17

---------------
linux-azure (5.15.0-1014.17) jammy; urgency=medium

  * jammy/linux-azure: 5.15.0-1014.17 -proposed tracker (LP: #1979425)

  * nbd: requests can become stuck when disconnecting from server with qemu-nbd
    (LP: #1896350)
    - nbd: don't handle response without a corresponding request message
    - nbd: make sure request completion won't concurrent
    - nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed
    - nbd: fix io hung while disconnecting device

  * SGX fixes for 5.15 Azure tuned kernel (LP: #1979541)
    - x86/sgx: Disconnect backing page references from dirty status
    - x86/sgx: Mark PCMD page as dirty when modifying contents
    - x86/sgx: Obtain backing storage page with enclave mutex held
    - x86/sgx: Fix race between reclaimer and page fault handler
    - x86/sgx: Ensure no data in PCMD page after truncate

  * No sound support on Linux AWS/Azure kernels (but supported on GCP)
    (LP: #1970586)
    - [Config] azure: CONFIG_SOUND=m

  [ Ubuntu: 5.15.0-41.44 ]

  * jammy/linux: 5.15.0-41.44 -proposed tracker (LP: #1979448)
  * Fix can't boot up after change to vmd (LP: #1976587)
    - PCI: vmd: Assign VMD IRQ domain before enumeration
    - PCI: vmd: Revert 2565e5b69c44 ("PCI: vmd: Do not disable MSI-X remapping if
      interrupt remapping is enabled by IOMMU.")
  * [SRU][Jammy/OEM-5.17][PATCH 0/1] Fix calltrace in mac80211 (LP: #1978297)
    - mac80211: fix struct ieee80211_tx_info size
  * [SRU][Jammy][PATCH 0/1] Fix amd display corruption on s2idle resume
    (LP: #1978244)
    - drm/amd/display: Don't reinitialize DMCUB on s0ix resume
  * pl2303 serial adapter not recognized (LP: #1967493)
    - USB: serial: pl2303: fix type detection for odd device
  * Remove SAUCE patches from test_vxlan_under_vrf.sh in net of
    ubuntu_kernel_selftests (LP: #1975691)
    - Revert "UBUNTU: SAUCE: selftests: net: Don't fail test_vxlan_under_vrf on
      xfail"
    - Revert "UBUNTU: SAUCE: selftests: net: Make test for VXLAN underlay in non-
      default VRF an expected failure"
  * Fix hp_wmi_read_int() reporting error (0x05) (LP: #1979051)
    - platform/x86: hp-wmi: Fix hp_wmi_read_int() reporting error (0x05)
  * Request to back port vmci patches to Ubuntu kernel (LP: #1978145)
    - VMCI: dma dg: whitespace formatting change for vmci register defines
    - VMCI: dma dg: add MMIO access to registers
    - VMCI: dma dg: detect DMA datagram capability
    - VMCI: dma dg: set OS page size
    - VMCI: dma dg: register dummy IRQ handlers for DMA datagrams
    - VMCI: dma dg: allocate send and receive buffers for DMA datagrams
    - VMCI: dma dg: add support for DMA datagrams sends
    - VMCI: dma dg: add support for DMA datagrams receive
    - VMCI: Fix some error handling paths in vmci_guest_probe_device()
    - VMCI: Release notification_bitmap in error path
    - VMCI: Check exclusive_vectors when freeing interrupt 1
    - VMCI: Add support for ARM64
    - [Config] Update policies for VMWARE_VMCI and VMWARE_VMCI_VSOCKETS
  * [UBUNTU 20.04] rcu stalls with many storage key guests (LP: #1975582)
    - s390/gmap: voluntarily schedule du...

Changed in linux-azure (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Daniel Gibson (metalcaedes) wrote :

This issue has returned: In linux-modules-extra-5.19.0-1022-aws there are no snd-* kernel modules (I personally need snd-aloop.ko).

Revision history for this message
Daniel Gibson (metalcaedes) wrote :

Same for linux-modules-extra-6.2.0-1015-aws, it's missing snd-aloop.ko as well

Revision history for this message
Daniel Gibson (metalcaedes) wrote :

How do I reopen this bug?

The current `linux-aws` package in Jammy is 6.2.0.1014.14~22.04.1, and snd_aloop (and the modules it depends on: snd, snd_pcm, snd_timer) are missing from linux-modules-extra-aws (or more specifically, linux-modules-extra-6.2.0-1012-aws)

@timg-tpi can you look into this? Thanks :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.