LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 05-05-2011, 05:34 AM   #1
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Rep: Reputation: 6
auto detect usb when inserted


Hello,

I cant get my usb devices to autodetect when they are inserted.

I tried to use autofs with code as follows:

autofs.master:
Code:
 
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc   /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
/net    -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
# mount point    config file              options
/devices        /etc/autofs/auto.misc    --timeout=5 --ghost
#/net            -hosts
auto.misc:
Code:
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cd              -fstype=iso9660,nosuid,nodev    :/dev/cdrom
usb1            -fstype=auto                    :/dev/sde1
usb2            -fstype=auto                    :/dev/sdf1

# the following entries are samples to pique your imagination
#linux          -ro,soft,intr           ftp.example.org:/pub/linux
#boot           -fstype=ext2            :/dev/hda1
#floppy         -fstype=auto            :/dev/fd0
#floppy         -fstype=ext2            :/dev/fd0
#e2floppy       -fstype=ext2            :/dev/fd0
#jaz            -fstype=ext2            :/dev/sdc1
#removable      -fstype=ext2            :/dev
Also, I have a usb network access point that wont power up in Gentoo(light wont turn on). I know it works because I was using it in OpenSuse.

Its possible that I'm missing a kernel module but don't know what it would be.

What am I missing here?

Any help would be great.
 
Old 05-06-2011, 01:25 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Adol View Post
Hello,

I cant get my usb devices to autodetect when they are inserted.

I tried to use autofs with code as follows:

autofs.master:
Code:
 
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc   /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
/net    -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
# mount point    config file              options
/devices        /etc/autofs/auto.misc    --timeout=5 --ghost
#/net            -hosts
auto.misc:
Code:
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cd              -fstype=iso9660,nosuid,nodev    :/dev/cdrom
usb1            -fstype=auto                    :/dev/sde1
usb2            -fstype=auto                    :/dev/sdf1

# the following entries are samples to pique your imagination
#linux          -ro,soft,intr           ftp.example.org:/pub/linux
#boot           -fstype=ext2            :/dev/hda1
#floppy         -fstype=auto            :/dev/fd0
#floppy         -fstype=ext2            :/dev/fd0
#e2floppy       -fstype=ext2            :/dev/fd0
#jaz            -fstype=ext2            :/dev/sdc1
#removable      -fstype=ext2            :/dev
These days I wouldn't use autofs at all. May I suggest looking into udisks? There are some udisks based tools that can do automounting, like this:

http://bitbucket.org/byronclark/udiskie

Quote:
Also, I have a usb network access point that wont power up in Gentoo(light wont turn on). I know it works because I was using it in OpenSuse.

Its possible that I'm missing a kernel module but don't know what it would be.

What am I missing here?

Any help would be great.
What does the system log (dmesg) says when you plug the device?
 
Old 05-06-2011, 10:32 AM   #3
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by i92guboj View Post
These days I wouldn't use autofs at all. May I suggest looking into udisks? There are some udisks based tools that can do automounting, like this:

http://bitbucket.org/byronclark/udiskie



What does the system log (dmesg) says when you plug the device?
Thank you for your reply.

Before I plug anything in I get this:

Code:
[103464.682285] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0020
[103464.682295] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001803 0  ACK POWER sig=j CSC CONNECT
[103464.682302] hub 1-0:1.0: port 5, status 0501, change 0001, 480 Mb/s
[103464.708024] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001803 0  ACK POWER sig=j CSC CONNECT
[103464.812016] hub 1-0:1.0: debounce: port 5: total 125ms stable 100ms status 0x501
[103464.863063] ehci_hcd 0000:00:12.2: port 5 high speed
[103464.863069] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT
[103464.914030] usb 1-5: new high speed USB device using ehci_hcd and address 5
[103464.965063] ehci_hcd 0000:00:12.2: port 5 high speed
[103464.965069] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT
[103465.029500] usb 1-5: default language 0x0409
[103465.030241] usb 1-5: udev 5, busnum 1, minor = 4
[103465.030243] usb 1-5: New USB device found, idVendor=2019, idProduct=ab2a
[103465.030245] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[103465.030247] usb 1-5: Product: GW-USNANO2
[103465.030249] usb 1-5: Manufacturer: Planex Communications Inc.
[103465.030250] usb 1-5: SerialNumber: 00e04c000001
[103465.030321] usb 1-5: usb_probe_device
[103465.030324] usb 1-5: configuration #1 chosen from 1 choice
[103465.030492] usb 1-5: adding 1-5:1.0 (config #1, interface 0)
[103465.030552] drivers/usb/core/inode.c: creating file '005'
[103465.030573] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0020
[103522.614568] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0020
[103522.614577] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001002 0  ACK POWER sig=se0 CSC
[103522.614584] hub 1-0:1.0: port 5, status 0100, change 0001, 12 Mb/s
[103522.614587] usb 1-5: USB disconnect, address 5
[103522.614588] usb 1-5: unregistering device
[103522.614590] usb 1-5: unregistering interface 1-5:1.0
[103522.614647] usb 1-5: usb_disable_device nuking all URBs
[103522.718015] hub 1-0:1.0: debounce: port 5: total 100ms stable 100ms status 0x100
after I plug it in I get this:
Code:
[103464.682285] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0020
[103464.682295] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001803 0  ACK POWER sig=j CSC CONNECT
[103464.682302] hub 1-0:1.0: port 5, status 0501, change 0001, 480 Mb/s
[103464.708024] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001803 0  ACK POWER sig=j CSC CONNECT
[103464.812016] hub 1-0:1.0: debounce: port 5: total 125ms stable 100ms status 0x501
[103464.863063] ehci_hcd 0000:00:12.2: port 5 high speed
[103464.863069] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT
[103464.914030] usb 1-5: new high speed USB device using ehci_hcd and address 5
[103464.965063] ehci_hcd 0000:00:12.2: port 5 high speed
[103464.965069] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT
[103465.029500] usb 1-5: default language 0x0409
[103465.030241] usb 1-5: udev 5, busnum 1, minor = 4
[103465.030243] usb 1-5: New USB device found, idVendor=2019, idProduct=ab2a
[103465.030245] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[103465.030247] usb 1-5: Product: GW-USNANO2
[103465.030249] usb 1-5: Manufacturer: Planex Communications Inc.
[103465.030250] usb 1-5: SerialNumber: 00e04c000001
[103465.030321] usb 1-5: usb_probe_device
[103465.030324] usb 1-5: configuration #1 chosen from 1 choice
[103465.030492] usb 1-5: adding 1-5:1.0 (config #1, interface 0)
[103465.030552] drivers/usb/core/inode.c: creating file '005'
[103465.030573] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0020
[103522.614568] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0020
[103522.614577] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001002 0  ACK POWER sig=se0 CSC
[103522.614584] hub 1-0:1.0: port 5, status 0100, change 0001, 12 Mb/s
[103522.614587] usb 1-5: USB disconnect, address 5
[103522.614588] usb 1-5: unregistering device
[103522.614590] usb 1-5: unregistering interface 1-5:1.0
[103522.614647] usb 1-5: usb_disable_device nuking all URBs
[103522.718015] hub 1-0:1.0: debounce: port 5: total 100ms stable 100ms status 0x100
[103570.309884] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0020
[103570.309892] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001803 0  ACK POWER sig=j CSC CONNECT
[103570.309899] hub 1-0:1.0: port 5, status 0501, change 0001, 480 Mb/s
[103570.413020] hub 1-0:1.0: debounce: port 5: total 100ms stable 100ms status 0x501
[103570.464075] ehci_hcd 0000:00:12.2: port 5 high speed
[103570.464079] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT
[103570.515025] usb 1-5: new high speed USB device using ehci_hcd and address 6
[103570.566026] ehci_hcd 0000:00:12.2: port 5 high speed
[103570.566030] ehci_hcd 0000:00:12.2: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT
[103570.630519] usb 1-5: default language 0x0409
[103570.631264] usb 1-5: udev 6, busnum 1, minor = 5
[103570.631266] usb 1-5: New USB device found, idVendor=2019, idProduct=ab2a
[103570.631268] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[103570.631270] usb 1-5: Product: GW-USNANO2
[103570.631271] usb 1-5: Manufacturer: Planex Communications Inc.
[103570.631273] usb 1-5: SerialNumber: 00e04c000001
[103570.631341] usb 1-5: usb_probe_device
[103570.631344] usb 1-5: configuration #1 chosen from 1 choice
[103570.631513] usb 1-5: adding 1-5:1.0 (config #1, interface 0)
[103570.631588] drivers/usb/core/inode.c: creating file '006'
This looks important. What file is this? Do I need to use it somehow?
Quote:
[103570.631588] drivers/usb/core/inode.c: creating file '006'
It looks like its being found but its not powering up or doing anything.

Also, I'll take a look at udisks. Thanks for the suggestion. Many times I have no idea what to look into when I have these problems.

Last edited by Adol; 05-06-2011 at 10:34 AM.
 
Old 05-07-2011, 11:14 AM   #4
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Ok so I found out that it is being auto mounted.

When I su - and then open dolphin my usb drive shows up as it should.

I really don't want to use dolphin in super user mode.

How can I get it to do the same thing with my user account?
 
Old 05-07-2011, 05:07 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Please, try to do this in command line as a regular user, and before plugging the drive.

Code:
udisks --monitor
Then plug it into the usb port, and let us know if there's any output. If there's no output, repeat as root and tell us what happens.
 
Old 05-07-2011, 08:54 PM   #6
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by i92guboj View Post
Please, try to do this in command line as a regular user, and before plugging the drive.

Code:
udisks --monitor
Then plug it into the usb port, and let us know if there's any output. If there's no output, repeat as root and tell us what happens.
There is no output either way:

Code:
petreuss@Linux ~ $ udisks --monitor
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
Linux petreuss # udisks --monitor
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
^C
Linux petreuss # exit
exit
Linux petreuss is my root account.

Also I emerged udisks yesterday to try and use it. but I got this error:
Code:
*   CONFIG_USB_SUSPEND:         is not set when it should be.
 
Old 05-08-2011, 04:40 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Do you have devicekit and udev enabled globally? Try this command and see if it reports anything:

Code:
USE="consolekit udev policykit -hal" emerge -auDvN world
 
1 members found this post helpful.
Old 05-09-2011, 05:25 AM   #8
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by i92guboj View Post
Do you have devicekit and udev enabled globally? Try this command and see if it reports anything:

Code:
USE="consolekit udev policykit -hal" emerge -auDvN world
Hello,

This fixed all of my problems.

Everything works as it should now(it also gave me a bootup sound in KDE)

Thank you very much.
 
Old 05-09-2011, 09:06 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Adol View Post
Hello,

This fixed all of my problems.

Everything works as it should now(it also gave me a bootup sound in KDE)

Thank you very much.
Note that USE flags given this way (in command line) are not saved, so their effect may go away the next time you do a global update. To make this permanent you need to save these USE flag in your /etc/make.conf file. If you have installed Gentoo yourself you should already know how to deal with that, if not just ask for guidance.
 
Old 05-10-2011, 12:27 AM   #10
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by i92guboj View Post
Note that USE flags given this way (in command line) are not saved, so their effect may go away the next time you do a global update. To make this permanent you need to save these USE flag in your /etc/make.conf file. If you have installed Gentoo yourself you should already know how to deal with that, if not just ask for guidance.
Thank you.

I have already added all the use flags to my /etc/make.conf

Thanks again
 
  


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
Auto-detect USB speakers on boot TuxArch Linux - Hardware 6 02-26-2011 06:26 AM
howto auto-launch a script when usb key inserted? adamrosspayne Linux - Newbie 3 09-22-2006 04:21 AM
usb device auto detect akudewan Ubuntu 1 03-09-2006 08:37 AM
usb multi card reader doesnt detect newly inserted cards qwijibow Linux - Hardware 5 10-11-2005 10:17 PM
usb multi card reader doesnt detect newly inserted cards qwijibow Linux - Hardware 1 08-24-2005 03:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 12:54 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