Closed JakubGIT closed 2 years ago
Freezes on which screen?
Freezes on which screen?
"Starting usb connection" or "establishing usb connection" or how exactly it is called.
Before the last KOReader update an error page was shown ("could not start usb connection"), now it simply freezes.
I'm going to need live system logs, c.f., https://github.com/koreader/koreader/issues/6582#issuecomment-683297132 this old comment (except, well, with sensible final steps for your own issue ;p).
A cat /usr/local/KoboUSBMS.log
after the fact might also yield valuable information ;).
Mar 14 07:52:22 usbms[4371]: Initializing USBMS v1.2.6 (2022-02-05 19:03:23 +0100)
Mar 14 07:52:22 usbms[4371]: [FBInk] Detected a Kobo Libra 2 (388 => Io @ Mark 9)
Mar 14 07:52:22 usbms[4371]: [FBInk] Enabled Kobo Mark 7 quirks
Mar 14 07:52:22 usbms[4371]: [FBInk] Clock tick frequency appears to be 100 Hz
Mar 14 07:52:22 usbms[4371]: [FBInk] Screen density set to 300 dpi
Mar 14 07:52:22 usbms[4371]: [FBInk] Variable fb info: 1264x1680, 8bpp @ rotation: 1 (Clockwise, 90°)
Mar 14 07:52:22 usbms[4371]: [FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 9175040 bytes & line length: 1280 bytes
Mar 14 07:52:22 usbms[4371]: [FBInk] Canonical rotation: 0 (Upright, 0°)
Mar 14 07:52:22 usbms[4371]: [FBInk] Fontsize set to 32x32 (IBM (Default) base glyph size: 8x8)
Mar 14 07:52:22 usbms[4371]: [FBInk] Line length: 39 cols, Page size: 52 rows
Mar 14 07:52:22 usbms[4371]: [FBInk] Vertical fit isn't perfect, shifting rows down by 8 pixels
Mar 14 07:52:22 usbms[4371]: [FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
Mar 14 07:52:22 usbms[4371]: Initialized FBInk v1.24.0-93-g71760e2 for Kobo
Mar 14 07:52:22 usbms[4371]: [setup_usb_ids:138] USB product ID: 0x4234
Mar 14 07:52:22 usbms[4371]: Initialized libue v1.4.0
Mar 14 07:52:22 usbms[4371]: Initialized libevdev v1.12.0 for device `gpio-keys`
Mar 14 07:52:22 usbms[4371]: [FBInk] Font `/mnt/usbms/resources/fonts/CaskaydiaCove_NF.otf` loaded for style 'Regular'
Mar 14 07:52:22 usbms[4371]: Internal storage partition is busy, can't export it!
Mar 14 07:52:22 usbms[4371]: Listing all offending processes…
Mar 14 07:52:22 fuser-check.sh[4373]: 4332 -> dropbear
Mar 14 07:52:22 fuser-check.sh[4373]: 4350 -> dropbear
Mar 14 07:52:22 usbms[4371]: Waiting for a power button press…
Mar 14 07:52:53 usbms[4371]: It's been 30 sec, giving up
Mar 14 07:52:56 usbms[4371]: Bye!
/usr/local/KoboUSBMS.log
+ '[' true '=' true ]
+ set -o pipefail
+ basename /mnt/usbms/scripts/start-usbms.sh
+ SCRIPT_NAME=start-usbms.sh
+ grep -q -e ^g_file_storage -e ^g_mass_storage /proc/modules
+ USB_VENDOR_ID=0x2237
+ VERSION_TAG=/mnt/onboard/.kobo/version
+ '[' -f /mnt/onboard/.kobo/version ]
+ cut -f1 -d, /mnt/onboard/.kobo/version
+ SERIAL_NUMBER=N4181900XXXXX
+ cut -f3 -d, /mnt/onboard/.kobo/version
+ FW_VERSION=4.31.19086
+ DISK=/dev/mmcblk
+ PARTITIONS=/dev/mmcblk0p3
+ '[' -e /dev/mmcblk1p1 ]
+ sync
+ echo 3
+ DIR=/mnt/sd
+ grep -q /mnt/sd /proc/mounts
+ DIR=/mnt/onboard
+ grep -q /mnt/onboard /proc/mounts
+ umount /mnt/onboard
+ MODULES_PATH=/drivers/mx6sll-ntx
+ GADGETS_PATH=/drivers/mx6sll-ntx/usb/gadget
+ '[' -e /drivers/mx6sll-ntx/g_mass_storage.ko ]
+ '[' mx6sll-ntx '=' mx6sll-ntx ]
+ PARAMS='idVendor=0x2237 idProduct=0x4234 iManufacturer=Kobo iProduct=eReader-4 .31.19086 iSerialNumber=N418190093026'
+ insmod /drivers/mx6sll-ntx/usb/gadget/configfs.ko
Do NOT use KOReader's SSHD. Use KoboStuff's, as mentioned in the message I linked ;).
The script's log would imply some kind of hang during the module insert (yaaaaay'), curious if it's just hanging in there, or if the device froze, which you'll know once you get a shell running (i.e., it'll either hang, or not ^^).
Much like in your other issue, I wouldn't mind having the kernel logs in there (so, run klogd
once before everything).
In case it wasn't clear, the Libra 2 is a weird crashy beast, and FW 4.31 is a trainwreck, so, you got a two for one in there ;).
Note to self: hell, for all I know, it might be a Libra 2 special EPDC hang because of the status bar refreshes?
Ok, I'll try :-)
This is my second installation of KOReader on this device. I updated Nickel, so I had to reinstall. The first installation on an earlier version of Nickel (I cannot say which one it was) didn't have the problem with usb (but it froze quite often in the dictionary)
So.
klogd
logread -F
logread
but - this was the second try, the first time I didn't let putty log itself and copied from the screen, which made the earlier messages disappear, that's why I repeated. But the first time, the USB connection worked!!! But nevertheless it crashed after I safely removed the device and plugged off the usb cable
nickel doesn't connect to pc either has KOReader already run. The device must be rebooted to achieve the normal functionality
the USB connection worked!!! But nevertheless it crashed after I safely removed the device and plugged off the usb cable
Interesting. #8910
unfortunatelly not
2 times it didn't crash but closed the connection itself very quickly (I believe the conneciton was there for a second or so) immediatelly after that, koreader has offered a new connection, which I accepted the third time it crashed
Err, what do you mean by "the connection"? The actual USB storage pop-up in KOReader? Because that would be fairly orthogonal to the issue I'm looking at ;p'
I mean, I think I saw an external drive on my.pc for a sec
Oh, hey, a kernel OOPS (what a surprise...).
I don't really have any other Libra 2 logs to compare to, but this one looks super fishy, so much so that I wouldn't exclude a dodgy cable and/or port (on either side of the connection).
i.e., this is an open call to Libra 2 users to come and test to see if this is a localized issue or not ;).
Oh, hey, a kernel OOPS (what a surprise...).
I don't really have any other Libra 2 logs to compare to, but this one looks super fishy, so much so that I wouldn't exclude a dodgy cable and/or port (on either side of the connection).
* there is definitely a difference between starting usbms from the menu or first plugging a cable
Ha! That's a very interesting distinction: I was always wondering why my cowboy method of hoping for the best appeared to behave so far ;).
By which I mean, we currently start the session as soon as the kernel tells us "hey, usb cable!". Knowing NTX boards (and... embedded USB controllers in general, to be honest), that may be a tad optimistic ;).
It would probably not be completely stupid to simply wait for a second or two for things to actually settle properly.
I'll give you a test binary later tonight, thanks for the detailed rundown of your experiments, that was very helpful ;).
Case in point: I actually started delaying the "USB" popup inside KOReader when working on the Sage, because stuff was looking hella wonky, so we're effectively already doing that in the second case (even if there weren't the actual delay of stopping KOReader and starting USBMS ^^) ;).
Okay, realized that we were skipping the charger type check in the "plugged in after startup" case, which was... possibly not great, but not necessarily critical here, because it appears to be set fairly erratically on your device (which, err, might be an issue in and of itself, but possibly not entirely relevant here).
Anyway, here's a test binary that takes a more defensive approach to this use-case (replace the koreader/data/KoboUSBMS.tar.gz
file w/ it).
Okay, realized that we were skipping the charger type check in the "plugged in after startup" case, which was... possibly not great, but not necessarily critical here, because it appears to be set fairly erratically on your device (which, err, might be an issue in and of itself, but possibly not entirely relevant here).
Anyway, here's a test binary that takes a more defensive approach to this use-case (replace the
koreader/data/KoboUSBMS.tar.gz
file w/ it).
great job, thanks!
Random stupid test, because I switched tacks to handle the initial module loading issue ;).
Does this binary still work?
yes it does.
I had some problems as I tested but I cannot replicate them now though and I believe it was the pc/trend micro causing them
On Thu, Mar 24, 2022 at 12:13 AM NiLuJe @.***> wrote:
Random stupid test, because I switched tacks to handle the initial module loading issue ;).
Does this binary still work?
KoboUSBMS.tar.gz https://github.com/koreader/koreader/files/8337215/KoboUSBMS.tar.gz
— Reply to this email directly, view it on GitHub https://github.com/koreader/koreader/issues/8896#issuecomment-1076908414, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY2UTLVJIFTMCBFSMS6IXLVBOQSBANCNFSM5QTNNZDA . You are receiving this because you authored the thread.Message ID: @.***>
Cool, thanks! (what kind of problems, though?).
No connection at all. usbms stopped the connection immediatelly or said it is only a power source. Nickel couldn't connect either.
I believe Trend Micro blocked the MAC Address of the device
On Sat, 26 Mar 2022, 13:24 NiLuJe @.***> wrote:
Cool, thanks! (what kind of problems, though?).
— Reply to this email directly, view it on GitHub https://github.com/koreader/koreader/issues/8896#issuecomment-1079678398, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY2UTLLBWORJ3AS26PCGGTVB36YFANCNFSM5QTNNZDA . You are receiving this because you authored the thread.Message ID: @.***>
Issue
USB Storage connection freezes (always) immediatelly after the computer is connected
Steps to reproduce
or
crash.log
(if applicable)crash.log