<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Reset USB Device Using Command Line in Linux	</title>
	<atom:link href="https://www.tecmint.com/reset-usb-device-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/reset-usb-device-linux/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Mon, 14 Apr 2025 04:38:04 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2296173</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Mon, 14 Apr 2025 04:38:04 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=58177#comment-2296173</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2295657&quot;&gt;HyRax&lt;/a&gt;.

@HyRax,

That&#039;s a clean and effective way to handle flaky USB devices — especially with MythTV, where stability is key for uninterrupted recordings.

You might consider a couple of tiny improvements to make it even more robust:

Add error checking, just in case the device isn&#039;t found:
&lt;pre&gt;
#!/bin/bash
PLAYTVDEVICEID=$(lsusb &#124; grep SCEH &#124; awk &#039;{print $6}&#039; &#124; head -n1)

if [ -n &quot;$PLAYTVDEVICEID&quot; ]; then
    usbreset $PLAYTVDEVICEID
    systemctl restart mythtv-backend
else
    echo &quot;PlayTV device not found!&quot; &gt;&amp;2
fi
&lt;/pre&gt;
Use &lt;code&gt;cut&lt;/code&gt; instead of &lt;code&gt;awk&lt;/code&gt; if you prefer a slightly faster alternative:
&lt;pre&gt;
PLAYTVDEVICEID=$(lsusb &#124; grep SCEH &#124; cut -d &#039; &#039; -f6 &#124; head -n1)
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2295657">HyRax</a>.</p>
<p>@HyRax,</p>
<p>That&#8217;s a clean and effective way to handle flaky USB devices — especially with MythTV, where stability is key for uninterrupted recordings.</p>
<p>You might consider a couple of tiny improvements to make it even more robust:</p>
<p>Add error checking, just in case the device isn&#8217;t found:</p>
<pre>
#!/bin/bash
PLAYTVDEVICEID=$(lsusb | grep SCEH | awk '{print $6}' | head -n1)

if [ -n "$PLAYTVDEVICEID" ]; then
    usbreset $PLAYTVDEVICEID
    systemctl restart mythtv-backend
else
    echo "PlayTV device not found!" >&#038;2
fi
</pre>
<p>Use <code>cut</code> instead of <code>awk</code> if you prefer a slightly faster alternative:</p>
<pre>
PLAYTVDEVICEID=$(lsusb | grep SCEH | cut -d ' ' -f6 | head -n1)
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: HyRax		</title>
		<link>https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2295657</link>

		<dc:creator><![CDATA[HyRax]]></dc:creator>
		<pubDate>Sun, 13 Apr 2025 01:38:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=58177#comment-2295657</guid>

					<description><![CDATA[I use &lt;strong&gt;usbreset&lt;/strong&gt; to reset my &lt;strong&gt;Sony PlayTV&lt;/strong&gt; tuners that I use with &lt;strong&gt;MythTV&lt;/strong&gt; that occasionally lose connection, so I have a script executed by the root cron to do this.

Since the &lt;strong&gt;lsusb&lt;/strong&gt; description comes up as &quot;&lt;strong&gt;Nam Tai E&#038;E Products Ltd. or OmniVision Technologies, Inc. SCEH-0036&lt;/strong&gt;&quot;, I get the device ID using &lt;strong&gt;grep&lt;/strong&gt; and &lt;strong&gt;awk&lt;/strong&gt; as follows:
&lt;pre&gt;
#!/bin/bash
PLAYTVDEVICEID=`lsusb &#124; grep SCEH &#124; awk &#039;{print $6}&#039; &#124; head -n1`
usbreset $PLAYTVDEVICEID
&lt;/pre&gt;
And then I restart MythTV after that.]]></description>
			<content:encoded><![CDATA[<p>I use <strong>usbreset</strong> to reset my <strong>Sony PlayTV</strong> tuners that I use with <strong>MythTV</strong> that occasionally lose connection, so I have a script executed by the root cron to do this.</p>
<p>Since the <strong>lsusb</strong> description comes up as &#8220;<strong>Nam Tai E&amp;E Products Ltd. or OmniVision Technologies, Inc. SCEH-0036</strong>&#8220;, I get the device ID using <strong>grep</strong> and <strong>awk</strong> as follows:</p>
<pre>
#!/bin/bash
PLAYTVDEVICEID=`lsusb | grep SCEH | awk '{print $6}' | head -n1`
usbreset $PLAYTVDEVICEID
</pre>
<p>And then I restart MythTV after that.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2226959</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Fri, 11 Oct 2024 04:23:34 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=58177#comment-2226959</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2226493&quot;&gt;dragonmouth&lt;/a&gt;.

@Dragonmouth,

Thank you for your question!

If the USB device is not being detected, you can still try to identify it using the following commands:
&lt;pre&gt;
lsusb
dmesg &#124; grep -i usb
&lt;/pre&gt;
Once you identify the device using these commands, you can proceed with resetting it.

Let me know if you need further assistance!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2226493">dragonmouth</a>.</p>
<p>@Dragonmouth,</p>
<p>Thank you for your question!</p>
<p>If the USB device is not being detected, you can still try to identify it using the following commands:</p>
<pre>
lsusb
dmesg | grep -i usb
</pre>
<p>Once you identify the device using these commands, you can proceed with resetting it.</p>
<p>Let me know if you need further assistance!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2226956</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Fri, 11 Oct 2024 04:20:12 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=58177#comment-2226956</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2226544&quot;&gt;Gérard&lt;/a&gt;.

@Gerard,

Thank you for your message and for pointing out the issue regarding the blank space in the Device Mount Point.

You are correct to be cautious when dealing with spaces in mount points. When there is a blank space in the path, you have two valid options:

Escape the space using a backslash (\):
&lt;pre&gt;
sudo umount /media/ravi/Windows\ USB
&lt;/pre&gt;
Enclose the entire path in quotes:
&lt;pre&gt;
sudo umount &quot;/media/ravi/Windows USB&quot;
&lt;/pre&gt;
Both options will work correctly. 

As for the trailing &lt;code&gt;/&lt;/code&gt;, it is not strictly necessary, but including or omitting it doesn’t affect the command’s functionality in this case. 

You can leave it out:
&lt;pre&gt;
sudo umount /media/ravi/Windows\ USB
&lt;/pre&gt;
I hope this clarifies your concern! Feel free to reach out if you have any further questions.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2226544">Gérard</a>.</p>
<p>@Gerard,</p>
<p>Thank you for your message and for pointing out the issue regarding the blank space in the Device Mount Point.</p>
<p>You are correct to be cautious when dealing with spaces in mount points. When there is a blank space in the path, you have two valid options:</p>
<p>Escape the space using a backslash (\):</p>
<pre>
sudo umount /media/ravi/Windows\ USB
</pre>
<p>Enclose the entire path in quotes:</p>
<pre>
sudo umount "/media/ravi/Windows USB"
</pre>
<p>Both options will work correctly. </p>
<p>As for the trailing <code>/</code>, it is not strictly necessary, but including or omitting it doesn’t affect the command’s functionality in this case. </p>
<p>You can leave it out:</p>
<pre>
sudo umount /media/ravi/Windows\ USB
</pre>
<p>I hope this clarifies your concern! Feel free to reach out if you have any further questions.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Gérard		</title>
		<link>https://www.tecmint.com/reset-usb-device-linux/comment-page-1/#comment-2226544</link>

		<dc:creator><![CDATA[Gérard]]></dc:creator>
		<pubDate>Thu, 10 Oct 2024 13:46:10 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=58177#comment-2226544</guid>

					<description><![CDATA[Dear Sir,

In Step 2, &quot;Unmount the USB Device in Linux,&quot; the syntax you provide is:
&lt;pre&gt;
sudo umount /media/username/device_name
&lt;/pre&gt;
However, how would that apply to your example? I ask because, in your example, the Device Mount Point contains a blank space. 

So, which of the following would be correct?
&lt;pre&gt;
sudo umount /media/ravi/Windows USB
OR
sudo umount /media/ravi/&quot;Windows USB&quot;
&lt;/pre&gt;
Addendum: I think I found it! Based on Step 4, it seems the correct command might be:
&lt;pre&gt;
sudo umount /media/ravi/Windows\ USB/
&lt;/pre&gt;
I am still unsure, especially regarding the trailing &lt;code&gt;/&lt;/code&gt; at the end. Could you please clarify this issue, particularly when there is a blank space in the Device Mount Point?

Regards,
Gérard]]></description>
			<content:encoded><![CDATA[<p>Dear Sir,</p>
<p>In Step 2, &#8220;Unmount the USB Device in Linux,&#8221; the syntax you provide is:</p>
<pre>
sudo umount /media/username/device_name
</pre>
<p>However, how would that apply to your example? I ask because, in your example, the Device Mount Point contains a blank space. </p>
<p>So, which of the following would be correct?</p>
<pre>
sudo umount /media/ravi/Windows USB
OR
sudo umount /media/ravi/"Windows USB"
</pre>
<p>Addendum: I think I found it! Based on Step 4, it seems the correct command might be:</p>
<pre>
sudo umount /media/ravi/Windows\ USB/
</pre>
<p>I am still unsure, especially regarding the trailing <code>/</code> at the end. Could you please clarify this issue, particularly when there is a blank space in the Device Mount Point?</p>
<p>Regards,<br />
Gérard</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
