You are not logged in.

#1 2011-02-24 15:23:18

setzer
Member
Registered: 2008-12-04
Posts: 3

USB not working properly (ehci_hcd issue?)

Hello,
About two weeks ago my usb started to act weird. Whenever I plug in a flash drive/hard disk/other storage device, it doesn't automount anymore. I checked my messages log to see what was the problem, but I couldn't get any conclusive info. The usb device only mounts after I do a rmmod ehci_hcd and a modprobe ehci_hcd, but when I restart my computer, the problem comes back.
Here is my messages.log when I plug in the device:

Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: BAR 0: set to [mem 0xf2308500-0xf23085ff] (PCI address [0xf2308500-0xf23085ff])
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: PCI INT B disabled
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: BAR 0: set to [mem 0xf2308400-0xf23084ff] (PCI address [0xf2308400-0xf23084ff])
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: PCI INT B disabled
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: BAR 0: set to [mem 0xf2308500-0xf23085ff] (PCI address [0xf2308500-0xf23085ff])
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: PCI INT B disabled
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: BAR 0: set to [mem 0xf2308400-0xf23084ff] (PCI address [0xf2308400-0xf23084ff])
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: PCI INT B disabled
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: BAR 0: set to [mem 0xf2308500-0xf23085ff] (PCI address [0xf2308500-0xf23085ff])
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:12.2: PCI INT B disabled
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: BAR 0: set to [mem 0xf2308400-0xf23084ff] (PCI address [0xf2308400-0xf23084ff])
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
Feb 24 12:22:45 localhost kernel: ehci_hcd 0000:00:13.2: PCI INT B disabled

Also, here's my lsusb output:

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0c45:62c0 Microdia Sonix USB 2.0 Camera
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

As you can see, my KINGSTON DataTraveler 112 is not listed... what could it be?

Offline

#2 2011-02-25 08:09:06

rekado
Member
From: Shanghai, China
Registered: 2009-01-13
Posts: 98
Website

Re: USB not working properly (ehci_hcd issue?)

I noticed the same today in the morning after connecting and attempting to mount my phone's disk. I assumed it was due to not rebooting after a kernel upgrade. Will check it again tonight.

Offline

#3 2011-02-25 09:38:31

jQuerulous
Member
Registered: 2011-02-25
Posts: 4

Re: USB not working properly (ehci_hcd issue?)

I'm having exactly the same issue as Setzer.

It's unfortunate that the dmesg output is not more helpful.

Also, it seems to happen with both my USB HDD and my USB mouse.

Last edited by jQuerulous (2011-02-25 09:39:29)

Offline

#4 2011-03-01 01:10:24

SpleenThief
Member
Registered: 2011-02-28
Posts: 16

Re: USB not working properly (ehci_hcd issue?)

I'm also having issues with USB. The solution in the first post works, but it's bothersome. This also started happening to me about two weeks ago, must be because of the kernel upgrade. However reinstalling the kernel did not fix it...

My thread is here: https://bbs.archlinux.org/viewtopic.php … 12#p897712

EDIT: My problem was solved by doing this:

# rm -rf /var/cache/pacman/pkg/kernel26-2.6.37.1-1-x86_64.pkg.tar.xz
# pacman -S kernel26

EDIT: Well, the problem is partially solved. It detects the first device plugged in, but none after that.

EDIT: My problem was having USB autosuspend disabled in laptop-mode-tools. I fixed this by changing "CONTROL_USB_AUTOSUSPEND" in /etc/laptop-mode/conf.d/usb-autosuspend.conf to 1 and having a long "AUTOSUSPEND_TIMEOUT".

Last edited by SpleenThief (2011-03-02 03:21:58)

Offline

#5 2011-03-02 15:18:28

VitaminJ
Member
Registered: 2009-10-19
Posts: 26

Re: USB not working properly (ehci_hcd issue?)

Having autosuspend disabled caused it? That seems weird. The power saving options usually cause problems with devices when those options are enabled, not the other way around.

See also https://bbs.archlinux.org/viewtopic.php?pid=898396

Last edited by VitaminJ (2011-03-02 15:19:22)

Offline

#6 2011-03-02 16:37:02

SpleenThief
Member
Registered: 2011-02-28
Posts: 16

Re: USB not working properly (ehci_hcd issue?)

Exactly, that's why I find this problem weird. I recall reading somewhere about this problem (because of the update to laptop-mode-tools). I can't find the post right now but I'll see if I can find it.

EDIT: Aha. Last response: https://bugs.archlinux.org/task/22909

I'm using an HP DV5-2144ca.

Last edited by SpleenThief (2011-03-02 16:46:05)

Offline

#7 2011-03-03 17:43:50

VitaminJ
Member
Registered: 2009-10-19
Posts: 26

Re: USB not working properly (ehci_hcd issue?)

In brief, I enabled USB suspend in laptop-mode-tools AND the kernel pcie_ports=compat argument and I'm still having the problem with this kernel (2.6.37-ARCH #1 SMP PREEMPT).

EDIT: delete link, I already referenced it earlier in the thread.

Last edited by VitaminJ (2011-03-03 17:44:59)

Offline

#8 2011-03-03 18:23:48

SpleenThief
Member
Registered: 2011-02-28
Posts: 16

Re: USB not working properly (ehci_hcd issue?)

Have you tried removing all but syslog-ng, dbus, and your login manager from your daemons? (prefix with an !)

Offline

#9 2011-03-03 19:22:42

VitaminJ
Member
Registered: 2009-10-19
Posts: 26

Re: USB not working properly (ehci_hcd issue?)

I just tried that with
DAEMONS=(!preload syslog-ng dbus !network !netfs !@avahi-daemon !@avahi-dnsconfd !@sshd !wicd !@cups !@alsa !@samba !@mpd !@crond !@bluetooth @acpid !@laptop-mode !@cpufreqd)

and no kworker CPU hogging! I also tested the above with and without pcie_ports=compat. No difference, I plug in the mouse, the LED comes on and udevadm shows all add and remove events, yay!

Then I enabled a few more daemons, and the one that caused kworker to go to 100% was @laptop-mode-tools.

DAEMONS=(preload syslog-ng dbus network !netfs !@avahi-daemon !@avahi-dnsconfd @sshd @wicd @cups @alsa @samba @mpd @crond @bluetooth @acpid !@laptop-mode @cpufreqd)

Offline

#10 2011-03-03 23:56:56

SpleenThief
Member
Registered: 2011-02-28
Posts: 16

Re: USB not working properly (ehci_hcd issue?)

Aha. I sent the developer an email, but I haven't gotten a response yet. I'd recommend doing so, hopefully he'll hunt down the bug. In the mean time, can you post your /etc/laptop-mode/laptop-mode.conf and /etc/laptop-mode/conf.d/usb-autosuspend.conf ?

Offline

#11 2011-03-04 00:17:15

VitaminJ
Member
Registered: 2009-10-19
Posts: 26

Re: USB not working properly (ehci_hcd issue?)

No attachments, huh?

/etc/laptop-mode/laptop-mode.conf

###############################################################################
#
# Configuration for Laptop Mode Tools
# -----------------------------------
#
# There is a "system" to the configuration setting names:
#    CONTROL_something=0/1   Determines whether Laptop Mode Tools controls 
#                            something
#    LM_something=value      Value of "something" when laptop mode is active
#    NOLM_something=value    Value of "something" when laptop mode is NOT
#                            active
#    AC_something=value      Value of "something" when the computer is running
#                            on AC power
#    BATT_something=value    Value of "something when the computer is running
#                            on battery power
#
# There can be combinations of LM_/NOLM_ and AC_/BATT_ prefixes, but the
# available prefixes are different for each setting. The available ones are 
# documented in the manual page, laptop-mode.conf(8). If there is no LM_/
# NOLM_ in a setting name, then the value is used independently of laptop
# mode state, and similarly, if there is no AC_/BATT_, then the value is used
# independently of power state.
#
# Some options only work on ACPI systems. They are marked ACPI-ONLY.
#
# Note that this configuration file is a fragment of shell script: you
# can use all the features of the shell scripting language to achieve your
# desired configuration.
#
# 
# Modules
# -------
#
# Laptop Mode Tools modules have separate configuration files, that can be
# found in /etc/laptop-mode/conf.d. Please look through these configuration
# files as well, there are many useful power saving tools in there!
#
###############################################################################


###############################################################################
# Enable/Disable laptop-mode-tools execution
# ------------------------------------------
# Set it to 0 to completely disable laptop-mode-tools from running
###############################################################################
#
ENABLE_LAPTOP_MODE_TOOLS=1


###############################################################################
# Configuration debugging
# -----------------------
###############################################################################

#
# Set this to 1 if you want to see a lot of information when you start/stop 
# laptop_mode.
#
VERBOSE_OUTPUT=0

# Set this to 1 if you want to log messages to syslog
LOG_TO_SYSLOG=1

# Run in shell debug mode
# Enable this if you would like to execute the entire laptop-mode-tools program
# in shell debug mode. Warning: This will create a lot of text output
# If you are debugging an individual module, perhaps you would want to enable
# each module specific debug mode (available in module conf files)
DEBUG=0

###############################################################################
# When to enable laptop mode
# --------------------------
#
# "Laptop mode" is the mode in which laptop mode tools makes the computer
# consume less power. This includes the kernel "laptop_mode" feature, which
# allows your hard drives to spin down, as well as various other settings which
# can be tweaked by laptop mode tools. You can enable or disable all of these
# settings using the CONTROL_... options further down in this config file.
###############################################################################


#
# Enable laptop mode when on battery power.
#
ENABLE_LAPTOP_MODE_ON_BATTERY=1


#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=1


#
# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
#
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1


#
# Enable all simple zero-configuration auto modules
# This option enables all simple modules (listed below) without requiring
# the user to enable each module individually
#
# List of modules which can be automatically enabled with this setting are:
#
# ac97-powersave
# cpufreq
# dpms-standby
# eee-superhe
# ethernet
# exec-commands
# hal-polling
# hdparm
# intel-hda-powersave
# intel-sata-powermgmt
# runtime-pm
# sched-mc-power-savings
# sched-smt-power-savings
# terminal-blanking
# usb-autosuspend
# wireless-ipw-power
# wireless-iwl-power
# wireless-power
#
# Set this to 1 to enable all simple zero-configuration auto modules listed above.
#
# NOTE: You can explicitly enable/disable any of the above modules by changing their
# values in the individual settings file
#
ENABLE_AUTO_MODULES=1



###############################################################################
# When to enable data loss sensitive features
# -------------------------------------------
#
# When data loss sensitive features are disabled, laptop mode tools acts as if
# laptop mode were disabled, for those features only.
#
# Data loss sensitive features include:
# - laptop_mode (i.e., delayed writes)
# - hard drive write cache
#
# All of the options that follow can be set to 0 in order to prevent laptop
# mode tools from using them to stop data loss sensitive features. Use this
# when you have a battery that reports the wrong information, that confuses
# laptop mode tools.
#
# Disabling data loss sensitive features is ACPI-ONLY, and it only works if
# your battery gives off frequent ACPI events to indicate a change in battery
# level.
#
# NOTE: If your battery does NOT give off battery events often enough, you can
# enable the battery-level-polling module to make this work. Look at the
# file /etc/laptop-mode/conf.d/battery-level-polling.conf for more information.
#
###############################################################################


#
# Disable all data loss sensitive features when the battery level (in % of the
# battery capacity) reaches this value.
#
MINIMUM_BATTERY_CHARGE_PERCENT=3


#
# Disable data loss sensitive features when the battery reports its state
# as "critical".
#
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1



###############################################################################
# Controlled hard drives and partitions
# -------------------------------------
#
# For spinning down your hard drives, laptop mode will remount file systems and
# adjust hard drive spindown timeouts. These parameters specify which
# devices and partitions are affected by laptop mode.
###############################################################################


#
# The drives that laptop mode controls.
# Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a
# wildcard, which will get you all your IDE and SCSI/SATA drives.
#
HD="/dev/[hs]d[abcdefgh]"


#
# The partitions (or mount points) that laptop mode controls.
# Separate the values by spaces. Use "auto" to indicate all partitions on drives
# listed in HD. You can add things to "auto", e.g. "auto /dev/hdc3". You can
# also specify mount points, e.g. "/mnt/data".
#
PARTITIONS="auto /dev/mapper/*"


#
# If this is enabled, laptop mode tools will assume that SCSI drives are
# really SATA drives that only _look_ like SCSI drives, and will use hdparm
# to control them. Set this to 0 if you have /dev/sd devices and you want
# laptop mode tools to use the "sdparm" command to control them. 
#
ASSUME_SCSI_IS_SATA=1


###############################################################################
# Hard drive behaviour settings
# -----------------------------
#
# These settings specify how laptop mode tools will adjust the various
# parameters of your hard drives and file systems.
###############################################################################


#
# Maximum time, in seconds, of work that you are prepared to lose when your
# system crashes or power runs out. This is the maximum time that Laptop Mode
# will keep unsaved data waiting in memory before spinning up your hard drive.
#
LM_BATT_MAX_LOST_WORK_SECONDS=600
LM_AC_MAX_LOST_WORK_SECONDS=360


#
# Should laptop mode tools control readahead?
#
CONTROL_READAHEAD=1


#
# Read-ahead, in kilobytes. You can spin down the disk while playing MP3/OGG
# by setting the disk readahead to a reasonable size, e.g. 3072 (3 MB).
# Effectively, the disk will read a complete MP3 at once, and will then spin 
# down while the MP3/OGG is playing. Don't set this too high, because the 
# readahead is applied to _all_ files that are read from disk.
#
LM_READAHEAD=3072
NOLM_READAHEAD=128


#
# Should laptop mode tools add the "noatime" option to the mount options when 
# laptop mode is enabled?
#
CONTROL_NOATIME=0

# Should laptop use relatime instead of noatime? The "relatime" mount option has
# more standards-compliant semantics, and allows more applications to work,
# while retaining a low level of atime updates (i.e., disk writes).
USE_RELATIME=1


#
# Should laptop mode tools control the hard drive idle timeout settings?
#
CONTROL_HD_IDLE_TIMEOUT=1


#
# Idle timeout values. (hdparm -S)
# Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 20 seconds
# for battery and for AC with laptop mode on.
#
LM_AC_HD_IDLE_TIMEOUT_SECONDS=20
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=20
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200


#
# Should laptop mode tools control the hard drive power management settings?
#
# Set to 0 to disable
CONTROL_HD_POWERMGMT="1"


#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=146
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254


#
# Should laptop mode tools control the hard drive write cache settings?
#
CONTROL_HD_WRITECACHE=1


#
# Write cache settings for HD (hdparm -W values)
#
NOLM_AC_HD_WRITECACHE=1
NOLM_BATT_HD_WRITECACHE=0
LM_HD_WRITECACHE=0




###############################################################################
# Settings you probably don't want to touch
# -----------------------------------------
#
# It is usually not necessary to change these parameters. They are included
# for completeness' sake.
###############################################################################


#
# Change mount options on partitions in PARTITIONS? You don't really want to
# disable this. If you do, then your hard drives will probably not spin down
# anymore.
#
CONTROL_MOUNT_OPTIONS=1


#
# Dirty synchronous ratio.  At this percentage of dirty pages the process
# which calls write() does its own writeback.
#
LM_DIRTY_RATIO=60
NOLM_DIRTY_RATIO=40


#
# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
# exceeded, the kernel will wake pdflush which will then reduce the amount
# of dirty memory to dirty_background_ratio.  Set this nice and low, so once
# some writeout has commenced, we do a lot of it.
#
LM_DIRTY_BACKGROUND_RATIO=1
NOLM_DIRTY_BACKGROUND_RATIO=10


#
# kernel default settings -- don't touch these unless you know what you're 
# doing.
#
DEF_UPDATE=5
DEF_XFS_AGE_BUFFER=15
DEF_XFS_SYNC_INTERVAL=30
DEF_XFS_BUFD_INTERVAL=1
DEF_MAX_AGE=30


#
# This must be adjusted manually to the value of HZ in the running kernel
# on 2.4, until the XFS people change their 2.4 external interfaces to work in
# centisecs. This can be automated, but it's a work in progress that still
# needs some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for
# external interfaces, and that is currently always set to 100. So you don't
# need to change this on 2.6.
#
XFS_HZ=100


#
# Seconds laptop mode has to to wait after the disk goes idle before doing
# a sync.
#
LM_SECONDS_BEFORE_SYNC=2

/etc/laptop-mode/conf.d/usb-autosuspend.conf

#
# Configuration file for Laptop Mode Tools module usb-autosuspend.
#
# For more information, consult the laptop-mode.conf(8) manual page.
#


###############################################################################
# USB autosuspend settings
# ------------------------
#
# If you enable this setting, laptop mode tools will automatically enable the
# USB autosuspend feature for all devices.
#
# NOTE: Some USB devices claim they support autosuspend, but implement it in a
# broken way. This can mean keyboards losing keypresses, or optical mice turning
# their LED completely off. If you have a device that misbehaves, add its USB ID
# to the blacklist below and complain to your hardware vendor.
################################################################################

# Enable debug mode for this module
# Set to 1 if you want to debug this module
DEBUG=0

# Enable USB autosuspend feature?
# Set to 0 to disable
CONTROL_USB_AUTOSUSPEND="1"

# The list of USB IDs that should not use autosuspend. Use lsusb to find out the
# IDs of your USB devices.
# Example: AUTOSUSPEND_USBID_BLACKLIST="046d:c025 0123:abcd"
AUTOSUSPEND_USBID_BLACKLIST=""

# The list of USB driver types that should not use autosuspend.  The driver
# type is given by "DRIVER=..." in a USB device's uevent file.
# Example: AUTOSUSPEND_USBID_BLACKLIST="usbhid usb-storage"
AUTOSUSPEND_USBTYPE_BLACKLIST=""

# Trigger auto-suspension of the USB deivce under conditional circumstances
BATT_SUSPEND_USB=1
LM_AC_SUSPEND_USB=1
NOLM_AC_SUSPEND_USB=0

# USB Auto-Suspend timeout in seconds
# Number of seconds after which the USB devices should suspend
AUTOSUSPEND_TIMEOUT=15

Offline

#12 2011-03-04 00:24:37

SpleenThief
Member
Registered: 2011-02-28
Posts: 16

Re: USB not working properly (ehci_hcd issue?)

Hmm. The only difference in my configuration appears to be

BATT_SUSPEND_USB=0
LM_AC_SUSPEND_USB0

Does changing these to 0 affect anything?

Offline

#13 2011-03-07 18:04:16

VitaminJ
Member
Registered: 2009-10-19
Posts: 26

Re: USB not working properly (ehci_hcd issue?)

It didn't make any difference, it was already 0 before I enabled it as per your rec. Regardless, I just had the problem appear again, with laptop-mode disabled entirely in rc.conf.

 25882 root      20   0     0    0    0 R   97  0.0   3:26.21 kworker/0:1       
 3400 root      35  15 26532  15m  840 S   10  0.4   3:25.53 preload           
 4361 root      19  -1  214m  30m  11m R   10  0.8  47:08.62 X                 
 5119 jay       20   0  526m  48m  26m S    4  1.2   0:03.12 /usr/bin/termin   
 3445 root      20   0  172m  12m 1840 S    1  0.3   1:23.53 wicd

I'm at a loss, cannot reproduce, although it may have something to do with suspending, I'm running a laptop and this happened right after wake-up and inserting a USB mouse.

Offline

#14 2011-03-15 06:51:01

Persuadatron
Member
Registered: 2011-02-23
Posts: 10

Re: USB not working properly (ehci_hcd issue?)

SpleenThief wrote:

Hmm. The only difference in my configuration appears to be

BATT_SUSPEND_USB=0
LM_AC_SUSPEND_USB0

Does changing these to 0 affect anything?

I had an issue similar to OP's, above solution solved it for me.

Thx, SpleenThief

Offline

Board footer

Powered by FluxBB