You are not logged in.

#1 2019-05-15 19:30:44

gyps
Member
Registered: 2019-05-15
Posts: 4

MicroSD Mount Problems

I have a microSD that I keep my music library on, and whenever I play music on it from MPD it works for a few minutes before freezing and automatically unmounting. It's a 64gb exfat microSDXC and I'm running Arch on a Surface Book. Strangely I don't run into this issue when using software other than MPD (I used rsync to transfer my mp3 files onto the card without any issues, and mpv doesn't seem to trip it up) but I asked about this on the MPD forum already and was told that it's probably a system problem. The card is mounted with fstab right now but it seems to have the same issue regardless of how I mount it, so I'm assuming it's some sort of driver/hardware issue. Here's some info:

journalctl -a

May 15 12:21:39 turf kernel: usb 2-1.3: Disable of device-initiated U1 failed.
May 15 12:21:40 turf kernel: usb 2-1.3: Failed to set U2 timeout to 0x0,error code -71
May 15 12:21:40 turf kernel: usb 2-1.3: Set SEL for device-initiated U1 failed.
May 15 12:21:40 turf kernel: usb 2-1.3: Set SEL for device-initiated U2 failed.
May 15 12:21:40 turf kernel: usb 2-1.3: usb_reset_and_verify_device Failed to disable LPM
May 15 12:21:40 turf kernel: sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
May 15 12:21:40 turf kernel: sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 03 a6 ad 00 00 04 00 00
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61254912 flags 80700
May 15 12:21:40 turf kernel: sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
May 15 12:21:40 turf kernel: sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 03 a6 af 00 00 02 00 00
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61255424 flags 80000
May 15 12:21:40 turf kernel: sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
May 15 12:21:40 turf kernel: sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 03 a6 ad 00 00 00 08 00
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61254912 flags 0
May 15 12:21:40 turf kernel: usb 2-1.3: USB disconnect, device number 3
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61254912 flags 0
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61262016 flags 80700
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61262016 flags 0
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61281456 flags 80700
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61281456 flags 0
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61281456 flags 0
May 15 12:21:40 turf kernel: print_req_error: I/O error, dev sda, sector 61262016 flags 0
May 15 12:21:40 turf systemd[1]: Stopped target Local File Systems.
May 15 12:21:40 turf systemd[1]: Unmounting /mnt/music...
May 15 12:21:40 turf systemd[473]: mnt-music.mount: Succeeded.
May 15 12:21:40 turf systemd[1]: mnt-music.mount: Succeeded.
May 15 12:21:40 turf systemd[1]: Unmounted /mnt/music.
May 15 12:21:40 turf kernel: usb 2-1.3: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
May 15 12:21:40 turf kernel: usb 2-1.3: New USB device found, idVendor=045e, idProduct=090c, bcdDevice=29.10
May 15 12:21:40 turf kernel: usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 15 12:21:40 turf kernel: usb 2-1.3: Product: SD Card
May 15 12:21:40 turf kernel: usb 2-1.3: Manufacturer: Microsoft
May 15 12:21:40 turf kernel: usb 2-1.3: SerialNumber: 201408282030
May 15 12:21:40 turf kernel: usb-storage 2-1.3:1.0: USB Mass Storage device detected
May 15 12:21:40 turf kernel: scsi host0: usb-storage 2-1.3:1.0
May 15 12:21:41 turf kernel: scsi 0:0:0:0: Direct-Access     Generic- SD Card          1.00 PQ: 0 ANSI: 6
May 15 12:21:42 turf kernel: sd 0:0:0:0: [sda] 125091840 512-byte logical blocks: (64.0 GB/59.6 GiB)
May 15 12:21:42 turf kernel: sd 0:0:0:0: [sda] Write Protect is off
May 15 12:21:42 turf kernel: sd 0:0:0:0: [sda] Mode Sense: 2f 00 00 00
May 15 12:21:42 turf kernel: sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
May 15 12:21:42 turf kernel:  sda: sda1
May 15 12:21:42 turf kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk

fstab

UUID=5708-2B1C					/mnt/music		vfat		auto,rw,async,user	0 0

lspci

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
00:05.0 Multimedia controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit (rev 01)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:14.3 Multimedia controller: Intel Corporation Device 9d32 (rev 01)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)
00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:16.4 Communication controller: Intel Corporation Device 9d3e (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1d.3 PCI bridge: Intel Corporation Device 9d1b (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 (rev 01)
03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88W8897 [AVASTAR] 802.11ac Wireless

lsusb

Bus 002 Device 007: ID 045e:090c Microsoft Corp. SD Card
Bus 002 Device 002: ID 045e:090b Microsoft Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 1286:204c Marvell Semiconductor, Inc. 
Bus 001 Device 004: ID 045e:07cd Microsoft Corp. Surface Keyboard
Bus 001 Device 007: ID 1235:8202 Focusrite-Novation 
Bus 001 Device 006: ID 2516:0057 Cooler Master Co., Ltd. 
Bus 001 Device 005: ID 1038:1724 SteelSeries ApS 
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 045e:091a Microsoft Corp. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsusb -t

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 5000M
        |__ Port 3: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 2: Dev 5, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 2: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 2: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 3: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 3: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 3: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 4: Dev 7, If 0, Class=Audio, Driver=snd-usb-audio, 480M
            |__ Port 4: Dev 7, If 1, Class=Audio, Driver=snd-usb-audio, 480M
            |__ Port 4: Dev 7, If 2, Class=Audio, Driver=snd-usb-audio, 480M
            |__ Port 4: Dev 7, If 3, Class=Vendor Specific Class, Driver=, 480M
        |__ Port 4: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 8, If 0, Class=Wireless, Driver=btusb, 480M
    |__ Port 6: Dev 8, If 1, Class=Wireless, Driver=btusb, 480M

Hopefully I provided the right information, let me know if I posted in the wrong subforum or something -- I'm pretty new to Arch and this is my first post on the forum. Thanks in advance

Offline

#2 2019-05-15 20:54:10

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: MicroSD Mount Problems

Any chance mpd also tries to write to the card?
Did you try to mount it ro?
Is it vfat or exfat? Why don't you use  https://www.archlinux.org/packages/comm … fat-utils/ in the latter case?

Offline

#3 2019-05-15 22:04:35

gyps
Member
Registered: 2019-05-15
Posts: 4

Re: MicroSD Mount Problems

seth wrote:

Any chance mpd also tries to write to the card?
Did you try to mount it ro?
Is it vfat or exfat? Why don't you use  https://www.archlinux.org/packages/comm … fat-utils/ in the latter case?

The card is vfat, not exfat, my bad. I've tried a couple formats though and it seems to make no difference. Just mounted my card in ro and the only discernible difference is that journalctl now outputs this in addition to the previous errors:

May 15 15:55:49 turf kernel: FAT-fs (sda1): Directory bread(block 43163849) failed

I've also tried running mpd as sudo, which makes no difference, so I don't think it's a permissions issue but I might be missing something

Offline

#4 2019-05-15 22:39:35

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: MicroSD Mount Problems

What bothers me is that your SD Card and your Focusrite-Novation, which I assume is your sound interface, is sharing the same Device ID. I'm not sure if this should be the case but I would try another port where they won't be sharing the same ID. It just seems your SD card is sending the streams back to itself. This is just all a hunch however.

Offline

#5 2019-05-15 23:12:30

gyps
Member
Registered: 2019-05-15
Posts: 4

Re: MicroSD Mount Problems

d_fajardo wrote:

What bothers me is that your SD Card and your Focusrite-Novation, which I assume is your sound interface, is sharing the same Device ID. I'm not sure if this should be the case but I would try another port where they won't be sharing the same ID. It just seems your SD card is sending the streams back to itself. This is just all a hunch however.

Unplugging my audio interface and plugging it back in switched the device number around, now the SD is bus 2 device 13 and the Focusrite is bus 1 device 10. Unfortunately it didn't fix the problem, so I don't think that's it.

Offline

#6 2019-05-16 07:42:44

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: MicroSD Mount Problems

That't not a thing anyway - they take the same enumeration slot, but on different būs.

This will relate to specific read characteristics of mpd (but I've no idea how, why or which)
Try mounting it "sync,relatime,lazytime" instead of "async"

Because of "works for a few minutes" it could also be some power saving feature (esp. if it absolutely doesn't matter what you play, big or small files across the card)

Offline

#7 2019-05-16 23:35:35

gyps
Member
Registered: 2019-05-15
Posts: 4

Re: MicroSD Mount Problems

seth wrote:

That't not a thing anyway - they take the same enumeration slot, but on different būs.

This will relate to specific read characteristics of mpd (but I've no idea how, why or which)
Try mounting it "sync,relatime,lazytime" instead of "async"

Because of "works for a few minutes" it could also be some power saving feature (esp. if it absolutely doesn't matter what you play, big or small files across the card)

Nothing changes when I mount it with those options, unfortunately. Also I had the same hunch about it being USB autosuspend but I tried disabling that with TLP and it doesn't seem to have helped. Will try playing a bunch of short audio files.

Offline

#8 2019-05-17 05:53:42

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: MicroSD Mount Problems

I would also suggest to disable TLP and every other userspace PM tool to rule out interference from there.
You can disable autosuspension w/ "usbcore.autosuspend=-1" as kernel parameter.

cat /sys/module/usbcore/parameters/autosuspend
echo "-1" | sudo tee /sys/module/usbcore/parameters/autosuspend

Offline

Board footer

Powered by FluxBB