Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 11-13-2016, 10:02 PM   #1
mmholt
MrsUndertaker
mmholt began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2011
Device: Galaxy Tab S2 9.7
I give up

I've been using Calibre on Linux for a long time, first with Kindles and now Android tablets and phone. I've never had a serious problem before. I'm not sure what caused it to break, but something is now broken.

My Galaxy tablet on Lollipop works great with Calibre on Linux Mint 17.3 or Windows 10. My Galaxy devices that use Marshmallow work great with Calibre on Windows 10. My Galaxy devices that use Marshmallow don't work with Calibre at all on Linux Mint 17.3 any longer. They used to work with no problem, but not anymore

Here's what I am doing. First I connect device to Linux computer via USB. Get prompt on tablet to all MTP connection, so I allow it. I can read and write to the both the tablet and the SD card where my books are stored from the computer, and I can view their contents on the computer.

Next I start Calibre in the terminal. I get prompted on device to allow MTP connection again, select allow, device is still not detected in calibre. As long as calibre is running, the device will be repeatedly unmounted and ask for mtp permission every time, and calibre still never detects it. It's almost like Calibre is unmounting the device and remounting it when it tries to detect it. Once calibre is shut down, the device remains connected until i unmount it, and it works normally.

I've tried setting the Androids up as a user-defined device, and that didn't make any difference. I've tried with a fresh install of Calibre, no joy. I can't even remember how many things I've tried to make this work. With all that in mind, it seems like a Marshmallow issue, but i can't figure out what do to.

I've attached the output of debug device detection, and the terminal output that I get when calibre is running. Any clues would be greatly appreciated. I can work around this be saving to disk and then manually copying those files to the tablet, but I'd much rather it just work the way it used to. Clue, please?
Attached Files
File Type: txt calibre-debug-device-detection.txt (4.8 KB, 170 views)
File Type: txt output from terminal when launching calibre.txt (6.7 KB, 159 views)

Last edited by mmholt; 11-13-2016 at 10:10 PM.
mmholt is offline   Reply With Quote
Old 11-13-2016, 10:10 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,505
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Does this help https://www.mobileread.com/forums/sho...d.php?t=271220
Quote:
Originally Posted by kovidgoyal View Post
On linux (and OS X), you cannot have multiple application trying to connect to a MTP device. Only one application can be connected at a time. So turn off the auto connect in your OS/file manager and you will be fine.
PeterT is offline   Reply With Quote
Advert
Old 11-13-2016, 11:59 PM   #3
mmholt
MrsUndertaker
mmholt began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2011
Device: Galaxy Tab S2 9.7
Quote:
Originally Posted by PeterT View Post
Hi, thanks for the reply. That doesn't help. I've turned off the setting that opens the file manager when a disk is mounted, and Calibre keeps disconnecting and reconnecting ad nauseum anyway. I see a lot of errors in the attachment but I don't understand what they mean.
mmholt is offline   Reply With Quote
Old 11-14-2016, 12:09 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,343
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
On linux MTP devices can only be accessed by a single program at a time. You need to find whatever in your OS is claiming the tablet automatically (most likely your desktop shell/file manager) and disable it. Then your tablet will work fine with calibre.

{rant}
Personally, I gave up on linux desktop environments a long time ago. They are full of boneheaded decisions like taking control of MTP devices without permission from the user and then mounting them as a pseudo-filesystem -- never mind the fact that MTP is not and cannot be mapped to a filesystem, as it has fundamentally different semantics.

So instead of doing the hard work of creating a daemon to multiplex MTP access (equivalent to the windows portable device service) the desktop environments just happily claim the device and map it to a filesystem because that's the least effort path, and be damned to the consequences.
{endrant}
kovidgoyal is online now   Reply With Quote
Old 11-14-2016, 04:16 PM   #5
mmholt
MrsUndertaker
mmholt began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2011
Device: Galaxy Tab S2 9.7
Quote:
Originally Posted by kovidgoyal View Post
On linux MTP devices can only be accessed by a single program at a time. You need to find whatever in your OS is claiming the tablet automatically (most likely your desktop shell/file manager) and disable it. Then your tablet will work fine with calibre.
How can I figure that out? I've disabled the setting that launches the file manager when the device is connected. I use Vysor, and it's setting to launch on connection is disabled also. Only devices running Marshmallow have this problem, and it's a new problem. I've been using the same setup since I got the tablet in February, and it's just recently broken. The only relevant thing I think I've changed is to install Calibre updates and android updates. It really looks like calibre is connecting, failing at something, then disconnecting, and this continues until I unplug the device. If I start calibre from the terminal, I see a lot of stuff I don't understand:

maryh@voodoo ~ $ calibre
Traceback (most recent call last):
File "site-packages/calibre/gui2/ui.py", line 157, in __init__
File "site-packages/calibre/gui2/ui.py", line 171, in init_iaction
File "site-packages/calibre/customize/__init__.py", line 609, in load_actual_plugin
File "importlib/__init__.py", line 37, in import_module
File "site-packages/calibre/customize/zipplugin.py", line 183, in load_module
File "calibre_plugins.recoll_fulltext_search.ui", line 18, in <module>
File "site-packages/calibre/customize/zipplugin.py", line 183, in load_module
File "calibre_plugins.recoll_fulltext_search.main", line 17, in <module>
ImportError: No module named PyQt4.Qt
Traceback (most recent call last):
File "site-packages/calibre/gui2/ui.py", line 157, in __init__
File "site-packages/calibre/gui2/ui.py", line 171, in init_iaction
File "site-packages/calibre/customize/__init__.py", line 609, in load_actual_plugin
File "importlib/__init__.py", line 37, in import_module
File "site-packages/calibre/customize/zipplugin.py", line 183, in load_module
File "calibre_plugins.similar_stories.action", line 12, in <module>
ImportError: No module named PyQt4.Qt
Traceback (most recent call last):
File "site-packages/calibre/gui2/ui.py", line 157, in __init__
File "site-packages/calibre/gui2/ui.py", line 171, in init_iaction
File "site-packages/calibre/customize/__init__.py", line 609, in load_actual_plugin
File "importlib/__init__.py", line 37, in import_module
File "site-packages/calibre/customize/zipplugin.py", line 183, in load_module
File "calibre_plugins.apnx_generator.apnxaction", line 14, in <module>
ImportError: No module named PyQt4.Qt
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Failed to create system tray icon, your desktop environment probably does not support the StatusNotifier spec
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP ERROR: couldnt parse extension samsung.com/devicestatus:4
Error while trying to open MTPDevice(busnum=3, devnum=17, vendor_id=1256, product_id=26720, bcd=1024, serial=u'330012346bb6436d', manufacturer=u'SAMSUNG', product=u'SAMSUNG_Android') (Driver: <calibre.devices.mtp.driver.MTP_DEVICE object at 0x7ffb098526d0>)
Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 295, in detect_device
File "site-packages/calibre/devices/mtp/driver.py", line 126, in open
File "site-packages/calibre/devices/mtp/base.py", line 26, in synchronizer
File "site-packages/calibre/devices/mtp/unix/driver.py", line 221, in open
MTPError: The device has no storage information.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
HttpHelper::__init__: proxy=None
Unable to open device <calibre.devices.android.driver.ANDROID object at 0x7ffb0980d550>
Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 198, in do_connect
File "site-packages/calibre/devices/usbms/device.py", line 864, in open
File "site-packages/calibre/devices/usbms/device.py", line 610, in open_linux
DeviceError: Unable to detect the ANDROID disk drive. Either the device has already been ejected, or your kernel is exporting a deprecated version of SYSFS.

Can you please tell me what any of that means? Do I need to install something else? Rollback to an older calibre? Or just give up and save to disk? I can do that, but I'd much rather it work the way it used to, which was flawlessly.
mmholt is offline   Reply With Quote
Advert
Old 11-14-2016, 09:58 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,343
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Once again

On linux MTP devices can only be accessed by a single program at a time. You need to find whatever in your OS is claiming the tablet automatically (most likely your desktop shell/file manager) and disable it.

The relevant line in the log is:

ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface

This has nothing to do with calibre, everything to do with your OS. I have no idea how to find what is claiimng the device on your OS, like I said, I stopped using linux desktop environments years ago. You will have to ask about that in the support forums for whatever desktop environment you are using.
kovidgoyal is online now   Reply With Quote
Old 11-14-2016, 11:24 PM   #7
mmholt
MrsUndertaker
mmholt began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2011
Device: Galaxy Tab S2 9.7
Quote:
Originally Posted by kovidgoyal View Post
Once again

On linux MTP devices can only be accessed by a single program at a time. You need to find whatever in your OS is claiming the tablet automatically (most likely your desktop shell/file manager) and disable it.

The relevant line in the log is:

ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface

This has nothing to do with calibre, everything to do with your OS. I have no idea how to find what is claiimng the device on your OS, like I said, I stopped using linux desktop environments years ago. You will have to ask about that in the support forums for whatever desktop environment you are using.
If something unrelated to Calibre is claiming the device, why are only the marshmallow devices affected?

I've been using Linux Mint 17.3 all year. Until February, I used an Android tablet which ran Lollipop. This worked perfectly. Later I started using a phone and tablet that use Marshmallow. These too worked perfectly. I'm not sure when exactly it stopped working, but it was after some Calibre update. Yet you insist the OS which again, works just fine with other devices and worked with this device in the past, is the sole issue. Whatever. Thanks for being so condescending.
mmholt is offline   Reply With Quote
Old 11-14-2016, 11:33 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,343
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont want to listen, feel free. I give up. Enjoy not having a working device.
kovidgoyal is online now   Reply With Quote
Old 11-14-2016, 11:56 PM   #9
mmholt
MrsUndertaker
mmholt began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2011
Device: Galaxy Tab S2 9.7
Quote:
Originally Posted by kovidgoyal View Post
You dont want to listen, feel free. I give up. Enjoy not having a working device.
I'm entirely willing to listen. Here's the questions again... If something unrelated to Calibre is claiming the device, why are only the marshmallow devices affected? If everything worked before a a Calibre update, how is the problem Linux?
mmholt is offline   Reply With Quote
Old 11-15-2016, 09:40 AM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by mmholt View Post
I'm entirely willing to listen. Here's the questions again... If something unrelated to Calibre is claiming the device, why are only the marshmallow devices affected? If everything worked before a a Calibre update, how is the problem Linux?
Because it was (mostly) broken before and it decided to break the rest of the way.
This morning, my USB connected 768x1024 (Portrait oriented) monitor (#3) that I use to View Books under edit went dark. Is it a Calibre problem? No... W10 either did an update or it died (it is 12YO )

OS level updates can happen. Shared resources can get updated (quietly) by other package installs. There are a lot of mostly functional (for reading) that are defective in following USB specs.
Kovid has already said that the MTP device connection NOW belongs to something else on your system.
theducks is offline   Reply With Quote
Old 11-15-2016, 11:08 AM   #11
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
Does your Galaxy tablet have the option for the USB interface to use Mass Storage rather than MTP ? My phone and an Android based Ereader both have this option in "Settings".

BobC
BobC is offline   Reply With Quote
Old 11-15-2016, 03:43 PM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,568
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
For the record, I can get my Marshmallow device to connect to the very latest calibre on Linux (Arch Linux), so it IS possible (and is not the fault of calibre that it's difficult). It's not easy, and it's not guaranteed, but I had to enable USB Debugging (Developer Options) on my Nexus 7 to get it to work.

I have nothing trying to automount my Nexus 7, so after I plug it in, I just have to manually change the USB function from Charging to File transfers (the USB function options show up in the devices system message area) and then calibre picks it right up.

Last edited by DiapDealer; 11-15-2016 at 03:46 PM.
DiapDealer is offline   Reply With Quote
Old 11-17-2016, 05:08 PM   #13
mmholt
MrsUndertaker
mmholt began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2011
Device: Galaxy Tab S2 9.7
Quote:
Originally Posted by BobC View Post
Does your Galaxy tablet have the option for the USB interface to use Mass Storage rather than MTP ? My phone and an Android based Ereader both have this option in "Settings".

BobC
Nope, they're both MTP and I think that's the issue. MTP has always been flaky with Linux Mint, now it's just flakier with Marshmallow. I think I'm getting it sorted out, though. Thank you for the suggestion.

Quote:
Originally Posted by DiapDealer View Post
For the record, I can get my Marshmallow device to connect to the very latest calibre on Linux (Arch Linux), so it IS possible (and is not the fault of calibre that it's difficult). It's not easy, and it's not guaranteed, but I had to enable USB Debugging (Developer Options) on my Nexus 7 to get it to work.

I have nothing trying to automount my Nexus 7, so after I plug it in, I just have to manually change the USB function from Charging to File transfers (the USB function options show up in the devices system message area) and then calibre picks it right up.
Thanks. I've always had USB debugging on and the USB function is on file transfers. No other app has any trouble accessing either of these marshmallow devices. When I plug in the USB cable (and I've tried multiple cables), I get the "Allow access to device data" prompt on the device. When I select Allow, the file manager in Linux (caja) automatically opened when the device mounts. It has always done this. Based on what I'm reading in the responses, that sounded like the problem so I've turned that off, but it wasn't a problem before, and it doesn't seem to entirely solve the problem.

I've finally got it partially working, but I'm not sure how. I'm unmounting the device after connecting it, and then sometimes calibre sees it, sometimes not. I tried turning off automount, and then calibre never even detects the device. I have to let the device automount, unmount it, start calibre with my fingers crossed and sometimes it works. With a Lollipop device, I can leave it mounted and Calibre works just fine. I can open the device in the file manager and make changes there while calibre is running, no issues. Only with Marshmallow devices on Linux do I see problems, and only recently. With a Calibre update nearly every time I run it, Linux Mint updates almost daily, and the occasional Android update, I'm guessing I'll never really figure it out completely. Saving to disk works fine, so I can always use that to transfer to my devices if all else fails.

Many thanks to all who replied

Last edited by mmholt; 11-17-2016 at 05:14 PM.
mmholt is offline   Reply With Quote
Old 11-17-2016, 09:53 PM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,568
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I just know that libmtp (by its own admission) is very flaky with the newest versions of Android.
DiapDealer is offline   Reply With Quote
Old 11-18-2016, 12:44 PM   #15
mmholt
MrsUndertaker
mmholt began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2011
Device: Galaxy Tab S2 9.7
Quote:
Originally Posted by DiapDealer View Post
I just know that libmtp (by its own admission) is very flaky with the newest versions of Android.
I totally agree. It's just so counter-intuitive now. I connect the devices so I can use them on the computer. For all other purposes (my purposes anyway) that means the devices are mounted. I couldn't even fathom being able to use an unmounted device. On Windows it seems like all the devices have to be mounted, and calibre works fine with all. calibre on Linux doesn't care if my Lollipop devices are mounted or not, but the Marshmallow devices have to be: connected and automounted, then unmounted, then I can start calibre and the devices are recognized. No other sequence of steps will work with my Marshmallow devices, and if I restart calibre, I have to disconnect the device and go through all that voodoo again. I still can't wrap my head around being able to use an unmounted device, but I'm just going to accept it as one of the mysteries of the universe.
mmholt is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-T1 OK I give up... carpetmojo Sony Reader 17 12-01-2011 09:52 AM
OK, I give up, what is Karma and how do we give/get it? chas0039 Feedback 4 06-02-2011 08:25 PM
Pandigital: We'll give you Android, you give up your warranty RockdaMan Android Devices 6 01-12-2011 12:17 AM
Accessories K2 Give away Kumabjorn Amazon Kindle 9 10-12-2010 11:54 AM


All times are GMT -4. The time now is 01:56 AM.


MobileRead.com is a privately owned, operated and funded community.