Last month I upgraded my computer with new parts. I kept my old DVD drive that I mainly use to rip CDs. I have now however run into an issue that has stumped me. When I tried to rip some used CDs I bought the resulting FLACs had a terrible crackle, making them unlistenable. So I started looking into the issue and tried different ripping programs and CD players. Trying to play a CD also produces a crackle with most players. Some players can’t even see my CD drive. I have installed rippers and players from distro repos and flatpaks and it makes no difference. I have even tried booting into live environments of different distros and the problem persists.

Now, the real kicker for me is that VLC (from flathub or distro repos) plays and rips the CDs with no issues. VLC is not a great tool for my purposes however. EDIT: Kaffeine flatpak also plays CDs without issue.

There are no error messages (aside from some players which can’t even see the drive) to go off of. Google has failed me. CD error correction makes no difference, just makes ripping terribly slow. Some attempts to fiddle with pipewire also produced no result. Encoders work fine when encoding from different sources, so they are probably not the problem, and the same issue happens when playing the CDs.

On my old setup this worked fine. I can also watch DVDs without trouble.

Does anyone have any idea where to go from here? If it wasn’t for VLC I’d think this is a hardware issue, but now I’ve no real idea. I’m currently on OpenSUSE Tumbleweed.

EDIT: Thanks to everyone who took their time to comment and make suggestions. I have been unable to make any headway into solving this. My uneducated guess is that this is some weird edge interaction between the optical drive, motherboard, and libcdio/cdparanoia. Purely speculating, this may be an issue with buffering/caching. It seems to me that applications that rely on libvlc do not have this issue. I tried using a portable USB DVD drive and it worked fine, as at least there was no crackle. I really don’t know how to proceed from here, so I’ll probably just use a USB drive for now. A commenter suggested getting a separate SATA card to bypass the SATA ports on the motherboard, and that sounds plausible, but I haven’t tried it. Any explanations are welcome!

  • HakFoo@lemmy.sdf.org
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    Try connectibg the drive through a seperate SATA card or USB-SATA adapter.

    I had all sorts of issues with CD drives on my new X670E board using the onboard ports.

  • hiddengoat@kbin.social
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    Sounds to me like VLC and Kaffeine are using an audio system that other software is not, or they have vastly different settings to the others. Yes, this is entirely possible. Linux audio is an absolute hellscape of incompatible trash. Still. Fifteen years or so after I abandoned trying to get anything moving to improve it. Yay.

    Bitter assholery aside, crackling sounds during playback, or generated in a burned file, are a classic symptom of a buffer underrun*. This can be either at the system settings level or software settings level since some software will override the system settings. I would check in the VLC settings, verify what sound system it’s using, and basically just compare all of the settings to the software that’s creating the problem. I’d be willing to wager that you’ll find some weirdness going on. Match the VLC settings as much as you can and go from there.

    I highly doubt this is a hardware issue. It would make no sense for it to be if you can do the thing without problem in some software but not others.

    *For anyone that doesn’t know, a buffer underrun is something that us poor CD-burning bastards had to deal with back in the 20th century. To a different extent it still exists with audio interfaces in a way that may be relevant here. To burn or play back the audio the system allocates a buffer, a small amount of memory that it reads the audio into, in an attempt to keep the device from running out of data to replicate (sort of… basically… it’s complicated, look it up). If the device was able to burn or read the data faster than the system could provide the data you’d get a buffer underrun, which ended up sounding like weirdass crackly noise but not in a good way since it was just digital garbage. You can get a similar effect now if you use an audio system that allows you to change the latency settings. This is essentially the same buffer, different day. The smaller the buffer the lower the latency, but you risk running out of buffer and generating a horrific crackle. Raise the latency, increase the buffer, you are less likely to create underruns.

    Note that at some technical level everything I just said is probably incorrect, but it’s the best kind of incorrect… the kind that will get the problem fixed regardless of total accuracy.

    • banazir@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      This is actually somewhat in line with some of my suspicions. From the nature of the crackle, buffering could absolutely be an issue. Now if I could only figure out how to change the settings. Oh boy.

      • hiddengoat@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Yyyyup. Oh boy is just the beginning. By the end you’ll likely resemble a 2008 rage face, only with more blood and broken computer parts lodged in your spleen. Audio on Linux can be a bit… recalcitrant.

  • nyan@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    I assume there’s a data cable running from your optical drive to the motherboard. Check that it’s undamaged and firmly seated at both ends, because this kind of sounds like a bad connection (which some players might be able to compensate for with filters). Even if you didn’t replace the cable or the mobo, you might have unseated one end while you were messing around inside the case.

    • banazir@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I tried a different SATA cable and there’s no change. Thanks for the suggestion.

  • ElderWendigo
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    What CD ripping software are you using? When were the CDs you’re struggling to rip pressed? In particular, were those CDs distributed at the height of the CD ripping panic of the turn of the millennium when rootkits and other nasty tricks were used widely. Depending on the software’s approach to ripping, defects,like scratches or non-standard audio tracks, that a simple player might simply skip over without much more than a blip could confuse the ripping software. I vaguely recall some early copy protection scheme using this exploit to deter CD rips by making CDs that appeared normal in dumb CD audio players, but confused PCs attempting to rip audio tracks that were expected to follow the Redbook standard, but didn’t.

    I’ve had some success getting accurate rips using morituri whipper (Morituri is no longer actively maintained, Whipper is an active fork). It’s command line output and logs might offer some insight about the exact problem you’re having with these CDs. I’m pretty sure that given the way Morituri/whipper works it can bypass all but the most “damaged” audio tracks.

    • banazir@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      So far I think I’ve tried fre:ac (my usual go to), Asunder, abcde, SoundJuicer, and possibly some other. I’m currently testing with a CD I previously ripped successfully with the same DVD drive before the upgrade. This issue is present with all CDs I’ve tried. I first noticed this with a CD pressed in 1992 I think. Copy protection has never been an issue for me when ripping CDs before.

      I’ll check out whipper, thanks.

      • banazir@lemmy.mlOP
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        First test with whipper is not promising. Same crackling is present and rip quality for the first track is 9.57%. Q sub-channel CRC errors are in the tens of thousands for all tracks, though I’m not sure what to think of that. Audio cache of the drive couldn’t be defeated. I stopped the ripper after one track, but I also didn’t encounter any real errors.

        • banazir@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          Well, I ripped Buddy Holly’s Buddy Holly with whipper and the log says no errors, but the rips are a crackling mess. I’m none the wiser, I’m afraid.

  • Danileonis @lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Do you have tags on your tracks? Old FLAC versions have issues with tags, resulting in crackling. Try to use flatpaks whenever possibile.

    • banazir@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      This issue is also present with Vorbis, Opus, and CD playback. Encoding as FLAC from other sources has no issues.

  • d_k_bo@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Did you try playing the files on a different device to sort out playback issues?

    • banazir@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Not sure what you mean. This issue only affects rips made after the hardware upgrade. Rips made prior (with the same DVD drive and from the same CDs) play perfectly fine. I doubt transferring the files to a different device changes anything.

  • HumanPerson
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    I doubt this will work, but as a weird troubleshooting step you could try pipewire. I am stupid but I have had pulseaudio create weird crackling before. I use opensuse leap and it took less than 5 min to install.

    • banazir@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I already have PipeWire and did try a few things with config to no avail. The crackling also only happens with CD audio, took me weeks to even notice this was an issue. Thanks for the suggestion though.

      • HumanPerson
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Yeah, I didn’t think it would work, but thought I should suggest it in case it would.