LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-29-2014, 09:23 AM   #1
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Yakkety
Posts: 193

Rep: Reputation: 15
resetting the USB system


I have an problem with my system where the mouse periodically fails and takes out everything connected to the same USB hub. I have a "fix", which is to run the following code to restart the USB system:

[code]
#!/bin/sh
# Find the optical mouse USB item in the list of buses:
bus=`lsusb | grep 'Optical Mouse' | cut -f 2 -d ' '`
# get the device name for the hub hosting the mouse
devname=`lsusb -v -s ${bus}:1 | grep iSerial | awk '{print $3}'`
# reset the hub for usb 2.0 devices. (Note: use ohci-pci for USB 1.1)
echo $devname > /sys/bus/pci/drivers/ehci-pci/unbind
echo $devname > /sys/bus/pci/drivers/ehci-pci/bind
[code]

This works, but has a troublesome side effect. After doing this, the sound system doesn't work. The sound system is not a USB system.

Runing "aplay -l" gives the message: "aplay: device_list:268: no soundcards found...".

The weird thing is that if I hit ctrl-alt-F1 to get a console and log in as a normal user, the sound (that was not working in X) starts playing and "aplay -l" lists

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
One other observation is that if I run 'aplay -l' as root from within X then I get the same list, and in fact "aplay file.wav" works if I run it as root. So somehow my resetting command is changing permissions of something so that only root can run sound while I'm within X...but outside of X the sound works for the regular user.

How can I reset the USB system without messing up the sound? How can I fix the permissions after having run the above so that sound works properly?
 
Old 11-29-2014, 12:00 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
I suggest that you fix the mouse.

---------------------
Steve Stites
 
Old 11-29-2014, 01:00 PM   #3
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Yakkety
Posts: 193

Original Poster
Rep: Reputation: 15
I would love to figure out how to solve the mouse problem. I have a separate post about that. I have tried two mice, so it's apparently a kernel bug or something.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Resetting root password on CentOS 7 system Tarikc Linux - Server 1 07-31-2014 09:25 AM
System resetting every 24 hours blunsky Linux - Hardware 2 09-21-2009 07:48 AM
System Clock keeps resetting itself into the future on kbuntu 8.04 GregJetter Ubuntu 4 09-04-2008 01:15 AM
Resetting Ubuntu system fonts Reegz Linux - Desktop 1 02-15-2008 11:13 AM
Resetting USB Port iomari Linux - Hardware 0 01-27-2005 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration