The problem with the low-speed device on the USB

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

The problem with the low-speed device on the USB

Postby Telemex » Jan 20th, '20, 18:54

The problem with the low-speed device on the USB (ebook Digma e500). The operating system in the book is Linux. The SD card 2Gb in the book is formatted FAT16.
Read operations are working fine. Cannot copy files to the device or delete existing files. The operation freezes. After the device is physically disconnected, error correction in the FAT16 file system is required.
dmesg
Code: Select all
[  784.242339] usb 1-1: new high-speed USB device number 12 using xhci_hcd
[  784.625467] usb 1-1: Device not responding to setup address.
[  784.833439] usb 1-1: Device not responding to setup address.
[  785.041359] usb 1-1: device not accepting address 12, error -71
[  785.357318] usb 1-1: new high-speed USB device number 13 using xhci_hcd
[  785.629801] usb 1-1: Device not responding to setup address.
[  785.833490] usb 1-1: Device not responding to setup address.
[  786.041406] usb 1-1: device not accepting address 13, error -71
[  786.041579] usb usb1-port1: attempt power cycle
[  791.779542] usb 1-1: new high-speed USB device number 15 using xhci_hcd
[  791.792719] usb 1-1: New USB device found, idVendor=0085, idProduct=0600, bcdDevice= 3.22
[  791.792728] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  791.792733] usb 1-1: Product: File-backed Storage Gadget
[  791.792737] usb 1-1: Manufacturer: Linux 2.6.24.2-Boeye with s3c-udc
[  791.792741] usb 1-1: SerialNumber: 372041756775
[  791.794494] usb-storage 1-1:1.0: USB Mass Storage device detected
[  791.798078] scsi host3: usb-storage 1-1:1.0
[  792.842767] scsi 3:0:0:0: Direct-Access     Linux    File-Stor Gadget 0322 PQ: 0 ANSI: 2
[  792.844029] sd 3:0:0:0: Power-on or device reset occurred
[  792.848140] sd 3:0:0:0: [sdb] 3987209 512-byte logical blocks: (2.04 GB/1.90 GiB)
[  792.848437] sd 3:0:0:0: [sdb] Write Protect is off
[  792.848456] sd 3:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[  792.848665] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  792.865287]  sdb:
[  792.867103] sd 3:0:0:0: [sdb] Attached SCSI removable disk

After stopping the operation through the notification window, output dmesg:
Code: Select all
[ 1106.768294] INFO: task kworker/u8:2:9049 blocked for more than 122 seconds.
[ 1106.768305]       Not tainted 5.4.12-desktop-1.mga7 #1
[ 1106.768309] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1106.768313] kworker/u8:2    D    0  9049      2 0x80004000
[ 1106.768331] Workqueue: writeback wb_workfn (flush-8:16)
[ 1106.768336] Call Trace:
[ 1106.768352]  ? __schedule+0x281/0x700
[ 1106.768359]  ? wbt_exit+0x30/0x30
[ 1106.768364]  ? __wbt_done+0x30/0x30
[ 1106.768369]  schedule+0x2f/0xa0
[ 1106.768375]  io_schedule+0x12/0x40
[ 1106.768382]  rq_qos_wait+0xfa/0x170
[ 1106.768388]  ? ll_back_merge_fn+0x1b9/0x530
[ 1106.768394]  ? sysv68_partition+0x230/0x230
[ 1106.768399]  ? wbt_exit+0x30/0x30
[ 1106.768405]  wbt_wait+0x99/0xe0
[ 1106.768411]  __rq_qos_throttle+0x23/0x30
[ 1106.768418]  blk_mq_make_request+0x12a/0x5c0
[ 1106.768427]  generic_make_request+0xcf/0x310
[ 1106.768434]  submit_bio+0x3c/0x160
[ 1106.768442]  ? bio_add_page+0x62/0x90
[ 1106.768449]  submit_bh_wbc+0x16f/0x1a0
[ 1106.768457]  __block_write_full_page+0x206/0x460
[ 1106.768462]  ? touch_buffer+0x60/0x60
[ 1106.768469]  ? bdev_evict_inode+0xe0/0xe0
[ 1106.768476]  __writepage+0x19/0x50
[ 1106.768482]  write_cache_pages+0x197/0x420
[ 1106.768487]  ? __wb_calc_thresh+0x130/0x130
[ 1106.768496]  ? pagecache_get_page+0x15a/0x240
[ 1106.768503]  ? __find_get_block+0x246/0x280
[ 1106.768509]  generic_writepages+0x56/0x90
[ 1106.768528]  ? fat_time_unix2fat+0x56/0x160 [fat]
[ 1106.768536]  do_writepages+0x41/0xd0
[ 1106.768549]  ? __fat_write_inode+0x186/0x230 [fat]
[ 1106.768556]  __writeback_single_inode+0x3d/0x340
[ 1106.768562]  writeback_sb_inodes+0x1d0/0x450
[ 1106.768571]  __writeback_inodes_wb+0x5d/0xb0
[ 1106.768577]  wb_writeback+0x255/0x2f0
[ 1106.768582]  ? 0xffffffffb9000000
[ 1106.768587]  ? cpumask_next+0x16/0x20
[ 1106.768593]  wb_workfn+0x329/0x3f0
[ 1106.768602]  process_one_work+0x200/0x3c0
[ 1106.768608]  worker_thread+0x2d/0x3d0
[ 1106.768613]  ? process_one_work+0x3c0/0x3c0
[ 1106.768620]  kthread+0x112/0x130
[ 1106.768627]  ? kthread_park+0x80/0x80
[ 1106.768636]  ret_from_fork+0x35/0x40

On the same computer with Windows 10, copying the file to the ebook works without problems.
I tried to boot from a flash drive to Ubuntu 19.10 - it also freezes when copying.
However, on another computer (Lenovo Q190) with Mageia 7.1, everything works fine and without problems with the same ebook.
Probably problems with USB-drivers?
Code: Select all
[root@Mageia grub2]# lspci -v | grep USB
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) (prog-if 30 [XHCI])
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby doktor5000 » Jan 23rd, '20, 19:07

Out of curiosity, how do you connect an SD-card directly via USB?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: The problem with the low-speed device on the USB

Postby Telemex » Jan 24th, '20, 05:51

Yes. I connected the card directly (via a card reader). Works great! Also, I tried to insert another card into the reader. The result is the same.
I also tried to disable device caching (option sync to fstab) - without result. Also tried to boot from live-sd Mageya 5.1 - also did not help.
Sometimes it manages to copy 3-4 small files without errors. And if the file is large (for example, 8 MB), then it always hangs on this operation. :(
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby kajosim » Jan 25th, '20, 14:13

What computer (make and model) are you using ?
I assume Win10 is pre-installed on that computer. So it may have a special driver for the computer HW.
Win10 - computer - card reader - SD : OK
MGA - computer - card reader - SD : not
Ubuntu - computer - card reader - SD : not
MGA - Lenovo Q190 - card reader - SD OK
Correct ?
kajosim
 
Posts: 52
Joined: Feb 22nd, '17, 00:55

Re: The problem with the low-speed device on the USB

Postby lancer21 » Jan 25th, '20, 16:05

Maybe it's the card reader who's to blame? Or the SD card itself? Because sometimes, it's just the peripheric that's causing issues, I've often had that kind of problem, thinking that this or that program was bad, or that this or that file was corrupted because it was slow to copy/install and would often crash or freeze the computer... only to change the reader or the cable, resulting in the program/file working perfectly.
lancer21
 
Posts: 5
Joined: Dec 30th, '19, 20:36

Re: The problem with the low-speed device on the USB

Postby Telemex » Jan 25th, '20, 16:47

kajosim wrote:What computer (make and model) are you using ?
I assume Win10 is pre-installed on that computer. So it may have a special driver for the computer HW.
Win10 - computer - card reader - SD : OK
MGA - computer - card reader - SD : not
Ubuntu - computer - card reader - SD : not
MGA - Lenovo Q190 - card reader - SD OK
Correct ?

The computer is an unnamed mini-PC (ITX) on the Intel chipset, CPU - i7-7500U. Drivers for Win10 are installed from the Intel website.
Not quite right. With a card reader:
Win10 - computer - card reader - SD : OK
MGA - computer - card reader - SD : ОК
Ubuntu - computer - card reader - SD : ОК
MGA - Lenovo Q190 - card reader - SD OK.

With e-book:
Win10 - computer - e-book+SD :OK
MGA - computer - e-book+SD : not
Ubuntu (Fedora, OpenSuse, Mageia5.1) - computer - e-book+SD : not
MGA - Lenovo Q190 - e-book+SD OK.
MGA - Dell Vostro 500 - e-book+SD OK
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby Telemex » Jan 25th, '20, 16:53

lancer21 wrote:Maybe it's the card reader who's to blame? Or the SD card itself?

No. There are no problems with the card reader.
All problems with the e-book "Digma e500" (Manufacturer: Linux 2.6.24.2-Boeye with s3c-udc).
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby JoesCat » Jan 26th, '20, 20:27

There is also a possibility the SD card was removed before it completed writing.
To benefit from low power, it is common to be slow, and this is great for the ereader, but perhaps slower than the user expects if copying large files to the SD card.
If the linux PC is able to read the card, but cannot write to the card, this is a probable indication that the SD card may be corrupted or some of the files are not completely written in.
You might be able to confirm this by taking the SDcard and reader to a second Windows10 PC and it may have some problems with the card.

You may need to copy all files to your PC, and reformat the card, and then copy files back.
In windows, use the eject, to umount the card. If it refuses to eject, it is because the card isn't finished being written to. Wait a bit longer, and you can use the eject (on the taskbar) to be a bit more forceful, but again, slow cards require time to be written to.
Similarly, in linux, use umount to complete any unfinished writes.

See if this resolves the problem.
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

Re: The problem with the low-speed device on the USB

Postby JoesCat » Jan 26th, '20, 20:42

One other item to keep in mind.... the age of the ereader, and also which distro, and age of distro you are using.
Keep middle of Aug 2019 as a ballpark figure in mind: https://www.google.com/search?q=linux+k ... indows+fat when experimenting with what reads/writes files.
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

Re: The problem with the low-speed device on the USB

Postby kajosim » Jan 26th, '20, 21:44

So you are connecting a computer (mini-PC) running Linux with another computer (ebook) also running Linux.

When using Win10 the ebook probably just acts as a card reader for the SD card and you have no restrictions on what you can do.
But when 2 Linux are connected then when one user on the first (mini-PC) Linux connects to the other (ebook) restrictions are imposed on what the user is allowed to do. And in many cases it will be reasonable that the user is not allowed to modify the file system on the 'external' computer.

When I connect my Android mobile to my linux a pupop window on the mobile asks me whether I will allow my Linux computer to access the file system of the mobile. I have never needed to copy files to the mobile so this I have not tested, but I can eg. copy all the photos from the mobile.

I wonder whether you from mini-PC+Linux can read the Linux-file system of the ebook. In which case it is even more important to impose restrictions on what you are allowed to do.

It could also be a matter of some hand-shaking problem between mini-pc and ebook, but less likely.

You may check the UserID of all Linux's used . If UserID is the same then there may be less restrictions.

I would be content with 'restrictions' as a sensible explanation and use the card reader for modifying the content of the SD card.
Regards.
kajosim
 
Posts: 52
Joined: Feb 22nd, '17, 00:55

Re: The problem with the low-speed device on the USB

Postby Telemex » Jan 27th, '20, 06:09

Thanks for answers!
You may not understand me. I apologize for the google translator.
Again. Problems only with the interaction of the Mini-PC i7-7500 (Mageya 7.1) and the e-book.
The same e-book and Lenovo Mini-PC (Mageya 7.1) work perfectly without errors.
The same e-book and Notebook Dell (Mageya 7.1) work perfectly and without errors.
Mini-PC i7-7500 (win10) + e-book: OK
Mini-PC i7-7500 (Mageia7.1) + e-book: ERROR copy
Mini-PC i7-7500 (any Linux distr) + e-book: ERROR copy
Mini-PC Lenivo Q190 (Mageia7.1) + e-book: ОК
Notebook Dell Vostro 500 (Mageia7.1) + e-book: ОК

There are no problems with access rights to files and directories.
Code: Select all
[andrej@Mageia 3732-6130]$ ls -l
итого 89344
drwxr-xr-x  6 andrej andrej    32768 янв 10  2016 Documents/
drwxr-xr-x  2 andrej andrej    32768 ноя 18  2010 Memo/
drwxr-xr-x  2 andrej andrej    32768 окт 14  2017 Music/
drwxr-xr-x  2 andrej andrej    32768 окт 14  2017 Pictures/
-rw-r--r--  1 andrej andrej 91293696 мая 26  2011 sibrary.img
drwxr-xr-x 55 andrej andrej    32768 июн 22  2017 zip_rar/
[andrej@Mageia 3732-6130]$
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby Telemex » Jan 27th, '20, 06:24

JoesCat wrote:To benefit from low power, it is common to be slow, and this is great for the ereader, but perhaps slower than the user expects if copying large files to the SD card.
If the linux PC is able to read the card, but cannot write to the card, this is a probable indication that the SD card may be corrupted or some of the files are not completely written in.
You might be able to confirm this by taking the SDcard and reader to a second Windows10 PC and it may have some problems with the card.

When copying, it hangs quite randomly. Sometimes 8 small files can be copied without errors, and sometimes only 1. Moreover, it can hang both at the beginning of copying and at the end. And it happens that it freezes when deleting files in an e-book.
After each unsuccessful attempt to copy, I restore the file system with the command
Code: Select all
dosfsck
. Of course, I disconnect the book from the computer only after unmounting. But, if the copy is frozen, it is not possible to correctly unmount the device. You have to disconnect the usb cable and then restore the file system in the e-book.
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby JoesCat » Jan 27th, '20, 09:48

Good info - just wanted to make sure you were umounting and ejecting :-)

In summary:
The mini-iTX == USB3+
the laptops, likely USB2+

The cardreader is likely in a linux USB database, while the ereader probably is not in the database yet.
Windows10 driver probably slows-down the USB port to work with the ereader.
You probably need to do the same for linux, tell the USB3 port to run slower, maybe USB2, or USB1 speeds.

Check the speed settings for your card reader and also the ereader.
See if this info helps: https://bbs.archlinux.org/viewtopic.php?id=172005
The ereader should be as fast, or probably slower than the card reader.
Likely slower since it is likely a low powered processor running at slow speed to conserve power as much as possible.
The cardreader doesn't need to be concerned about saving power since it's getting power from the USB port.

Check if the problem goes away if you slow down the port connected to the ereader.
It probably will work okay at slower speed.

This is the linux database, and this sort of info may be useful if the ereader needs to run slower
http://www.linux-usb.org/usb-ids.html
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

Re: The problem with the low-speed device on the USB

Postby Telemex » Jan 27th, '20, 17:08

I tried switching the usb port to low speed, but nothing worked:
Code: Select all
root@Mageia usb1]# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 2: Dev 17, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 6: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M

e-book - Bus 01, Port 2: Dev 17.
Code: Select all
[root@Mageia usb1]# echo 2 > /sys/bus/usb/devices/usb1/../companion
bash: /sys/bus/usb/devices/usb1/../companion: Отказано в доступе (access denied)

The e-book is in the "The USB ID Repository" https://usb-ids.gowdy.us/read/UD/0085.
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby fopenp » Feb 1st, '20, 20:42

Sometimes ACPI implementations are buggy and this could interfere with USB as well.
You should try to add (in Mini-PC i7-7500 with Mageia 7.1) this kernel option: noacpi
(noacpi is different than noapic).
User avatar
fopenp
 
Posts: 8
Joined: Jan 20th, '20, 23:55
Location: EU/ Italy

Re: The problem with the low-speed device on the USB

Postby Telemex » Feb 4th, '20, 16:35

I tried to boot with this option (noacpi), but nothing changed. The problem remained unsolved.
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36

Re: The problem with the low-speed device on the USB

Postby fopenp » Feb 4th, '20, 21:21

If you have an old USB 1.0 HUB, try to use it between the ereader and the computer.
In past I solved a problem with my scanner in this way.

Generally, various USB ports (in the same computer) could behave differently, because some mainboard manufacturers embed some internal hub which could not be recognized.
User avatar
fopenp
 
Posts: 8
Joined: Jan 20th, '20, 23:55
Location: EU/ Italy

Re: The problem with the low-speed device on the USB

Postby Telemex » Feb 6th, '20, 06:25

Thanks. This is probably the only option.
Telemex
 
Posts: 16
Joined: Dec 6th, '19, 06:36


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron