Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560364 - sys-apps/usb_modeswitch-2.2.3_p20150627: Huawei E3131s-2 needs to be plugged-in twice to provide /dev/ttyUSB*
Summary: sys-apps/usb_modeswitch-2.2.3_p20150627: Huawei E3131s-2 needs to be plugged-...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Rafael Martins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-13 18:58 UTC by Martin Mokrejš
Modified: 2016-12-31 13:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Huawei_E3131s-2 as detected during coldboot (coldboot.txt,8.75 KB, text/plain)
2015-10-23 09:05 UTC, Martin Mokrejš
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2015-09-13 18:58:16 UTC
I have a relatively new USB dongle with a 3G modem but I think I saw it happen also with my previous one, a different model (Huawei E372 which was based on qualcomm chipset).

I have vanilla kernel 4.1.6, sys-apps/usb_modeswitch-2.2.3_p20150627, sys-fs/udev-init-scripts-30, sys-fs/udev-224-r2, dev-libs/libgudev-230. sys-apps/systemd is NOT installed.

First plugin:

[  343.492391] usb 1-1.1: new high-speed USB device number 3 using xhci_hcd
[  343.597840] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=15ca
[  343.597854] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  343.597860] usb 1-1.1: Product: HUAWEI Mobile
[  343.597865] usb 1-1.1: Manufacturer: HUAWEI
[  343.597877] usb 1-1.1: SerialNumber: FFFFFFFFFFFFFFFF
[  343.644256] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[  343.644839] scsi host9: usb-storage 1-1.1:1.0
[  344.658750] scsi 9:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  344.661640] sr 9:0:0:0: [sr1] scsi-1 drive
[  344.662219] sr 9:0:0:0: Attached scsi CD-ROM sr1
[  344.662530] sr 9:0:0:0: Attached scsi generic sg5 type 5
[  344.665413] scsi 9:0:0:1: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  344.666050] sd 9:0:0:1: Attached scsi generic sg6 type 0
[  344.671003] sd 9:0:0:1: [sde] Attached SCSI removable disk
[  365.045276] systemd-udevd[3729]: inotify_add_watch(9, /dev/sde, 10) failed: No such file or directory
[  365.055958] systemd-udevd[3628]: inotify_add_watch(9, /dev/sde, 10) failed: No such file or directory


# ls -latr /dev/sde*
ls: cannot access /dev/sde*: No such file or directory
# ls -latr /dev/ttyUSB*
ls: cannot access /dev/ttyUSB*: No such file or directory
#


After unplugging and re-inserting:

Sep 13 20:32:46 vostro kernel: usb 1-1.1: USB disconnect, device number 3
Sep 13 20:32:54 vostro kernel: usb 1-1.1: new high-speed USB device number 4 using xhci_hcd
Sep 13 20:32:54 vostro kernel: usb 1-1.1: New USB device found, idVendor=12d1, idProduct=15ca
Sep 13 20:32:54 vostro kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 13 20:32:54 vostro kernel: usb 1-1.1: Product: HUAWEI Mobile
Sep 13 20:32:54 vostro kernel: usb 1-1.1: Manufacturer: HUAWEI
Sep 13 20:32:54 vostro kernel: usb 1-1.1: SerialNumber: FFFFFFFFFFFFFFFF
Sep 13 20:32:54 vostro kernel: usb-storage 1-1.1:1.0: USB Mass Storage device detected
Sep 13 20:32:54 vostro kernel: scsi host10: usb-storage 1-1.1:1.0
Sep 13 20:32:54 vostro usb_modeswitch[4261]: switch device 12d1:15ca on 001/004
Sep 13 20:32:55 vostro kernel: usb 1-1.1: USB disconnect, device number 4
Sep 13 20:32:56 vostro kernel: usb 1-1.1: new high-speed USB device number 5 using xhci_hcd
Sep 13 20:32:56 vostro kernel: usb 1-1.1: New USB device found, idVendor=12d1, idProduct=1506
Sep 13 20:32:56 vostro kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 13 20:32:56 vostro kernel: usb 1-1.1: Product: HUAWEI Mobile
Sep 13 20:32:56 vostro kernel: usb 1-1.1: Manufacturer: HUAWEI
Sep 13 20:32:56 vostro kernel: huawei_cdc_ncm 1-1.1:1.1: MAC-Address: 82:a9:4a:09:84:2e
Sep 13 20:32:56 vostro kernel: huawei_cdc_ncm 1-1.1:1.1: cdc-wdm0: USB WDM device
Sep 13 20:32:56 vostro kernel: huawei_cdc_ncm 1-1.1:1.1 wwan0: register 'huawei_cdc_ncm' at usb-0000:0b:00.0-1.1, Huawei CDC NCM device, 82:a9:4a:09:84:2e
Sep 13 20:32:56 vostro kernel: usb-storage 1-1.1:1.4: USB Mass Storage device detected
Sep 13 20:32:56 vostro kernel: scsi host11: usb-storage 1-1.1:1.4
Sep 13 20:32:56 vostro kernel: usb-storage 1-1.1:1.5: USB Mass Storage device detected
Sep 13 20:32:56 vostro kernel: scsi host12: usb-storage 1-1.1:1.5
Sep 13 20:32:56 vostro root[4297]: usb_modeswitch: switched to 12d1:1506 on 001/005
Sep 13 20:32:57 vostro kernel: scsi 12:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
Sep 13 20:32:57 vostro kernel: scsi 11:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
Sep 13 20:32:57 vostro kernel: sd 12:0:0:0: Attached scsi generic sg5 type 0
Sep 13 20:32:57 vostro kernel: sr 11:0:0:0: [sr1] scsi-1 drive
Sep 13 20:32:57 vostro kernel: sr 11:0:0:0: Attached scsi CD-ROM sr1
Sep 13 20:32:57 vostro kernel: sd 12:0:0:0: [sde] Attached SCSI removable disk
Sep 13 20:32:57 vostro kernel: sr 11:0:0:0: Attached scsi generic sg6 type 5
Sep 13 20:32:58 vostro kernel: huawei_cdc_ncm 1-1.1:1.1 wwp11s0u1u1i1: renamed from wwan0
Sep 13 20:32:59 vostro kernel: systemd-udevd[4345]: Process 'net.sh wwan0 start' failed with exit code 1.
Sep 13 20:32:59 vostro kernel: usbcore: registered new interface driver option
Sep 13 20:32:59 vostro kernel: usbserial: USB Serial support registered for GSM modem (1-port)
Sep 13 20:32:59 vostro kernel: option 1-1.1:1.0: GSM modem (1-port) converter detected
Sep 13 20:32:59 vostro kernel: usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
Sep 13 20:32:59 vostro kernel: option 1-1.1:1.2: GSM modem (1-port) converter detected
Sep 13 20:32:59 vostro kernel: usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
Sep 13 20:32:59 vostro kernel: option 1-1.1:1.3: GSM modem (1-port) converter detected
Sep 13 20:32:59 vostro kernel: usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Sense Key : Medium Error [current] 
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Add. Sense: Unrecovered read error
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fe 00 00 02 00
Sep 13 20:32:59 vostro kernel: blk_update_request: critical medium error, dev sr1, sector 262136
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Sense Key : Medium Error [current] 
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Add. Sense: Unrecovered read error
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fe 00 00 02 00
Sep 13 20:32:59 vostro kernel: blk_update_request: critical medium error, dev sr1, sector 262136
Sep 13 20:32:59 vostro kernel: Buffer I/O error on dev sr1, logical block 32767, async page read
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Sense Key : Medium Error [current] 
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Add. Sense: Unrecovered read error
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fc 00 00 02 00
Sep 13 20:32:59 vostro kernel: blk_update_request: critical medium error, dev sr1, sector 262128
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Sense Key : Medium Error [current] 
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] Add. Sense: Unrecovered read error
Sep 13 20:32:59 vostro kernel: sr 11:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fc 00 00 02 00
Sep 13 20:32:59 vostro kernel: blk_update_request: critical medium error, dev sr1, sector 262128
Sep 13 20:32:59 vostro kernel: Buffer I/O error on dev sr1, logical block 32766, async page read


Now it works.

# lsmod
Module                  Size  Used by
ppp_deflate             3918  0 
bsd_comp                5297  0 
ppp_async               8045  1 
ppp_generic            30220  7 bsd_comp,ppp_async,ppp_deflate
slhc                    5971  1 ppp_generic
option                 37796  1 
usb_wwan                8415  1 option
fuse                   83492  2 
ums_realtek             7889  0 
uvcvideo               75320  0 
uas                    14354  0 
iwldvm                132267  0 
videobuf2_vmalloc       5113  1 uvcvideo
usb_storage            57311  3 uas,ums_realtek
videobuf2_memops        2442  1 videobuf2_vmalloc
videobuf2_core         42119  1 uvcvideo
x86_pkg_temp_thermal     6567  0 
intel_powerclamp        9191  0 
kvm_intel             145373  0 
kvm                   485484  1 kvm_intel
iwlwifi               104881  1 iwldvm
#

# emerge --info
Portage 2.2.18 (python 2.7.9-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.21-r1, 4.1.6-default-pciehp x86_64)
=================================================================
System uname: Linux-4.1.6-default-pciehp-x86_64-Intel-R-_Core-TM-_i7-2640M_CPU_@_2.80GHz-with-gentoo-2.2
KiB Mem:    16361120 total,  14202856 free
KiB Swap:   16776188 total,  16776188 free
Timestamp of repository gentoo: Fri, 11 Sep 2015 17:30:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.2.5-r6::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.2.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.3.6-r1::gentoo, 4.4.7::gentoo, 4.6.4::gentoo, 4.7.4::gentoo, 4.8.4::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

science
    location: /home/mmokrejs/proj/sci
    masters: gentoo
    priority: 0

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 1

layman
    location: /var/lib/layman
    masters: gentoo
    priority: 2

haskell
    location: /var/lib/layman/haskell
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 skype-eula Nero-EULA-US AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -maes -mpclmul -mpopcnt -mavx -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.2/conf /var/bind /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -maes -mpclmul -mpopcnt -mavx -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X acpi alsa amd64 amr apache apache2 apulse avx berkdb bindist bluetooth boost bzip2 cairo cgi cli coin consolekit cracklib crypt cryptlib cups cxx dbus device-mapper dhcp directfb dri drm dvd emboss encode fax fbcon ffmpeg flac fontconfig fortran gbm gd gdbm geoip gimp gles2 glpk gnutls gpm gtk hal hpijs hwdb iconv id3tag imaging innodb java jce jpeg jpg keymap ladspa lapack laptop lcms libnotify lm_sensors mad matroska mmx mmxext modules mpi mpich2 multilib mysql ncurses nfs nls nptl nptlonly nscd nsplugin ntfsprogs ocr ogg opengl openmp pam parport pcre pdf perl php png policykit polkit ppds pppd python qt3support readline rendering resolvconf scanner seccomp server session slideshow sndfile sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 suexec svg syslog tcl tcpd threads tiff tk truetype udev unicode usb v4l v4l2 vim-syntax vnc wavpack wifi x11 xcb xml xorg xrandr xv xvid xvmc zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="alias authz_host auth_basic auth_digest cgi cgid deflate dir env filter include info mem_cache mime mime_magic negotiation remoteip setenvif status userdir vhost_alias rewrite usertrack cache file_cache disk_cache charset_lite log_config log_forensic" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US en_GB cs cz" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="vesa vmware fbdev intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Gilbert gentoo-dev 2015-09-14 00:07:44 UTC
Seems like more of a hardware/kernel problem than a udev problem. Updating summary.
Comment 2 Alex Xu (Hello71) 2015-09-21 15:18:11 UTC
some devices present USB "mass storage" so windows users can install drivers.

if anything this is a kernel "bug". what sources are you using?
Comment 3 Martin Mokrejš 2015-09-26 21:46:33 UTC
(In reply to Alex Xu (Hello71) from comment #2)
> some devices present USB "mass storage" so windows users can install drivers.

I showed usb_modeswitch kicks in on the second plugin at least. My former USB dongle workes fine. I believe this is more udev or usb_modeswitch issue.

> 
> if anything this is a kernel "bug". what sources are you using?

I wrote above: vanilla kernel 4.1.6
Comment 4 Pacho Ramos gentoo-dev 2015-10-03 11:13:05 UTC
Can you try with 2.2.5 version?
Comment 5 Martin Mokrejš 2015-10-22 19:56:17 UTC
(In reply to Pacho Ramos from comment #4)
> Can you try with 2.2.5 version?

Sorry, no change.


[   41.144723] usb 1-1.1: new high-speed USB device number 4 using xhci_hcd
[   41.250324] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=15ca
[   41.250337] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   41.250343] usb 1-1.1: Product: HUAWEI Mobile
[   41.250349] usb 1-1.1: Manufacturer: HUAWEI
[   41.250354] usb 1-1.1: SerialNumber: FFFFFFFFFFFFFFFF
[   41.296774] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[   41.297187] scsi host7: usb-storage 1-1.1:1.0
[   42.310844] scsi 7:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[   42.313676] sr 7:0:0:0: [sr1] scsi-1 drive
[   42.314354] sr 7:0:0:0: Attached scsi CD-ROM sr1
[   42.314608] sr 7:0:0:0: Attached scsi generic sg3 type 5
[   42.317279] scsi 7:0:0:1: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[   42.317896] sd 7:0:0:1: Attached scsi generic sg4 type 0
[   42.322195] sd 7:0:0:1: [sdc] Attached SCSI removable disk
[   63.061668] systemd-udevd[3843]: inotify_add_watch(9, /dev/sdc, 10) failed: No such file or directory
[   63.065476] systemd-udevd[3837]: inotify_add_watch(9, /dev/sdc, 10) failed: No such file or directory

[USB DONGLE UNPLUG]

[  118.314414] usb 1-1.1: USB disconnect, device number 4



[USB DONGLE PLUG-IN]

[  128.032461] usb 1-1.1: new high-speed USB device number 5 using xhci_hcd
[  128.137799] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=15ca
[  128.137813] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  128.137819] usb 1-1.1: Product: HUAWEI Mobile
[  128.137825] usb 1-1.1: Manufacturer: HUAWEI
[  128.137830] usb 1-1.1: SerialNumber: FFFFFFFFFFFFFFFF
[  128.183970] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[  128.184145] scsi host8: usb-storage 1-1.1:1.0
[  128.823685] usb 1-1.1: USB disconnect, device number 5
[  129.824712] usb 1-1.1: new high-speed USB device number 6 using xhci_hcd
[  129.929938] usb 1-1.1: New USB device found, idVendor=12d1, idProduct=1506
[  129.929951] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  129.929957] usb 1-1.1: Product: HUAWEI Mobile
[  129.929962] usb 1-1.1: Manufacturer: HUAWEI
[  130.339062] huawei_cdc_ncm 1-1.1:1.1: MAC-Address: 82:a9:4a:09:84:2e
[  130.361976] huawei_cdc_ncm 1-1.1:1.1: cdc-wdm0: USB WDM device
[  130.362830] huawei_cdc_ncm 1-1.1:1.1 wwan0: register 'huawei_cdc_ncm' at usb-0000:0b:00.0-1.1, Huawei CDC NCM device, 82:a9:4a:09:84:2e
[  130.364203] usb-storage 1-1.1:1.4: USB Mass Storage device detected
[  130.364440] scsi host9: usb-storage 1-1.1:1.4
[  130.364982] usb-storage 1-1.1:1.5: USB Mass Storage device detected
[  130.365652] scsi host10: usb-storage 1-1.1:1.5
[  131.372386] scsi 10:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  131.373073] scsi 9:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  131.373469] sd 10:0:0:0: Attached scsi generic sg3 type 0
[  131.375269] sr 9:0:0:0: [sr1] scsi-1 drive
[  131.376059] sr 9:0:0:0: Attached scsi CD-ROM sr1
[  131.376374] sr 9:0:0:0: Attached scsi generic sg4 type 5
[  131.377048] sd 10:0:0:0: [sdc] Attached SCSI removable disk
[  132.531748] huawei_cdc_ncm 1-1.1:1.1 wwp11s0u1u1i1: renamed from wwan0
[  132.563563] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  132.563567] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] 
[  132.563569] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error
[  132.563572] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fe 00 00 02 00
[  132.563587] blk_update_request: critical medium error, dev sr1, sector 262136
[  132.570418] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  132.570421] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] 
[  132.570423] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error
[  132.570425] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fe 00 00 02 00
[  132.570426] blk_update_request: critical medium error, dev sr1, sector 262136
[  132.570445] Buffer I/O error on dev sr1, logical block 32767, async page read
[  132.582415] systemd-udevd[4094]: Process 'net.sh wwan0 start' failed with exit code 1.
[  132.605627] usbcore: registered new interface driver option
[  132.606035] usbserial: USB Serial support registered for GSM modem (1-port)
[  132.606155] option 1-1.1:1.0: GSM modem (1-port) converter detected
[  132.606852] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
[  132.606983] option 1-1.1:1.2: GSM modem (1-port) converter detected
[  132.607272] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
[  132.607312] option 1-1.1:1.3: GSM modem (1-port) converter detected
[  132.607580] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
[  132.622464] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  132.622470] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] 
[  132.622472] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error
[  132.622474] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fc 00 00 02 00
[  132.622477] blk_update_request: critical medium error, dev sr1, sector 262128
[  132.631228] sr 9:0:0:0: [sr1] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  132.631232] sr 9:0:0:0: [sr1] Sense Key : Medium Error [current] 
[  132.631234] sr 9:0:0:0: [sr1] Add. Sense: Unrecovered read error
[  132.631237] sr 9:0:0:0: [sr1] CDB: Read(10) 28 00 00 00 ff fc 00 00 02 00
[  132.631240] blk_update_request: critical medium error, dev sr1, sector 262128
[  132.631242] Buffer I/O error on dev sr1, logical block 32766, async page read

# /etc/init.d/net.ppp0 start
 * Bringing up interface ppp0 
 *   Starting pppd in ppp0 ...                                          [ ok ]
 *   Backgrounding ...
#
Comment 6 Martin Mokrejš 2015-10-23 09:05:54 UTC
Created attachment 415234 [details]
Huawei_E3131s-2 as detected during coldboot

If I have the Huawei E3131s-2 USB dongle plugged into my laptop and startup linux-4.1.6 I can immediately start pppd because /dev/ttyUSB0 already exists.
Comment 7 Martin Mokrejš 2015-10-27 22:26:37 UTC
I did a few more updates (mostly unrelated apps) but from inspecting emerge.log I bet one of these did help:

sys-apps/dbus-1.8.16 -> sys-apps/dbus-1.8.20
sys-fs/udev-224-r2 -> sys-fs/udev-225
sys-apps/openrc-0.17 -> sys-apps/openrc-0.18.3
Comment 8 Martin Mokrejš 2015-12-01 21:22:25 UTC
(In reply to Martin Mokrejš from comment #7)
> I did a few more updates (mostly unrelated apps) but from inspecting
> emerge.log I bet one of these did help:

No, it happens still. I have now 4.3.0 kernel and these:

[ebuild   R    ] net-dialup/ppp-2.4.7-r2:0/2.4.7::gentoo  USE="dhcp gtk ipv6 pam -activefilter -atm -eap-tls -libressl -radius" 0 KiB
[ebuild   R    ] dev-libs/libgudev-230::gentoo  USE="-debug -introspection -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ] sys-apps/dbus-1.8.20::gentoo  USE="X -debug -doc (-selinux) -static-libs -systemd {-test}" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild     U  ] sys-fs/udev-228::gentoo [225::gentoo] USE="kmod static-libs -acl (-selinux)" ABI_X86="32 (64) (-x32)" 3940 KiB
[ebuild   R    ] sys-fs/udev-init-scripts-30::gentoo  0 KiB
[ebuild   R    ] sys-apps/usb_modeswitch-2.2.6::gentoo  USE="-jimtcl" 0 KiB
Comment 9 Martin Mokrejš 2016-12-23 19:38:16 UTC
Let close this bug. Although it still happens it is probably a firmware issue of the dongle. When it is "not detected" I just execute

# usb_modeswitch -J -v 0x12d1 -p 0x15ca
Look for default devices ...
   product ID matched
 Found devices in default mode (1)
Access device 005 on bus 002
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI Mobile
  Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Using standard Huawei switching message
Looking for active driver ...
 No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 1 (CSW) ...
 Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!

#

I after about 1 second I can do '/etc/init.d/net.ppp0 start' which uses the /dev/ttyUSB0 interface. Although usb_modeswitch should have been run automatically (and I think it does somehwere) maybe for some crappy devices it needs to be eventually re-executed. Probably some wrapper script could check better whether usb_modeswitch actually did any change and if not, call usb_modeswitch again after say 1-2 seconds.
Comment 10 Martin Mokrejš 2016-12-23 19:41:34 UTC
For completeness, currently I have:

[ebuild   R    ] sys-apps/usb_modeswitch-2.4.0::gentoo  USE="-jimtcl" 0 KiB
Comment 11 Pacho Ramos gentoo-dev 2016-12-31 13:22:06 UTC
thanks for feedback