<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://leo.leung.xyz/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=84.104.31.57</id>
	<title>Leo&#039;s Notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://leo.leung.xyz/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=84.104.31.57"/>
	<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/Special:Contributions/84.104.31.57"/>
	<updated>2026-10-09T06:17:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=How_to_disable_USB_Attached_Storage_(UAS)&amp;diff=7012</id>
		<title>How to disable USB Attached Storage (UAS)</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=How_to_disable_USB_Attached_Storage_(UAS)&amp;diff=7012"/>
		<updated>2022-12-04T14:00:03Z</updated>

		<summary type="html">&lt;p&gt;84.104.31.57: Added another reason to disable UAS (SMART monitoring of USB H.D.D.)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;USB Attached Storage (UAS) is now commonly found for USB 3.0 storage devices. However, this sometimes causes issues with non-compliant adapters requiring it to be disabled. Issues with having UAS enabled include slow write performance, or having the device randomly drop off until the USB connection is reset. More on the issues below.&lt;br /&gt;
&lt;br /&gt;
===Finding the USB device ID===&lt;br /&gt;
To disable UAS for a specific USB device, find the USB device associated with the drive. This can be accomplished by either reviewing the &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; kernel logs or using &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt;. For example, this Seagate expansion drive has the device ID &amp;lt;code&amp;gt;0bc2:3343&amp;lt;/code&amp;gt;:&lt;br /&gt;
{{Highlight&lt;br /&gt;
| lang = terminal&lt;br /&gt;
| code = # lsusb&lt;br /&gt;
Bus 004 Device 002: ID 0bc2:3343 Seagate RSS LLC Desktop&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Disabling UAS===&lt;br /&gt;
After knowing the device ID, there are three ways to disable UAS. In all three ways, the idea is to pass in a &amp;lt;code&amp;gt;quirk&amp;lt;/code&amp;gt; parameter to the &amp;lt;code&amp;gt;usb_storage&amp;lt;/code&amp;gt; kernel module, telling the module to not use UAS for a specific device. This is done by passing in the USB device ID followed by the &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt; flag.. Other flags that you can use can be found by looking at the kernel source code at https://github.com/torvalds/linux/blob/master/drivers/usb/storage/usb.c#L568.&lt;br /&gt;
&lt;br /&gt;
====Manually reload the kernel module (temporary)====&lt;br /&gt;
&#039;&#039;&#039;A temporary solution&#039;&#039;&#039;: Temporarily reload the usb-storage kernel module with the quirks.&lt;br /&gt;
&lt;br /&gt;
Unload the {{code|usb-storage}} kernel module and re-load it with a quirk parameter specifying which device to not enable UAS on.{{highlight|lang=terminal|code=&lt;br /&gt;
# lsusb&lt;br /&gt;
Bus 002 Device 005: ID 0bc2:3343 Seagate RSS LLC&lt;br /&gt;
&lt;br /&gt;
# rmmod usb-storage&lt;br /&gt;
# modprobe usb-storage quirks=0bc2:3343:u &lt;br /&gt;
}}Re-attach the USB device again. This time, {{code|dmesg}} should say that a quirk was detected for this device:{{highlight|lang=text|code=&lt;br /&gt;
[947347.271519] usb 2-3.2: New USB device found, idVendor=0bc2, idProduct=3343, bcdDevice= 1.00&lt;br /&gt;
[947955.635329] usb-storage 2-3.2:1.0: Quirks match for vid 0bc2 pid 3343: 800000&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Disable permanently with modprobe.d====&lt;br /&gt;
Create a new file in &amp;lt;code&amp;gt;/etc/modprobe.d/disable-uas.conf&amp;lt;/code&amp;gt; with the following contents:&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = options usb-storage quirks=0bc2:3322:u&lt;br /&gt;
| lang = text&lt;br /&gt;
}}&lt;br /&gt;
Then, rebuild initrd so that the kernel loads the usb-storage module with this option during boot.&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = # update-initramfs -u&lt;br /&gt;
| lang = text&lt;br /&gt;
}}&lt;br /&gt;
Reboot the machine. When the kernel module is loaded again, it should be aware of the quirk. If this isn&#039;t taking effect, try the cmdline argument option below.&lt;br /&gt;
&lt;br /&gt;
====Disable permanently with kernel cmdline arguments====&lt;br /&gt;
Change your bootloader so that the quirk values are passed to the kernel. &lt;br /&gt;
&lt;br /&gt;
For CentOS/Fedora/Red Hat based systems, edit &amp;lt;code&amp;gt;/etc/default/grub&amp;lt;/code&amp;gt; and add the following to &amp;lt;code&amp;gt;GRUB_CMDLINE_LINUX&amp;lt;/code&amp;gt;:&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = usb-storage.quirks=0bc2:3322:u&lt;br /&gt;
| lang = text&lt;br /&gt;
}}&lt;br /&gt;
Rebuild the grub configs with &amp;lt;code&amp;gt;grub2-mkconfig -o /boot/grub2/grub.cfg&amp;lt;/code&amp;gt; and reboot.&lt;br /&gt;
&lt;br /&gt;
On other systems such as Linux on a Raspberry Pi, edit &amp;lt;code&amp;gt;/boot/cmdline.txt&amp;lt;/code&amp;gt; and append &amp;lt;code&amp;gt;usb-storage.quirks=XX:YY:u&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Why would you want to disable UAS? ==&lt;br /&gt;
When a USB device isn&#039;t working properly with UAS enabled, you will most likely see the following symptoms:&lt;br /&gt;
&lt;br /&gt;
* Slow transfer speeds, sometimes even stalling&lt;br /&gt;
*S.M.A.R.T. information not available (e.g. in &amp;lt;code&amp;gt;smartctl&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;smartd&amp;lt;/code&amp;gt; to monitor a system&#039;s disk automatically).&lt;br /&gt;
* Kernel messages are full of errors similar to the ones listed below. However, the drive is still healthy.&lt;br /&gt;
* Error messages from &amp;lt;code&amp;gt;uas_eh_abort_handler&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = sd 0:0:0:0: [sda] tag#27 uas_eh_abort_handler 0 uas-tag 19 inflight: CMD IN&lt;br /&gt;
sd 0:0:0:0: [sda] tag#27 CDB: opcode=0x28 28 00 02 c2 cc 50 00 01 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#26 uas_eh_abort_handler 0 uas-tag 7 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#26 CDB: opcode=0x2a 2a 00 02 60 59 b0 00 00 80 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#25 uas_eh_abort_handler 0 uas-tag 16 inflight: CMD IN&lt;br /&gt;
sd 0:0:0:0: [sda] tag#25 CDB: opcode=0x28 28 00 02 82 aa a8 00 03 28 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#24 uas_eh_abort_handler 0 uas-tag 11 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#24 CDB: opcode=0x2a 2a 00 02 64 48 d0 00 00 08 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#23 uas_eh_abort_handler 0 uas-tag 15 inflight: CMD IN&lt;br /&gt;
sd 0:0:0:0: [sda] tag#23 CDB: opcode=0x28 28 00 02 82 a6 a8 00 04 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#22 uas_eh_abort_handler 0 uas-tag 14 inflight: CMD IN&lt;br /&gt;
sd 0:0:0:0: [sda] tag#22 CDB: opcode=0x28 28 00 02 82 b9 d0 00 04 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#21 uas_eh_abort_handler 0 uas-tag 13 inflight: CMD IN&lt;br /&gt;
sd 0:0:0:0: [sda] tag#21 CDB: opcode=0x28 28 00 02 82 b5 d0 00 04 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#20 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#20 CDB: opcode=0x2a 2a 00 02 a1 16 78 00 00 20 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#19 uas_eh_abort_handler 0 uas-tag 12 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#19 CDB: opcode=0x2a 2a 00 02 64 42 48 00 04 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#18 uas_eh_abort_handler 0 uas-tag 10 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#18 CDB: opcode=0x2a 2a 00 02 64 3e 90 00 03 b8 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#17 uas_eh_abort_handler 0 uas-tag 9 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#17 CDB: opcode=0x2a 2a 00 02 64 3a 90 00 04 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#16 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#16 CDB: opcode=0x2a 2a 00 02 64 46 48 00 02 88 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#15 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#15 CDB: opcode=0x2a 2a 00 02 84 83 68 00 00 38 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#14 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#14 CDB: opcode=0x2a 2a 00 02 64 16 08 00 00 40 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#13 uas_eh_abort_handler 0 uas-tag 18 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#13 CDB: opcode=0x2a 2a 00 01 26 e3 00 00 01 18 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#12 uas_eh_abort_handler 0 uas-tag 6 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#12 CDB: opcode=0x2a 2a 00 01 26 e0 70 00 00 60 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#7 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD IN&lt;br /&gt;
sd 0:0:0:0: [sda] tag#7 CDB: opcode=0x28 28 00 02 82 ad d0 00 04 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#4 uas_eh_abort_handler 0 uas-tag 17 inflight: CMD IN&lt;br /&gt;
sd 0:0:0:0: [sda] tag#4 CDB: opcode=0x28 28 00 02 82 b1 d0 00 04 00 00&lt;br /&gt;
sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 8 inflight: CMD OUT&lt;br /&gt;
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 02 64 36 d0 00 01 40 00&lt;br /&gt;
scsi host0: uas_eh_device_reset_handler start&lt;br /&gt;
usb 2-2: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd&lt;br /&gt;
scsi host0: uas_eh_device_reset_handler success&lt;br /&gt;
| lang = text&lt;br /&gt;
}}&lt;br /&gt;
{{Navbox Linux}}&lt;br /&gt;
[[Category:Linux]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>84.104.31.57</name></author>
	</entry>
</feed>