You are not logged in.

#1 2020-06-27 03:40:30

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Kernel 5.7.6 breaks audio

Upgraded from 5.7.5.arch1-1 -> 5.7.6.arch1-1 today (I update every day) and now my audio now emits nothing but a screech. Downgrading to 5.7.5.arch1-1 fixes it. I switched versions back and forth a few times to confirm this. Could not see anything in the journal hinting about the problem.

Offline

#2 2020-06-27 07:32:40

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: Kernel 5.7.6 breaks audio

There are audio related changes listed in https://cdn.kernel.org/pub/linux/kernel … eLog-5.7.6

Offline

#3 2020-06-27 07:48:58

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Re: Kernel 5.7.6 breaks audio

Found a bug just raised on the kernel bug tracker about this issue: https://bugzilla.kernel.org/show_bug.cgi?id=208317.

Offline

#4 2020-06-27 10:14:49

gentarch
Member
Registered: 2015-10-13
Posts: 4

Re: Kernel 5.7.6 breaks audio

I can also confirm this with a thunderbolt dock for a thinkpad. It definitively comes from upgrading 5.7.5 -> 5.7.6 as reverting to 5.7.5 fixes the issue.

Offline

#5 2020-06-27 10:28:46

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: Kernel 5.7.6 breaks audio

The only commit that mentions thunderbolt is https://git.kernel.org/pub/scm/linux/ke … 1c91b54cd1 what if you revert it?
Edit:
Change the PKGBUILD prepare function to

prepare() {
  cd $_srcname

  echo "Setting version..."
  scripts/setlocalversion --save-scmversion
  echo "-$pkgrel" > localversion.10-pkgrel
  echo "${pkgbase#linux}" > localversion.20-pkgname

  git revert -n afaff825e3a436f9d1e3986530133b1c91b54cd1

  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = *.patch ]] || continue
    echo "Applying patch $src..."
    patch -Np1 < "../$src"
  done

  echo "Setting config..."
  cp ../config .config
  make olddefconfig

  make -s kernelrelease > version
  echo "Prepared $pkgbase version $(<version)"
}

Last edited by loqs (2020-06-27 17:02:50)

Offline

#6 2020-06-27 23:53:52

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Re: Kernel 5.7.6 breaks audio

@loqs, thanks for looking at this issue but unfortunately reverting that commit made no difference.

Last edited by bulletmark (2020-06-28 10:52:30)

Offline

#7 2020-06-28 00:12:23

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: Kernel 5.7.6 breaks audio

Please place this at the end of the PKGBUILD

pkgver() {
  cd $_srcname

  git describe --long | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g;s/\.rc/rc/'
}

Then

cd src/archlinux-linux
git reset --hard
git checkout v5.7.5
cd ../..
makepkg -rsi #Check 5.7.5 does work

Next

cd src/archlinux-linux
$ git checkout v5.7.6^1 #the parent of 5.7.6 to avoid changing the version in the makefile which might trigger a full rebuild
$ cd ../..
$ makepkg -ersi #This is to confirm 5.7.6 as built on your system does have the issue

Start bisection

cd src/archlinux-linux
$ git bisect start
$ git bisect good v5.7.5
$ git bisect bad v5.7.6
$ cd ../..
$ makepkg -ersif

Bisection loop

cd src/archlinux-linux
$ git bisect $result #Substitue good or bad here
$ cd ../..
$ makepkg -ersif #Repeat these four lines and test the generated kernel until git has found the bad commit

Offline

#8 2020-06-28 11:21:48

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Re: Kernel 5.7.6 breaks audio

@loqs, this is where I got to (after at least 4 full kernel builds at 1 hour each):

1. It seems to me that I don't want the pkgver function because it forces a version change each update which forces a full rebuild. I think I should just set pkgver=5.7.5.arch1 for the point of these tests?

2. The git tags should be v5.7.5-arch1 not v5.7.5, etc.

3. Using the current 5.7.6 source tree, I did a build at git tag v5.7.6-arch1 and at v5.7.5-arch1 but the problem still existed at both. So I looked at the Arch changes for 5.7.6 and saw that the config file changed as well. Using the 5.7.5 config file I rebuilt 5.7.6 but the problem still existed. I then built 5.7.5 with the 5.7.5 config file and the problem disappeared. Even though this seems odd (and I don't know where the new config file should be introduced), I started to bisect upwards but the first bisect run terminated with:

  INSTALL sound/usb/line6/snd-usb-podhd.ko
  INSTALL sound/usb/line6/snd-usb-toneport.ko
  INSTALL sound/usb/line6/snd-usb-variax.ko
  INSTALL sound/usb/misc/snd-ua101.ko
  INSTALL sound/usb/snd-usb-audio.ko
  INSTALL sound/usb/snd-usbmidi-lib.ko
  INSTALL sound/usb/usx2y/snd-usb-us122l.ko
  INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
  INSTALL sound/x86/snd-hdmi-lpe-audio.ko
  INSTALL sound/xen/snd_xen_front.ko
  INSTALL virt/lib/irqbypass.ko
  DEPMOD  5.7.5-1-custom
rm: cannot remove '/home/mark/build/linux/pkg/linux-custom/usr/lib/modules/5.7.5-arch1-1-custom/source': No such file or directory
rm: cannot remove '/home/mark/build/linux/pkg/linux-custom/usr/lib/modules/5.7.5-arch1-1-custom/build': No such file or directory
==> ERROR: A failure occurred in package_linux-custom().
    Aborting...

Offline

#9 2020-06-28 13:04:20

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: Kernel 5.7.6 breaks audio

$ git bisect start
$git bisect bad v5.7.6-arch1 
$ git bisect good v5.7.5-arch1 
Bisecting: a merge base must be tested
[66dfe45221605e11f38a0bf5eb2ee808cea7cfe7] Linux 5.7.5
$ git bisect good
Bisecting: 238 revisions left to test after this (roughly 8 steps)
[6dc1d4511e0ff6db45fafa76c74012ad05c30c34] firmware: imx: scu: Fix possible memory leak in imx_scu_probe()

I forgot the arch kernel repository does not have the upstream tags

git bisect start
git bisect bad a06eb423367eea436351ef2a92f61a4e625cf558 #v5.7.6
git bisect good 66dfe45221605e11f38a0bf5eb2ee808cea7cfe7 #v5.7.5
Bisecting: 237 revisions left to test after this (roughly 8 steps)
[74c5fd5dedde91e58acc52eb5948788496a017a2] scsi: core: Fix incorrect usage of shost_for_each_device

Which would have saved testing the merge base.

The pkgver function does not change the working tree it changes the pkgver recorded in the PKGBUILD so each bisect step would have its own set of built packages.

makepkg -Codd # this ill clean the src directory so do not do this while bisecting
cd src/archlinux-linux/
git checkout v5.7.5-arch1
make olddefconfig
diff .config .config.old
3c3
< # Linux/x86 5.7.5-arch1 Kernel Configuration
---
> # Linux/x86 5.7.6-arch1 Kernel Configuration

The only diference in the config should be the version.

The build failure looks to be from the end of _package()

  # remove build and source links
  rm "$modulesdir"/{source,build}
}

I do not know why that would fail.

Offline

#10 2020-06-28 13:22:51

imi415
Member
Registered: 2018-02-09
Posts: 2

Re: Kernel 5.7.6 breaks audio

I assume that audio codec inside a thunderbolt dock is a USB-attached audio codec, and I have a similar issue with another USB DAC(Shanling M0).
After 5.7.6 update, the DAC has severe glitches with or without pulseaudio tsched settings, reverting to 5.7.5 solved this issue.
I checked the changes of the 5.7.6 release and found the following patchset, after reverting this patchset the problem solved.
https://patchwork.kernel.org/patch/11506943/
Has anyone submitted a bug for that issue? Or could anyone check if this works with other audio codecs(e.g. USB codec intergrated in the tb dock)?

Last edited by imi415 (2020-06-28 15:45:56)

Offline

#11 2020-06-28 13:48:12

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Offline

#12 2020-06-28 15:45:15

imi415
Member
Registered: 2018-02-09
Posts: 2

Re: Kernel 5.7.6 breaks audio

@loqs Yes you are right, I noticed that those patches are in the same series, so I ended up with an unreverted warning. The second patch wasn't in 5.7.6.

Offline

#13 2020-06-28 23:24:12

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Re: Kernel 5.7.6 breaks audio

loqs wrote:

The pkgver function does not change the working tree it changes the pkgver recorded in the PKGBUILD so each bisect step would have its own set of built packages.

I know, but the bisect changes the git describe hash so that means the pkgver changes every build and that seems to cause a full rebuild. So I was asking that, for the point of the bisection builds at least, shouldn't I just hard code pkgver?

The only diference in the config should be the version.

I was referring to the Arch config file change between 5.7.5 and 5.7.6. That is not in the Linux source tree so is not bisected.

Offline

#14 2020-06-28 23:34:23

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: Kernel 5.7.6 breaks audio

bulletmark wrote:
loqs wrote:

The pkgver function does not change the working tree it changes the pkgver recorded in the PKGBUILD so each bisect step would have its own set of built packages.

I know, but the bisect changes the git describe hash so that means the pkgver changes every build and that seems to cause a full rebuild. So I was asking that, for the point of the bisection builds at least, shouldn't I just hard code pkgver?

If it works without the pkgver function remove it but if https://git.kernel.org/pub/scm/linux/ke … 8627a49bf3 is the cause it might be quicker to tes just reverting that.

The only diference in the config should be the version.

bulletmark wrote:

I was referring to the Arch config file change between 5.7.5 and 5.7.6. That is not in the Linux source tree so is not bisected.

That config change was introduced by commits added with 5.7.4 but the config was not updated until 5.7.6.arch1-1 if those changes are not present they would be added by `make olddefconfig` in prepare() or if prepare was skipped by `make all` in build.

Offline

#15 2020-06-29 05:02:42

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Re: Kernel 5.7.6 breaks audio

I built the kernel 5.7.6 source cleanly with that usb-audio commit reverted and can confirm that my thunderbolt connected audio problem goes away.

Offline

#16 2020-06-29 22:13:48

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 649

Re: Kernel 5.7.6 breaks audio

The author of the offending commit has produced a single line fix which I confirmed on 5.7.6. See https://bugzilla.kernel.org/show_bug.cgi?id=208353.

Offline

Board footer

Powered by FluxBB