My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Showing posts with label usb. Show all posts
Showing posts with label usb. Show all posts

Wednesday, December 15, 2010

USB drives not automounting

I noticed that after upgrading my laptop to Ubuntu 10.10, USB drives weren't automounting.

My first clue was in this comment, I didn't have the usb_storage kernel module loaded:

# lsmod | grep usb
usbhid                 36882  0 
hid                    67742  1 usbhid

So I loaded the usb_storage module:

# modprobe usb_storage
WARNING: All config files need .conf: /etc/modprobe.d/ndiswrapper, it will be ignored in a future release.
# lsmod | grep usb
usb_storage            40172  1 
usbhid                 36882  0 
hid                    67742  1 usbhid

And at this point USB drives mounted just fine. To make it permanent, I followed the directions in this post, added "usb_storage" to /etc/modules and rebooted. USB automounting working fine now.

Sunday, November 29, 2009

Virtualbox USB devices greyed out

Running WinXP inside of VirtualBox and wanting to re-program my Harmony Remote, but all the USB devices were grey out. I followed these directions to fix.

First I added myself to vboxusers group:
# grep vbox /etc/group
vboxusers:x:128:
# usermod -G vboxusers -a von
In order to get this group change to take effect in my login session, I had to logout and back in again.

Then I edited /etc/fstab to add /proc/bus/usb. I had an old entry I had to comment out.
# vi /etc/fstab
# tail -2 /etc/fstab
#/dev/bus/usb /proc/bus/usb usbfs auto 0 0
none /proc/bus/usb usbfs devgid=128,devmod=644 0 0
I had to unmount the old /proc/bus/usb and then remount it:
# umount /proc/bus/usb
# mount -a
At this point I restarted VirtualBox and was able to mount USB devices.

Sunday, June 14, 2009

USB thumb drive mounting writable only by root...

I had a thumb drive that was mounting on my Ubuntu laptop OK, but was writable only by root.

Long story short, I figured out it was something about the way it was formatted. When I tried to put the same thumb drive into my Mac, it wouldn't mount it and I had to reformat it. After that it mounted just fine on my Ubuntu laptop and was owned by when when I did so.

Not sure how I formatted it in the first place, but lesson learned is that certain formats mount OK but will not be user writable.

Sunday, January 18, 2009

Installing Skype on 8.10 Desktop and getting it to work with Logitech Headset

Installing Skype on a Ubuntu 8.10 desktop turns out to be a piece of cake, getting it to work with my Logitech USB Headset was a little harder.

Installation of Skype was easy following these directions. First, I edited /etc/apt/sources.list to include the Skype repository:

# vi /etc/apt/sources.list
# tail -3 /etc/apt/sources.list
# SKYPE
deb http://download.skype.com/linux/repos/debian/ stable non-free

Then I did the repository install and installed skype:
# apt-get update
# apt-get install skype

At this point Skype was installed and appeared under Applications -> Internet -> Skype

But when I tried to make a call Skype reported "Problem with Audio Playback" and nothing worked.

Long story short, these directions finally worked for me, specifically, here are the devices I used:

Sound in: Logitech USB Headset (pluhw:Headset,0)
Sound out: Logitech USB Headset (hw:Headset,0)
Ringing: Logitech USB Headset (hw:Headset,0)

During the time I worked on this problem I restarted pulseaudio, I don't know if this helped or not, but I'll mention it just in case:
# killall pulseaudio
# /etc/init.d/pulseaudio start

Following is more details on things I saw and what didn't work.

If I run System -> Preferences -> Sound, I see both ALSA and OSS versions of the Headset, but only the OSS version works (the ALSO version returns the following error when I try to test it: "audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink: Could not open audio device for playback.")

Trying to record with Applications -> Sound & Video -> Sound Recorder does not work.

"alsamixer -c 1" showed Logitech USB Headset, but I couldn't get anything further to work.

I tried these directions but I saw the same problem others did in that when I tried to remove pulseaudio, apt-get/aptitude wanted to remove ubuntu-desktop and I stopped there.

Here is the output from a couple commands:

# cat /proc/asound/cards 
 0 [ICH6           ]: ICH4 - Intel ICH6
                      Intel ICH6 with STAC9752,53 at irq 16
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:1d.3-2, full speed

# cat /proc/asound/devices
  2:        : timer
  3:        : sequencer
  4: [ 0- 4]: digital audio playback
  5: [ 0- 3]: digital audio capture
  6: [ 0- 2]: digital audio capture
  7: [ 0- 1]: digital audio capture
  8: [ 0- 0]: digital audio playback
  9: [ 0- 0]: digital audio capture
 10: [ 0]   : control
 11: [ 1- 0]: digital audio playback
 12: [ 1- 0]: digital audio capture
 13: [ 1]   : control

Saturday, December 13, 2008

USB devices not appearing in VMs

Hmmm, I went to use a USB device in my Win XP win and it wasn't showing up (Under VM/Removable Devices/USB Devices). This sure seems familiar but I can't find a blog post about it. A quick google turned up this hint which I really remember doing before. In fact I have a /etc/init.d/mountdevsubfs.sh.dpkg.old file with the changes applied, so I know I did.

However when I re-applied those changes I got an error running the script (see end of post).

Poking around a little more I found this advice which seemed cleaner, except it was a little flawed, when I tried adding the line as given to /etc/fstab, it didn't help and I noticed that if I actually tried to invoke the line, I got the following error:

# mount /proc/bus/usb
[mntent]: line 10 in /etc/fstab is bad

The "usbfs" on the begining seemed wrong to me, so I dropped that, resulting in the following line:

/dev/bus/usb /proc/bus/usb usbfs auto 0 0

Then I restarted VMWare ("/etc/init.d/vmware restart") and my USB devices appeared!


Changes I made to /etc/init.d/mountdevsubfs.sh:

# diff -c mountdevsubfs.sh.orig mountdevsubfs.sh
*** mountdevsubfs.sh.orig 2008-12-13 08:19:38.000000000 -0600
--- mountdevsubfs.sh 2008-12-13 08:20:25.000000000 -0600
***************
*** 39,44 ****
--- 39,51 ----
   # Mount /dev/pts. Master ptmx node is already created by udev.
   #
          domount devpts "" /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
+  #
+  # Magic to make /proc/bus/usb work so USB devices appear in VMWare
+  #
+  mkdir -p /dev/bus/usb/.usbfs
+  domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
+  ln -s .usbfs/devices /dev/bus/usb/devices
+  mount --rbind /dev/bus/usb /proc/bus/usb
  }
  
  case "$1" in

Error from I got from those changes:
# /etc/init.d/mountdevsubfs.sh start
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
One can change the type of mount containing the directory dir:
       mount --make-shared dir
       mount --make-slave dir
       mount --make-private dir
       mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
       mount --make-rshared dir
       mount --make-rslave dir
       mount --make-rprivate dir
       mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .
ln: creating symbolic link `/dev/bus/usb/devices': File exists