[SOLVED] LinuxMint slows down or freezes when copying large files to usb

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
carum carvi

[SOLVED] LinuxMint slows down or freezes when copying large files to usb

Post by carum carvi »

I have experienced this every time when I copied large files (dvd iso's) to and from usb: linuxmint 19 Cinnamon OS freezes shortly or sometimes freezes altogether and doesnt respond at all anymore. Have to do a hard shutdown to get LM19 working again. Had that same problem in LM18.3 as well.

I found this link to a bugreport with lots of different terminal command solutions. All sorts of Linux OS seems to be affected. I am still a newbie though, dont know which advice from the many different OS to follow.

https://bugs.launchpad.net/ubuntu/+sour ... ug/1208993
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: LinuxMint slows down or freezes when copying large files to usb

Post by WharfRat »

It looks like that bug has been around for a long time :?

One suggestion that seems to work according to this is to set vm.dirty_bytes to 15000000.

This can be done with sudo sysctl -w vm.dirty_bytes=15000000

That change will only last for the session.

To make it persistent edit /etc/sysctl.conf and add vm.dirty_bytes=15000000

Good luck :wink:
carum carvi

Re: LinuxMint slows down or freezes when copying large files to usb

Post by carum carvi »

WharfRat wrote: Sun Dec 16, 2018 5:24 pm One suggestion that seems to work according to this is to set vm.dirty_bytes to 15000000.

This can be done with sudo sysctl -w vm.dirty_bytes=15000000
That change will only last for the session.
To make it persistent edit /etc/sysctl.conf and add vm.dirty_bytes=15000000
Thanks for that terminal command Wharfrat. I would like to make it persistent as well.
Should I place that command to make it persistent right at the very beginning of that systl.conf page? Should I place that command behind a "#" symbol?

I am totally clueless to anything related to commands etc. I am total newbie as far as commands are concerned.
fungus
Level 4
Level 4
Posts: 386
Joined: Mon Sep 07, 2015 6:09 am

Re: LinuxMint slows down or freezes when copying large files to usb

Post by fungus »

Assuming that xed is the default text-editor, you must open a console and run the command "sudo xed /etc/sysctl.conf", this will open the config file in the text editor as sudo, if you do not sudo you cannot save the file. When the file is loaded into the editor, find the line with "vm.dirty_bytes=XX" (if present) and change the value of it. If not present, add it to the end of the file and make sure that the file is terminated with an empty line, save the file, reboot, bliss :)
Linux Mint 17.3 64bit KDE @ Asus B150M-A, i3 6100, Crucial 16GB DDR4, Crucial BX100
One bit says: YES, the other answers: NO.. Guess who's he and who's she..! ;)
carum carvi

Re: LinuxMint slows down or freezes when copying large files to usb

Post by carum carvi »

Thx Fungus,

This is how my systcl.conf looks like at the end:

###################################################################
# Magic system request Key
# 0=disable, 1=enable all
# Debian kernels have this set to 0 (disable the key)
# See https://www.kernel.org/doc/Documentation/sysrq.txt
# for what other values do
#kernel.sysrq=1

###################################################################
# Protected links
#
# Protects against creating or following links under certain conditions
# Debian kernels have both set to 1 (restricted)
# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt
#fs.protected_hardlinks=0
#fs.protected_symlinks=0



Should I first make a new line with: "#################" OR should I not do that?
Or should I type that new line directly after: "#fs.protected_symlinks=0" ?
WharfRat

Re: LinuxMint slows down or freezes when copying large files to usb

Post by WharfRat »

Add the following to the end of /etc/sysctl.conf

Code: Select all

###################################################################
# Workaround for USB file copy
# https://unix.stackexchange.com/questions/180818/gnome-nautilus-copy-files-to-usb-stops-at-100-or-near
vm.dirty_bytes=15000000
This way you remember a year later the reason for the change and the reference :wink:
carum carvi

Re: LinuxMint slows down or freezes when copying large files to usb

Post by carum carvi »

WharfRat wrote: Mon Dec 17, 2018 9:28 am

Code: Select all

# Workaround for USB file copy
This way you remember a year later the reason for the change and the reference :wink:
Thx Wharfrat, this has been a great learning curve for me personally in configuring a system file!
ratcat

Re: [SOLVED] LinuxMint slows down or freezes when copying large files to usb

Post by ratcat »

I tried these fixes and eventually settled on switching to XFE as my file explorer. Works great and even seems faster to me.
Locked

Return to “Hardware Support”