Collateral damage due to kernel configuration change enabling CONFIG_ZONE_DEVICE (Kernel 4.4 amd64)

Bug #1534647 reported by Doug Smythies on 2016-01-15
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Tim Gardner
Xenial
Medium
Tim Gardner
mudita24 (Ubuntu)
Undecided
Niels Mayer
Xenial
Undecided
Niels Mayer

Bug Description

Late in the kernel 4.4 RC (Release Candidate) cycle (between rc7 and rc8), Ubuntu implemented an amd64 kernel configuration change enabling CONFIG_ZONE_DEVICE.

The related email: https://lists.ubuntu.com/archives/kernel-team/2016-January/067683.html

The commit message does mention collateral damage: "In effect, this precludes devices that can only DMA from memory addresses below 16MB".
Indeed we already have a complaint about a sound card that doesn't work as of kernel 4.4-rc8.

If CONFIG_ZONE_DEVICE is enabled, then CONFIG_ZONE_DMA is forced to disabled, which in turn forces these devices, all are sound cards, and their derivative devices, to be disabled:
Avance Logic ALS300/ALS300+
ALi M5451 PCI Audio Controller
Aztech AZF3328 / PCI168
Emu10k1 (SB Live!, Audigy, E-mu APS)
Emu10k1X (Dell OEM Version)
ESS ES1938/1946/1969 (Solo-1)
ESS ES1968/1978 (Maestro-1/2/2E)
ICEnsemble ICE1712 (Envy24)
ESS Allegro/Maestro3
S3 SonicVibes
Trident 4D-Wave DX/NX; SiS 7018.

References: linux/mm/Kconfig; linux/sound/pci/Kconfig

One test done (suggested by apw on IRC) was to remove the dependency of ZONE_DEVICE on !ZONE_DMA, but that causes:
"#error ZONES_SHIFT -- too many zones configured adjust calculation", as apw predicted.
In a mindless way, I tried to allow more zones in linux/include/linux/page-flags-layout.h, but that caused a bunch of "shifting by too many bits type errors. Anyway it seems that MAX_NR_ZONES is, at least partially, hard coded to 4 in some array definitions and such.

Please do not ask me to do "apport-collect" for this bug report as it is not needed, nor relevant.

description: updated

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1534647

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Doug Smythies (dsmythies) wrote :

No, apport-collect 1534647 is not needed for this bug report.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: bot-stop-nagging kernel-da-key
Changed in linux (Ubuntu):
importance: Undecided → Medium
Tim Gardner (timg-tpi) wrote :

Given the mutual exclusivity of CONFIG_ZONE_DMA and CONFIG_ZONE_DEVICE, I've set CONFIG_ZONE_DMA=y for amd64 lowlatency and both i386 flavours . CONFIG_ZONE_DEVICE=y for amd64 generic. These settings are not relevant for other architectures.

Changed in linux (Ubuntu Xenial):
assignee: nobody → Tim Gardner (timg-tpi)
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (17.3 KiB)

This bug was fixed in the package linux - 4.4.0-2.16

---------------
linux (4.4.0-2.16) xenial; urgency=low

  [ Andy Whitcroft ]

  * Release Tracking Bug
    - LP: #1539090
  * SAUCE: hv: hv_set_ifconfig -- convert to python3
    - LP: #1506521
  * SAUCE: dm: introduce a target_ioctl op to allow target specific ioctls
    - LP: #1538618

  [ Colin Ian King ]

  * SAUCE: ACPI / tables: Add acpi_force_32bit_fadt_addr option to force 32
    bit FADT addresses (LP: #1529381)
    - LP: #1529381

  [ John Johansen ]

  * SAUCE: (no-up): apparmor: fix for failed mediation of socket that is
    being shutdown
    - LP: #1446906

  [ Mahesh Salgaonkar ]

  * SAUCE: Powernv: Remove the usage of PACAR1 from opal wrappers
    - LP: #1537881
  * SAUCE: powerpc/book3s: Fix TB corruption in guest exit path on HMI
    interrupt.
    - LP: #1537881
  * SAUCE: KVM: PPC: Book3S HV: Fix soft lockups in KVM on HMI for time
    base errors
    - LP: #1537881

  [ Paolo Pisati ]

  * SAUCE: arm64: errata: Add -mpc-relative-literal-loads to erratum
    #843419 build flags
    - LP: #1533009
  * [Config] MFD_TPS65217=y && REGULATOR_TPS65217=y
  * [Config] disable ARCH_ZX (ZTE ZX Soc)

  [ Tim Gardner ]

  * Revert "SAUCE: (noup) cxlflash: a couple off by one bugs"
  * SAUCE: (no-up) Update bnx2x firmware to 7.12.30.0
    - LP: #1536719
  * SAUCE: drop obsolete bnx2x firmware
  * SAUCE: i40e: Silence 'may be used uninitialized' warnings
    - LP: #1536474
  * [Config] CONFIG_ZONE_DMA=y for amd64 lowlatency
    - LP: #1534647
  * [Config] Add pvpanic to virtual flavour
    - LP: #1537923
  * [Config] CONFIG_INTEL_PUNIT_IPC=m, CONFIG_INTEL_TELEMETRY=m
    - LP: #1520457

  [ Upstream Kernel Changes ]

  * i40evf: fix compiler warning of unused variable
    - LP: #1536474
  * intel: i40e: fix confused code
    - LP: #1536474
  * i40e/i40evf: remove unused tunnel parameter
    - LP: #1536474
  * i40e: Change BUG_ON to WARN_ON in service event complete
    - LP: #1536474
  * i40e: remove BUG_ON from feature string building
    - LP: #1536474
  * i40e: remove BUG_ON from FCoE setup
    - LP: #1536474
  * i40e: Workaround fix for mss < 256 issue
    - LP: #1536474
  * i40e/i40evf: Add a stat to track how many times we have to do a force
    WB
    - LP: #1536474
  * i40e: Move the saving of old link info from handle_link_event to
    link_event
    - LP: #1536474
  * i40e/i40evf: Add comment to #endif
    - LP: #1536474
  * i40e/i40evf: clean up error messages
    - LP: #1536474
  * i40evf: handle many MAC filters correctly
    - LP: #1536474
  * i40e: return the number of enabled queues for ETHTOOL_GRXRINGS
    - LP: #1536474
  * i40e: rework the functions to configure RSS with similar parameters
    - LP: #1536474
  * i40e: create a generic configure rss function
    - LP: #1536474
  * i40e: Bump version to 1.4.2
    - LP: #1536474
  * i40e: add new fields to store user configuration
    - LP: #1536474
  * i40e: rename rss_size to alloc_rss_size in i40e_pf
    - LP: #1536474
  * i40e/i40evf: Fix RS bit update in Tx path and disable force WB
    workaround
    - LP: #1536474
  * i40e/i40evf: prefetch skb data on transmit
    - LP: #1536474
  * i40evf: rename VF adapter s...

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
Marc (theprofessor21) wrote :

So the solution for us ice1712 users is to permanently switch to the lowlatency kernel?

Tim Gardner (timg-tpi) wrote :

Marc - that is currently the only choice. Upstream is discussing a fix that might allow both configurations, but I don't know when it might get implemented, or if it will be suitable as an SRU patch.

Marc (theprofessor21) wrote :

Okay. This should then probably be documented somewhere for users upgrading from previous releases.

Doug Smythies (dsmythies) wrote :

> Upstream is discussing a fix that might allow both configurations
@Tim, could you point us to the upstream discussion?

Tim Gardner (timg-tpi) wrote :

Looks like there is an upstream patch that now allows both ZONE_DMA and ZONE_DEVICE to be set. Lets see how that works wrt regressing support for legacy DMA support. For those of you that have installed lowlatency, please try generic again once this fix is uploaded.

Changed in linux (Ubuntu Xenial):
status: Fix Released → In Progress
Tim Gardner (timg-tpi) on 2016-02-10
Changed in linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Niels Mayer (nielsmayer) wrote :

I've been impacted by this bug, in that it disables all "Envy24" soundcards such as the popular (but obsolete) M-Audio "Delta" series PCI audio cards. See http://article.gmane.org/gmane.linux.alsa.user/39428 .

Additional side-effects/impacts of this bug are that the applications used to talk to this series of music-production soundcards no longer work. Specifically "my" https://launchpad.net/ubuntu/+source/mudita24 as well as the older 'envy24control' that it replaces.

The list of cards this bug disables is long: M-Audio Delta 1010, Delta 1010LT, Delta DiO 2496, Delta 66, Delta 44, Delta 410 and Audiophile 2496. Terratec EWS 88MT, EWS 88D, EWX 24/96, DMX 6Fire, Phase 88. Hoontech Soundtrack DSP 24, Soundtrack DSP 24 Value, Soundtrack DSP 24 Media 7.1. Event Electronics EZ8. Digigram VX442. Lionstracs, Mediastaton. Terrasoniq TS 88. Roland/Edirol DA-2496.

The problem persists using the above-suggested "fix" packages of "4.4.0-2.16" which I retrieved from
https://launchpad.net/ubuntu/xenial/amd64/linux-image-4.4.0-2-generic/4.4.0-2.16
https://launchpad.net/ubuntu/xenial/amd64/linux-image-extra-4.4.0-2-generic/4.4.0-2.16
https://launchpad.net/ubuntu/xenial/amd64/linux-headers-4.4.0-2/4.4.0-2.16
https://launchpad.net/ubuntu/xenial/amd64/linux-headers-4.4.0-2-generic/4.4.0-2.16

Likewise, the problem persists using the above-suggested "lowlatency" kernels.

In all cases, for 4.4.1, 4.4.0-2, or their lowlatency variants, there is a missing "snd_ice1712" module in
/lib/modules/4.4.1-040401-generic/kernel/sound/pci/ice1712/ . The directory contains modules for snd_ice1724 which is a completely different soundcard (which nobody uses or has) snd_ice1724 . snd-ice1712.ko is missing.

-rw-r--r-- 1 root root 247046 Jan 31 12:48 snd-ice1724.ko
-rw-r--r-- 1 root root 9230 Jan 31 12:48 snd-ice17xx-ak4xxx.ko

In kernel 4.3.0 (directory /lib/modules/4.3.0-040300-generic/kernel/sound/pci/ice1712/
) the file is present and all the envy24 cards I have (Terratec DMX6Fire, M-Audio Delta 66, Event EZ8) work fine:

-rw-r--r-- 1 root root 120838 Nov 2 07:01 snd-ice1712.ko
-rw-r--r-- 1 root root 246270 Nov 2 07:01 snd-ice1724.ko
-rw-r--r-- 1 root root 9230 Nov 2 07:01 snd-ice17xx-ak4xxx.ko

Niels Mayer (nielsmayer) wrote :

See #12

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mudita24 (Ubuntu):
status: New → Confirmed
Niels Mayer (nielsmayer) wrote :

Thank you for confirming this issue still exists, despite "fix committed,"
and that it also disables correct functioning of package 'mudita24'.

Characterizing #12 further (via
" for i in linux-image*.deb; do dpkg --contents $i | grep snd-ice1712.ko ; done "),
I notice the presence of the ice1712 module in rc7
  /lib/modules/4.4.0-040400rc7-generic/kernel/sound/pci/ice1712/snd-ice1712.ko
by rc8, it has gone missing. It continues missing in the 4.4.0 release and 4.4.1 as well.

snd-ice1712.ko is *not* present in the 4.4.0 or 4.4.1 lowlatency kernels as discussed in #5, #6, #7. Therefore no "ICEnsemble ICE1712 (Envy24)" cards will work, even, with low-latency kernel.

The file is present in wily 4.3.0 and 4.3.5 kernels:
 /lib/modules/4.3.0-040300-generic/kernel/sound/pci/ice1712/snd-ice1712.ko
 /lib/modules/4.3.5-040305-generic/kernel/sound/pci/ice1712/snd-ice1712.ko

And though absent in 4.5.0 RC1, the file reappears in the latest RC4
 /lib/modules/4.5.0-040500rc4-generic/kernel/sound/pci/ice1712/snd-ice1712.ko

Question: When/where will a 4.4 release become available with at least some collateral damage, such as the "ICEnsemble ICE1712 (Envy24)" listed in the bug description, working again? Many of the other listed PCI cards are no-longer used or needed. However, the "Envy24" cards are still used by those doing music or media production in Linux because they have unique features -- in particular, extremely low-latency, and a built-in 20-channel 36-bit wide hardware digital audio mixer: http://www.viatech.com/en/silicon/legacy/audio/envy24/

Tim Gardner (timg-tpi) wrote :

Niels - restoring ZONE_DMA in generic should have reinstated the build for snd-ice1712. I've a test build of 4.4.0-6.21 (currently building in Launchpad) that shows this module in both lowlatency and generic. Lets wait and see how 4.4.0-6.21 turns out.

Launchpad Janitor (janitor) wrote :
Download full text (3.4 KiB)

This bug was fixed in the package linux - 4.4.0-6.21

---------------
linux (4.4.0-6.21) xenial; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #1546283

  * Naples/Zen, NTB Driver (LP: #1542071)
    - [Config] CONFIG_NTB_AMD=m
    - NTB: Add support for AMD PCI-Express Non-Transparent Bridge

  * [Hyper-V] kernel panic occurs when installing Ubuntu Server x32 (LP: #1495983)
    - SAUCE: storvsc: use small sg_tablesize on x86

  * Enable arm64 emulation of removed ARMv7 instructions (LP: #1545542)
    - [Config] CONFIG_ARMV8_DEPRECATED=y

  * Surelock-GA2:kernel panic/ exception @ pcibios_set_pcie_reset_state+0x118/0x280 + cxl_reset+0x5c/0xc0 (LP: #1545037)
    - powerpc/eeh: Fix stale cached primary bus

  * Miscellaneous Ubuntu changes
    - SAUCE: fs: Add user namesapace member to struct super_block
    - SAUCE: fs: Limit file caps to the user namespace of the super block
    - SAUCE: Smack: Add support for unprivileged mounts from user namespaces
    - SAUCE: block_dev: Support checking inode permissions in lookup_bdev()
    - SAUCE: block_dev: Check permissions towards block device inode when mounting
    - SAUCE: fs: Treat foreign mounts as nosuid
    - SAUCE: selinux: Add support for unprivileged mounts from user namespaces
    - SAUCE: userns: Replace in_userns with current_in_userns
    - SAUCE: Smack: Handle labels consistently in untrusted mounts
    - SAUCE: fs: Check for invalid i_uid in may_follow_link()
    - SAUCE: cred: Reject inodes with invalid ids in set_create_file_as()
    - SAUCE: fs: Refuse uid/gid changes which don't map into s_user_ns
    - SAUCE: fs: Update posix_acl support to handle user namespace mounts
    - SAUCE: fs: Ensure the mounter of a filesystem is privileged towards its inodes
    - SAUCE: fs: Don't remove suid for CAP_FSETID in s_user_ns
    - SAUCE: fs: Allow superblock owner to access do_remount_sb()
    - SAUCE: capabilities: Allow privileged user in s_user_ns to set security.* xattrs
    - SAUCE: fuse: Add support for pid namespaces
    - SAUCE: fuse: Support fuse filesystems outside of init_user_ns
    - SAUCE: fuse: Restrict allow_other to the superblock's namespace or a descendant
    - SAUCE: fuse: Allow user namespace mounts
    - SAUCE: mtd: Check permissions towards mtd block device inode when mounting
    - SAUCE: fs: Update i_[ug]id_(read|write) to translate relative to s_user_ns
    - SAUCE: quota: Convert ids relative to s_user_ns
    - SAUCE: evm: Translate user/group ids relative to s_user_ns when computing HMAC
    - SAUCE: fs: Allow CAP_SYS_ADMIN in s_user_ns to freeze and thaw filesystems
    - SAUCE: quota: Treat superblock owner as privilged
    - SAUCE: ima/evm: Allow root in s_user_ns to set xattrs
    - SAUCE: block_dev: Forbid unprivileged mounting when device is opened for writing
    - SAUCE: ext4: Add support for unprivileged mounts from user namespaces
    - SAUCE: ext4: Add module parameter to enable user namespace mounts
    - SAUCE: fuse: Add module parameter to enable user namespace mounts

  * Miscellaneous upstream changes
    - megaraid: Fix possible NULL pointer deference in mraid_mm_ioctl
    - libahci: Implement the capability to override th...

Read more...

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
Niels Mayer (nielsmayer) wrote :

Tim -- I downloaded this latest build (*) and can confirm working ICE1712 cards, and associated mudita24(1) application, on
4.4.0-6-generic #21-Ubuntu SMP Tue Feb 16 20:32:27 UTC

Audio:
card 0: DMX6Fire [TerraTec DMX6Fire], device 0: ICE1712 multi [ICE1712 multi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: DMX6Fire [TerraTec DMX6Fire], device 0: ICE1712 multi [ICE1712 multi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Midi:
 16:0 TerraTec DMX6Fire MIDI-Front DMX6fire 0
 16:32 TerraTec DMX6Fire Wavetable DMX6fire 0

Thanks!!

(*):
https://launchpad.net/ubuntu/xenial/amd64/linux-headers-4.4.0-6/4.4.0-6.21
https://launchpad.net/ubuntu/xenial/amd64/linux-headers-4.4.0-6-generic/4.4.0-6.21
https://launchpad.net/ubuntu/xenial/amd64/linux-image-4.4.0-6-generic/4.4.0-6.21
https://launchpad.net/ubuntu/xenial/amd64/linux-image-extra-4.4.0-6-generic/4.4.0-6.21

Niels Mayer (nielsmayer) wrote :

mudita24(1) is no longer affected by this bug because kernel "4.4.0-6-generic #21-Ubuntu SMP Tue Feb 16 20:32:27 UTC 2016" again supports a working "ICEnsemble ICE1712 (Envy24)" module snd_ice1712.

Changed in mudita24 (Ubuntu Xenial):
assignee: nobody → Niels Mayer (nielsmayer)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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