• Subject: Glitchy sound in Steam games after hard drive upgrade

    From Charlie Gibbs@21:1/5 to All on Mon Apr 22 08:00:01 2024
    I should probably be posting this to the Steam forums, but
    most of the denizens there are Windows people so I might be
    better off letting you Debian gurus have a go at it first.

    TL;DR: Copying an existing /home into a fresh Debian installation
    causes audio in Steam games to glitch - but all other sound is OK.

    Full description:

    I have a machine in the living room that stores MP3s and videos
    and serves them to other machines on our network as well as playing
    them locally on our TV's big screen. I also play a few Steam games
    (e.g. Portal) on it. It's a 2007-vintage machine, but it has 8GB
    of RAM and enough CPU power to do the job, and runs the latest
    version of Bookworm.

    Recently I decided to upgrade its storage capacity, and replaced
    its 500GB hard drive (which was pretty large at the time I bought
    it) with a 4TB drive. I did an install from scratch using a
    network install CD, then copied my /home partition (using rsync)
    from the old drive. Everything works great with one exception:
    when I fire up Portal the sound gets glitches about once a second.
    This only happens with Steam games; I can play MP3s and videos
    with mpv and the sound is perfect, as it is when watching YouTube
    videos. If I swap the old drive back in everything is fine.

    Obviously my Steam programs and configuration files are in my
    home directory, since the updated system comes up icons and all
    without re-installing Steam, and can find everything it needs to
    run the games. But perhaps there are a few files somewhere else
    (/usr?) containing information critical to audio for Steam.

    Any ideas?

    (Side question: is this an acceptable way to upgrade a hard drive?)

    --
    /~\ Charlie Gibbs | Life is perverse.
    \ / <cgibbs@kltpzyxm.invalid> | It can be beautiful -
    X I'm really at ac.dekanfrus | but it won't.
    / \ if you read it the right way. | -- Lily Tomlin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michel Verdier@21:1/5 to Charlie Gibbs on Mon Apr 22 09:20:02 2024
    On 2024-04-21, Charlie Gibbs wrote:

    Obviously my Steam programs and configuration files are in my
    home directory, since the updated system comes up icons and all
    without re-installing Steam, and can find everything it needs to
    run the games. But perhaps there are a few files somewhere else
    (/usr?) containing information critical to audio for Steam.

    Do you sync /etc ? Configuration is mainly there.

    (Side question: is this an acceptable way to upgrade a hard drive?)

    There is other ways but yes if you also sync /etc :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to Charlie Gibbs on Mon Apr 22 12:30:01 2024
    On 4/21/24 22:33, Charlie Gibbs wrote:
    I should probably be posting this to the Steam forums, but
    most of the denizens there are Windows people so I might be
    better off letting you Debian gurus have a go at it first.

    TL;DR: Copying an existing /home into a fresh Debian installation
    causes audio in Steam games to glitch - but all other sound is OK.

    Full description:

    I have a machine in the living room that stores MP3s and videos
    and serves them to other machines on our network as well as playing
    them locally on our TV's big screen.  I also play a few Steam games
    (e.g. Portal) on it.  It's a 2007-vintage machine, but it has 8GB
    of RAM and enough CPU power to do the job, and runs the latest
    version of Bookworm.

    Recently I decided to upgrade its storage capacity, and replaced
    its 500GB hard drive (which was pretty large at the time I bought
    it) with a 4TB drive.  I did an install from scratch using a
    network install CD, then copied my /home partition (using rsync)
    from the old drive.  Everything works great with one exception:
    when I fire up Portal the sound gets glitches about once a second.
    This only happens with Steam games; I can play MP3s and videos
    with mpv and the sound is perfect, as it is when watching YouTube
    videos.  If I swap the old drive back in everything is fine.

    Obviously my Steam programs and configuration files are in my
    home directory, since the updated system comes up icons and all
    without re-installing Steam, and can find everything it needs to
    run the games.  But perhaps there are a few files somewhere else
    (/usr?) containing information critical to audio for Steam.

    Any ideas?

    (Side question: is this an acceptable way to upgrade a hard drive?)


    Copying a home directory from one OS instance to another OS instance
    sounds risky, especially as I run various OS's. I have several
    instances of Debian 11, and would not consider them to be identical
    enough to try it. I only touch the content I create or have learned how
    to manage.


    I put my OS on a small SSD and the vast majority of my data on HDD RAID
    in a file server.


    As I am the only user on my Debian daily driver, I leave the /home
    directory on the root file system and keep as little as possible in it.


    I mount the file server shares under /mnt, and create symlinks in my
    home directory that point into the mounted file system.


    I use CVS for project working directories. To migrate to a new home
    directory, I check in the projects in the old home and check out the
    project in the new home.


    I use Firefox and its sync feature. To migrate to a new home, I start
    Firefox, log in, wait for my settings to sync, and then check all of the settings by hand.


    I use Thunderbird. To migrate to a new home, I create a tarball of my Thunderbird profile directory on the old machine, expand the tarball on
    the new machine, and configure Thunderbird to use that profile.


    I do not attempt to migrate any of the various home directory
    configuration directories; I let the installer and/or package manager
    create them, and let the desktop, apps, etc., manage them.


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Mon Apr 22 23:00:01 2024
    Recently I decided to upgrade its storage capacity, and replaced
    its 500GB hard drive (which was pretty large at the time I bought
    it) with a 4TB drive. I did an install from scratch using a
    network install CD, then copied my /home partition (using rsync)
    from the old drive.
    [...]
    (Side question: is this an acceptable way to upgrade a hard drive?)

    It's acceptable enough that we'll keep talking to you. 🙂

    Personally, assuming the 500GB drive was basically full, I suspect I'd
    have just done a `dd` copy of the 500GB drive to the new drive, followed
    by a quick `gparted` run to resize on-the-fly the partitions (in order
    to get access to the extra 3.5GB).

    Everything works great with one exception:
    when I fire up Portal the sound gets glitches about once a second.
    This only happens with Steam games; I can play MP3s and videos
    with mpv and the sound is perfect, as it is when watching YouTube
    videos. If I swap the old drive back in everything is fine.

    I suspect the difference is that the Steam games keep your machine very
    busy whereas playing a video isn't nearly as demanding, so the machine
    ends up too busy to refill the sound buffer before its empty.

    As for why this happens with the new disk&install and not with the old disk&install, ...
    AFAICT it can be either due to the new install such as a difference in
    the configuration and/or installed software (e.g. one using pulseaudio
    and the other pipewire), or due to the new hardware, presumably because
    some operations are slower.

    Can you boot with both disks connected? If so, can you try to boot off
    of the 500GB and then use the /home from the 4TB drive (and vice versa)?
    I think you should be able to do that by booting to "rescue" where
    (after entering the root password) you'd do something like

    umount /home
    mount /dev/the/other/home/partition /home
    exit

    I'd tend to think that a modern 4TB drive should be no slower than
    a 500GB drive, no matter the operation, but maybe the new drive has
    a particularly small cache, or maybe it's shingled and the Steam game
    makes a fair amount of writes to the disk which ends up affecting the
    reads needed to fetch the next chunk of sound?


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charlie Gibbs@21:1/5 to Jeffrey Walton on Tue Apr 23 06:50:01 2024
    On 2024-04-22 16:50, Jeffrey Walton wrote:

    What are the old and new hard drive model numbers and specs?

    The old drive is a Western Digital WD5000YS (500GB SATA).
    The new drive is a Western Digital Red, WF40EFPX (4TB SATA).

    If the old hard drive was spinning rust, it is acceptable to replace it
    with a solid state drive. I did it several times in the past. But
    nowadays a new machine usually (always?) comes with a SSD, so you
    usually don't need to upgrade for performance reasons.

    Both drives are spinning rust. I'm upgrading for the increased
    capacity, i.e. to store more MP3s and videos.

    Many thanks to all who have replied. When my schedule permits me to
    continue experimenting, I'm going to try copying /etc from the old drive
    to the new one. I've already learned how _not_ to do this:

    Boot from the new drive
    $ su root
    # cd /
    # mv etc etc.ori
    # rsync -av /mnt/backup/etc .

    The second line makes the system fall over and makes logins impossible.
    It took a boot from the rescue CD to undo the damage, which fortunately
    was easy since the deadly step at least succeeded in backing up /etc.

    Next time I'll do it while booted from the old drive.

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's a sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From debian-user@howorth.org.uk@21:1/5 to Charlie Gibbs on Tue Apr 23 18:10:01 2024
    Charlie Gibbs <cgibbs@surfnaked.ca> wrote:
    On 2024-04-22 16:50, Jeffrey Walton wrote:

    What are the old and new hard drive model numbers and specs?

    The old drive is a Western Digital WD5000YS (500GB SATA).
    The new drive is a Western Digital Red, WF40EFPX (4TB SATA).

    According to my searches, there's no such disk as a WF40EFPX. Are you
    sure that's what it is? If by any chance it is a WD40EFRX then that is certainly slower than your old drive, so may cause some problems as
    suggested.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to debian-user@howorth.org.uk on Tue Apr 23 22:40:01 2024
    On 4/23/24 09:02, debian-user@howorth.org.uk wrote:
    Charlie Gibbs <cgibbs@surfnaked.ca> wrote:
    On 2024-04-22 16:50, Jeffrey Walton wrote:

    What are the old and new hard drive model numbers and specs?

    The old drive is a Western Digital WD5000YS (500GB SATA).
    The new drive is a Western Digital Red, WF40EFPX (4TB SATA).

    According to my searches, there's no such disk as a WF40EFPX. Are you
    sure that's what it is? If by any chance it is a WD40EFRX then that is certainly slower than your old drive, so may cause some problems as suggested.


    I doubt the new drive is slower than the old drive:

    - https://www.harddrivebenchmark.net/hdd.php?hdd=WDC%20WD5000YS

    WDC WD5000YS 425

    - https://www.harddrivebenchmark.net/hdd.php?hdd=WDC%20WD40EFRX

    WDC WD40EFRX 1,943


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to Charlie Gibbs on Tue Apr 23 22:30:01 2024
    On 4/22/24 21:26, Charlie Gibbs wrote:
    On 2024-04-22 16:50, Jeffrey Walton wrote:
    What are the old and new hard drive model numbers and specs?

    The old drive is a Western Digital WD5000YS (500GB SATA).


    https://www.newegg.com/western-digital-re2-wd5000ys-500gb/p/N82E16822136032?Item=N82E16822136032


    The new drive is a Western Digital Red, WF40EFPX (4TB SATA).


    https://www.westerndigital.com/products/internal-drives/wd-red-plus-sata-3-5-hdd?sku=WD40EFPX


    Both drives are spinning rust.  I'm upgrading for the increased
    capacity, i.e. to store more MP3s and videos.

    Many thanks to all who have replied.  When my schedule permits me to continue experimenting, I'm going to try copying /etc from the old drive
    to the new one.   I've already learned how _not_ to do this:

    Boot from the new drive
    $ su root
    # cd /
    # mv etc etc.ori
    # rsync -av /mnt/backup/etc .

    The second line makes the system fall over and makes logins impossible.
    It took a boot from the rescue CD to undo the damage, which fortunately
    was easy since the deadly step at least succeeded in backing up /etc.

    Next time I'll do it while booted from the old drive.


    Copying an entire /etc directory from one machine to another requires a
    highly controlled environment and lot of engineering. I have always
    migrated /etc settings from one OS instance to another OS instance by
    hand, one service/ configuration file at a time.


    Can you leave the 500 GB HDD operational and use the 4 TB HDD for data?


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Tue Apr 23 23:50:01 2024
    I doubt the new drive is slower than the old drive:

    Overall, agreed. Tho AFAICT the new drive spins slower (5400rpm vs
    7200rpm), so it has a slightly higher rotational latency. This means
    that in *some* cases it can be slower.
    Now, I have no idea whether that's the cause of the glitches.


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Curt@21:1/5 to Charlie Gibbs on Sun Apr 28 16:00:01 2024
    On 2024-04-22, Charlie Gibbs <cgibbs@surfnaked.ca> wrote:

    TL;DR: Copying an existing /home into a fresh Debian installation
    causes audio in Steam games to glitch - but all other sound is OK.

    I have only the most vaporous ideas about Steam, but have you tried
    backing up and then recreating (if such a thing is possible) your user profile ~/.steam or ~/.config/steam files?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)