• OS freezes when copying to USB

    From Joerg Walther@21:1/5 to All on Sun Mar 3 14:38:23 2024
    When copying larger files to any USB drive on a Thinkpad T480 with
    Ubuntu 22.04 it quite often happens that the OS completely freezes and
    the PC has to be restarted by switching it off and on again.
    This seems to be an old problem, I found this bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1208993?comments=all
    which starts with 13.04, but the last comments are about 22.04. Are
    there any ideas how I can fix this? Has this been fixed in 23.10 or will
    it be fixed in 24.04?
    Thanks for any input on this.

    -jw-

    --

    And now for something completely different...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Markus Robert Kessler@21:1/5 to All on Mon Mar 4 08:51:21 2024
    On Sun, 03 Mar 2024 14:38:23 +0100 Joerg Walther wrote:

    When copying larger files to any USB drive on a Thinkpad T480 with
    Ubuntu 22.04 it quite often happens that the OS completely freezes and
    the PC has to be restarted by switching it off and on again.
    This seems to be an old problem, I found this bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1208993?
    comments=all
    which starts with 13.04, but the last comments are about 22.04. Are
    there any ideas how I can fix this? Has this been fixed in 23.10 or will
    it be fixed in 24.04?
    Thanks for any input on this.

    Does the OS "come back" when disconnecting / unplugging the drive?

    BR,
    Markus

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Joerg Walther on Mon Mar 4 08:57:36 2024
    On 3/3/2024 8:38 AM, Joerg Walther wrote:
    When copying larger files to any USB drive on a Thinkpad T480 with
    Ubuntu 22.04 it quite often happens that the OS completely freezes and
    the PC has to be restarted by switching it off and on again.
    This seems to be an old problem, I found this bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1208993?comments=all which starts with 13.04, but the last comments are about 22.04. Are
    there any ideas how I can fix this? Has this been fixed in 23.10 or will
    it be fixed in 24.04?
    Thanks for any input on this.

    -jw-


    There are potentially lots of levels of write caching to disable.

    Will require more research.

    The hdparm thing, might only be useful for some benchmarking activity,
    rather than general disk usage.

    https://stackoverflow.com/questions/20215516/disabling-disk-cache-in-linux

    Maybe something like down the end of this thread.

    https://unix.stackexchange.com/questions/637598/how-to-truly-disable-the-write-cache-functionin-dmesg-in-ubuntu-for-an-externa

    "edit your /etc/fstab ... mount option sync"

    Normally, a memory based cache for write, does not occupy so much space,
    that it causes swapping to disk. That would be bad. As if we're forced
    to write synchronously to flush the write cache, and at the same time
    we need to swap for some reason... will that even work ?

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joerg Walther@21:1/5 to Joerg Walther on Mon Mar 4 16:14:24 2024
    Joerg Walther wrote:

    Does the OS "come back" when disconnecting / unplugging the drive?

    I have to try this the next time it happens.

    Just tried: It does not come back.

    -jw-

    --

    And now for something completely different...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joerg Walther@21:1/5 to Markus Robert Kessler on Mon Mar 4 15:15:10 2024
    Markus Robert Kessler wrote:

    Thanks for any input on this.

    Does the OS "come back" when disconnecting / unplugging the drive?

    I have to try this the next time it happens.

    -jw-

    --

    And now for something completely different...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joerg Walther@21:1/5 to Paul on Mon Mar 4 16:16:16 2024
    Paul wrote:

    Maybe something like down the end of this thread.

    Right, so I disabled the write cache via udev rule, which unfortunately
    did not help. Note that the system is not out of memory, I have 32GB and
    at the time this happened barely a quarter of it was in use.

    -jw-

    --

    And now for something completely different...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From stepore@21:1/5 to Joerg Walther on Mon Mar 4 18:50:21 2024
    On 3/3/24 05:38, Joerg Walther wrote:
    When copying larger files to any USB drive on a Thinkpad T480 with
    Ubuntu 22.04 it quite often happens that the OS completely freezes and
    the PC has to be restarted by switching it off and on again.

    I assume this is dragging/dropping (copy/paste) files in a GUI?
    Does same happen from shell, using cp or rsync?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to Joerg Walther on Tue Mar 5 10:25:37 2024
    Joerg Walther <joerg.walther@magenta.de> writes:

    When copying larger files to any USB drive on a Thinkpad T480 with
    Ubuntu 22.04 it quite often happens that the OS completely freezes and
    the PC has to be restarted by switching it off and on again.

    You mean your PC crashes when copying data to USB? I would think that's
    a hardware issue. If it doesn't happen in some other flavor of Linux,
    then maybe it's something in Ubuntu.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joerg Walther@21:1/5 to stepore on Tue Mar 5 16:20:33 2024
    stepore wrote:

    When copying larger files to any USB drive on a Thinkpad T480 with
    Ubuntu 22.04 it quite often happens that the OS completely freezes and
    the PC has to be restarted by switching it off and on again.

    I assume this is dragging/dropping (copy/paste) files in a GUI?
    Does same happen from shell, using cp or rsync?

    It does not matter, it happens in GUI (Double Commander) and in the
    terminal.

    -jw-

    --

    And now for something completely different...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joerg Walther@21:1/5 to Anssi Saari on Tue Mar 5 16:22:57 2024
    Anssi Saari wrote:

    When copying larger files to any USB drive on a Thinkpad T480 with
    Ubuntu 22.04 it quite often happens that the OS completely freezes and
    the PC has to be restarted by switching it off and on again.

    You mean your PC crashes when copying data to USB? I would think that's
    a hardware issue.

    Probably not because it happens when the USB drive is connected to a
    USB2 port als well as a USB3 port, it's unlikely that two USB
    controllers are defective.

    If it doesn't happen in some other flavor of Linux,
    then maybe it's something in Ubuntu.

    The link in my original message points to a bug filed with Ubuntu years
    ago, it may be this bug and I am looking for a fix or a workaround.

    -jw-

    --

    And now for something completely different...

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