Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-24-2021, 09:51 AM
|
#1
|
LQ Newbie
Registered: Aug 2021
Distribution: Arch Linux
Posts: 6
Rep: 
|
Akaso V50X - Mass storage doesn't work
I recently got an Akaso V50X action cam, reading the micro sd card with a card reader works fine, however when trying to access it via usb mass storage it doesn't work, it works fine in Windows.
lsusb shows the mass storage as: 0525:a4a5 Netchip Technology, Inc. Linux-USB File-backed Storage Gadget
Here is the output of dmesg: https://paste.debian.net/hidden/2036778d/
It appears to detect that there is an sd card there but is unable to read it at all.
|
|
|
08-26-2021, 08:51 PM
|
#2
|
Member
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141
Rep:
|
i don't have this device but i did some research and it looks like the driver you need might be under the kernel option CONFIG_USB_NET2280. in menuconfig you can turn that on by following this:
Code:
Device Drivers --->
[*] USB Support --->
[*/M] USB Gadget Support --->
USB Peripheral Controller --->
[*/M] NetChip NET228x / PLX USB3x8x
then rebuild, of course, and modprobe net2280 if it doesn't automatically detect it on startup.
can you try that and see if it fixes it?
|
|
|
08-27-2021, 11:21 AM
|
#3
|
LQ Newbie
Registered: Aug 2021
Distribution: Arch Linux
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by andigena
i don't have this device but i did some research and it looks like the driver you need might be under the kernel option CONFIG_USB_NET2280. in menuconfig you can turn that on by following this:
Code:
Device Drivers --->
[*] USB Support --->
[*/M] USB Gadget Support --->
USB Peripheral Controller --->
[*/M] NetChip NET228x / PLX USB3x8x
then rebuild, of course, and modprobe net2280 if it doesn't automatically detect it on startup.
can you try that and see if it fixes it?
|
It seems net2280 is already present in the arch linux kernel however it was not loading, I manually loaded it but it doesn't appear to have made any changes.
https://paste.debian.net/hidden/1dd3ff34/
|
|
|
08-27-2021, 03:15 PM
|
#4
|
Member
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141
Rep:
|
1. do you have standard non-free firmware installed? if not, install it. i'm not sure what the package name for that is on arch, but it's firmware-linux-nonfree on debian/ubuntu and sys-kernel/linux-firmware on gentoo, so look for something to that effect. if that doesn't work:
2. also try enabling CONFIG_USB_UAS and make sure basic SCSI disk support is enabled (CONFIG_SCSI and CONFIG_BLK_DEV_SD). if that doesn't work:
3. this could be a disk problem that windows is dumb enough to ignore, or which is non-fatal but treated as such by the linux driver. faulty sd cards are super common and can even end up in manufacturer supply chains sometimes. if you try a different sd card in the same device, does the same issue occur?
|
|
|
08-27-2021, 04:06 PM
|
#5
|
LQ Newbie
Registered: Aug 2021
Distribution: Arch Linux
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by andigena
1. do you have standard non-free firmware installed? if not, install it. i'm not sure what the package name for that is on arch, but it's firmware-linux-nonfree on debian/ubuntu and sys-kernel/linux-firmware on gentoo, so look for something to that effect. if that doesn't work:
2. also try enabling CONFIG_USB_UAS and make sure basic SCSI disk support is enabled (CONFIG_SCSI and CONFIG_BLK_DEV_SD). if that doesn't work:
3. this could be a disk problem that windows is dumb enough to ignore, or which is non-fatal but treated as such by the linux driver. faulty sd cards are super common and can even end up in manufacturer supply chains sometimes. if you try a different sd card in the same device, does the same issue occur?
|
I don't believe arch splits out non-free firmware, it's just a single package https://archlinux.org/packages/core/any/linux-firmware/
CONFIG_USB_UAS is set to module and is loaded.
CONFIG_SCSI and CONFIG_BLK_DEV_SD are enabled.
I did consider it being a card problem however I don't think this is the case, it's a brand new SanDisk ultra 64GB, it reads fine with a usb card reader and there is nothing unusual in dmesg, fdisk -l gives:
Code:
Disk /dev/sdg: 59.48 GiB, 63864569856 bytes, 124735488 sectors
Disk model: STORAGE DEVICE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdg1 32768 124735487 124702720 59.5G b W95 FAT32
I'll try dig up another one anyway and give that a go, it is formatted by the device.
|
|
|
08-27-2021, 06:02 PM
|
#6
|
Member
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141
Rep:
|
Quote:
Originally Posted by Chryseus
I don't believe arch splits out non-free firmware, it's just a single package https://archlinux.org/packages/core/any/linux-firmware/
CONFIG_USB_UAS is set to module and is loaded.
CONFIG_SCSI and CONFIG_BLK_DEV_SD are enabled.
I did consider it being a card problem however I don't think this is the case, it's a brand new SanDisk ultra 64GB, it reads fine with a usb card reader and there is nothing unusual in dmesg, fdisk -l gives:
Code:
Disk /dev/sdg: 59.48 GiB, 63864569856 bytes, 124735488 sectors
Disk model: STORAGE DEVICE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdg1 32768 124735487 124702720 59.5G b W95 FAT32
I'll try dig up another one anyway and give that a go, it is formatted by the device.
|
the fact that it's capable of reading basic data about the drive and the partitions on it indicates to me that the driver probably functions to some extent. the fact that fdisk is saying the disk identifier is 0x00000000 is a dead giveaway to me that there is a severe controller issue in the SD card or maybe the SD to USB interface. i also noticed that in your dmesg log it thinks that the device is 2 TB when it looks like it's actually 64 GB, another thing suggesting one of those problems. compare my results from a regular 32 GB flash drive formatted in the same manner:
Code:
Disk /dev/sdb: 28.9 GiB, 31029460992 bytes, 60604416 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2c3babd2 <---- unique 32-bit integer, not 0
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 60604415 60602368 28.9G 83 Linux
[48061.314726] usb 2-1.2: new high-speed USB device number 5 using ehci-pci
[48061.430171] usb 2-1.2: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
[48061.430189] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[48061.430196] usb 2-1.2: Product: DataTraveler 3.0
[48061.430200] usb 2-1.2: Manufacturer: Kingston
[48061.430204] usb 2-1.2: SerialNumber: D067E5162216E3611605743C
[48061.430542] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[48061.430666] scsi host6: usb-storage 2-1.2:1.0
[48062.451148] scsi 6:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
[48062.451317] sd 6:0:0:0: Attached scsi generic sg2 type 0
[48062.451844] sd 6:0:0:0: [sdb] 60604416 512-byte logical blocks: (31.0 GB/28.9 GiB) <--- correct size
[48062.453094] sd 6:0:0:0: [sdb] Write Protect is off
[48062.453099] sd 6:0:0:0: [sdb] Mode Sense: 45 00 00 00
[48062.453762] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[48062.658977] sdb: sdb1
[48062.677748] sd 6:0:0:0: [sdb] Attached SCSI removable disk
so i think it's fairly likely this is the result of a hardware issue in some capacity (or a catastrophic driver/firmware failure, i suppose), though it's unclear exactly why windows is still seeming to work with it. definitely try a new SD card. you could also try manually reformatting the SD card, in case the camera is generating bad partition tables. and if nothing works and your camera is under warranty, you might want to simply exchange the entire camera.
|
|
|
08-27-2021, 08:00 PM
|
#7
|
LQ Newbie
Registered: Aug 2021
Distribution: Arch Linux
Posts: 6
Original Poster
Rep: 
|
Quote:
Originally Posted by andigena
the fact that it's capable of reading basic data about the drive and the partitions on it indicates to me that the driver probably functions to some extent. the fact that fdisk is saying the disk identifier is 0x00000000 is a dead giveaway to me that there is a severe controller issue in the SD card or maybe the SD to USB interface. i also noticed that in your dmesg log it thinks that the device is 2 TB when it looks like it's actually 64 GB, another thing suggesting one of those problems. compare my results from a regular 32 GB flash drive formatted in the same manner:
Code:
Disk /dev/sdb: 28.9 GiB, 31029460992 bytes, 60604416 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2c3babd2 <---- unique 32-bit integer, not 0
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 60604415 60602368 28.9G 83 Linux
[48061.314726] usb 2-1.2: new high-speed USB device number 5 using ehci-pci
[48061.430171] usb 2-1.2: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
[48061.430189] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[48061.430196] usb 2-1.2: Product: DataTraveler 3.0
[48061.430200] usb 2-1.2: Manufacturer: Kingston
[48061.430204] usb 2-1.2: SerialNumber: D067E5162216E3611605743C
[48061.430542] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[48061.430666] scsi host6: usb-storage 2-1.2:1.0
[48062.451148] scsi 6:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
[48062.451317] sd 6:0:0:0: Attached scsi generic sg2 type 0
[48062.451844] sd 6:0:0:0: [sdb] 60604416 512-byte logical blocks: (31.0 GB/28.9 GiB) <--- correct size
[48062.453094] sd 6:0:0:0: [sdb] Write Protect is off
[48062.453099] sd 6:0:0:0: [sdb] Mode Sense: 45 00 00 00
[48062.453762] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[48062.658977] sdb: sdb1
[48062.677748] sd 6:0:0:0: [sdb] Attached SCSI removable disk
so i think it's fairly likely this is the result of a hardware issue in some capacity (or a catastrophic driver/firmware failure, i suppose), though it's unclear exactly why windows is still seeming to work with it. definitely try a new SD card. you could also try manually reformatting the SD card, in case the camera is generating bad partition tables. and if nothing works and your camera is under warranty, you might want to simply exchange the entire camera.
|
I remade the partition table and formatted it with mkfs.fat -F32, however the action cam does not accept this and requires that it is formatted by the device.
The identifier is now present and reads fine with a card reader, no luck with the usb mass storage still, it's still unable to read the device size.
I made a comparison of my initial format and what the action cam has done: https://paste.debian.net/hidden/dbb76709/
Nothing is jumping out at me but I'm no expert when it comes to partitions, I'm not sure if this is a partition issue or a communication issue since it can read it just fine in a card reader, if there was an issue caused by the formatting I would expect it to be completely broken.
I'm going to contact the manufacturer and see if I can get any help from them.
|
|
|
08-27-2021, 08:17 PM
|
#8
|
Member
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141
Rep:
|
Quote:
Originally Posted by Chryseus
I remade the partition table and formatted it with mkfs.fat -F32, however the action cam does not accept this and requires that it is formatted by the device.
The identifier is now present and reads fine with a card reader, no luck with the usb mass storage still, it's still unable to read the device size.
I made a comparison of my initial format and what the action cam has done: https://paste.debian.net/hidden/dbb76709/
Nothing is jumping out at me but I'm no expert when it comes to partitions, I'm not sure if this is a partition issue or a communication issue since it can read it just fine in a card reader, if there was an issue caused by the formatting I would expect it to be completely broken.
I'm going to contact the manufacturer and see if I can get any help from them.
|
oh yes that's right about the card reader, i forgot that part. my guess is that something is wrong with the controller for the usb mass storage, then. it also looks like the action cam is not writing some device information that is expected and written when formatted in linux (serial number, for example), which could cause problems with the driver. contacting the manufacturer seems like a good idea.
|
|
|
08-27-2021, 08:29 PM
|
#9
|
Moderator
Registered: Aug 2002
Posts: 26,640
|
Quote:
Quirks match for vid 0525 pid a4a5: 10000
|
I do not think your problem has anything to do with the SD card itself. I would guess there is a fault in the camera firmware and some "patch" is / was required that fixes the communication problem. Your kernel could be to old or a firmware upgrade made the quirk no longer required or something like that.
Hopefully contacting the manufacture will help solve the problem.
Last edited by michaelk; 08-27-2021 at 08:30 PM.
|
|
|
08-28-2021, 04:47 PM
|
#10
|
LQ Newbie
Registered: Aug 2021
Distribution: Arch Linux
Posts: 6
Original Poster
Rep: 
|
I have managed to solve the problem, I changed the usb-storage quirks mode to NO_READ_CAPACITY_16 (e), I also tried no quirks mode but this is clearly needed.
For future reference to anyone having this problem you can add options usb-storage quirks=0525:a4a5:e to a .conf file in /etc/modprobe.d, alternatively if usb-storage is not a module add the boot command usb-storage.quirks=0525:a4a5:e
I have reported this problem to the manufacturer so it's possible future firmware versions may not require this fix.
|
|
|
All times are GMT -5. The time now is 04:50 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|