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 03-18-2017, 03:08 PM   #1
bRick57720
Junior Member
bRick57720 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2017
Device: PRS-650
Calibre stopped working with Sony PRS-650 - reports write protection

Hi,

I followed https://www.mobileread.com/forums/sh...d.php?t=118560 but Calibre 2.7.8 (Fedora 24 64bit) won't establish connection to my Sony PRS-650. It used to work without problems (last time I checked was in October, so any update since then might have broken it).

The output of the diagnosis reports:

Code:
calibre 2.78  embedded-python: False is64bit: True
Linux-4.9.13-101.fc24.x86_64-x86_64-with-fedora-24-Twenty_Four Linux ('64bit', '')
('Linux', '4.9.13-101.fc24.x86_64', '#1 SMP Tue Mar 7 23:48:32 UTC 2017')
Python 2.7.13
Linux: ('Fedora', '24', 'Twenty Four')

(...)

Looking for devices...
USBDevice(busnum=1, devnum=7, vendor_id=0x054c, product_id=0x031e, bcd=0x031a, manufacturer=Sony, product=Sony Digital Book Reader, serial=08004610011DE1F5)
		Detected possible device PRS505
 
Devices possibly connected: SONY Device Interface,  
Trying to open SONY Device Interface ... failed
Opening of the following devices failed
<calibre.devices.prs505.driver.PRS505 object at 0x7f32c597fd50>
Traceback (most recent call last):
  File "/usr/lib64/calibre/calibre/devices/__init__.py", line 158, in debug
    dev.open(det, None)
  File "/usr/lib64/calibre/calibre/devices/usbms/device.py", line 864, in open
    self.open_linux()
  File "/usr/lib64/calibre/calibre/devices/usbms/device.py", line 638, in open_linux
    self.filter_read_only_mount_points()
  File "/usr/lib64/calibre/calibre/devices/usbms/device.py", line 676, in filter_read_only_mount_points
    %self.__class__.__name__)
DeviceError: Main storage of PRS505 is write protected. This usually happens due to filesystem errors. (translated from: Hauptspeicher von PRS505 ist schreibgeschützt. Dies passiert üblicherweise aufgrund von Fehlern im Dateisystem.)
The connected device is not a PRS505 but a PRS650. As far as I can tell the reported write protected storage device is the 'SETTING' partition containing Sony software which is read only. When running fsck the device has the dirty bit set, any attempt to reset it fails - i.e. Calibre won't establish connection.

Has anyone an idea how to make Calibre ignore the 'SETTING' partition and work correctly with the 'READER' partition (which is writeable)? Any help is highly appreciated.

Best,
bRick57720
bRick57720 is offline   Reply With Quote
Old 03-18-2017, 11:28 PM   #2
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,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The 505 driver is used for the 650 as well. There have been no changes to the SONY drivers in calibre in years. The driver already automatically ignores the settings partition. That error means it could find no read/write paritions on your device. You need to either fsck or reformat the partition.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-19-2017, 04:43 AM   #3
bRick57720
Junior Member
bRick57720 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2017
Device: PRS-650
Thanks for the reply! I reformatted the device and ran fsck (which keeps reporting a dirty bit) to no effect. Calibre keeps reporting the device as read only although I can write to the device (did write files onto the device via file manager). Any other idea (I also disabled SELinux but as expected this did not have any effect either)?

Thanks,
bRick57720
bRick57720 is offline   Reply With Quote
Old 03-19-2017, 07:25 AM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,144
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Try Windows.
JSWolf is online now   Reply With Quote
Old 03-19-2017, 07:41 AM   #5
bRick57720
Junior Member
bRick57720 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2017
Device: PRS-650
@JSWolf, thanks for the suggestion! I just installed Calibre 2.78 64bit in Win10 and it works fine with the Sony PRS650. A reboot in Fedora with the same Calibre version still refuses to connect to the reader. Manually adjusting the mount-options to ignore errors (was remount-ro) does not help either... currently the READER partition is mounted as

Code:
/dev/sdj on /run/media/user/READER type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=continue,uhelper=udisks2)
but still the same error in in the logfile as above listed.

Any other ideas?
bRick57720 is offline   Reply With Quote
Advert
Old 03-19-2017, 08:08 AM   #6
bRick57720
Junior Member
bRick57720 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2017
Device: PRS-650
This seems to be a Fedora problem: I booted an old laptop with Xubuntu 12.04 32bit, installed Calibre 2.78 32bit binaries and it connects to the PRS-650 immediately.

Any advice would be highly appreciated as I am slowly running out of ideas...
bRick57720 is offline   Reply With Quote
Old 03-19-2017, 08:10 AM   #7
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,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre tests if a partition is readonly on linux by actually trying to write a file to it. So if it thinks your READER partition is readonly it is because either:

1) It is readonly
2) It has filesystem errors
3) It has incorrect permissions that prevent writing of files in the root directory
4) It is formatted as FAT32 and has reached the max number of files allowed in the root directory

ANd you can get more detail on the device detection process by running

calibre-debug -d
kovidgoyal is offline   Reply With Quote
Old 03-19-2017, 08:49 AM   #8
bRick57720
Junior Member
bRick57720 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2017
Device: PRS-650
@kovidgoyal, thanks again for your help! I ran "calibre-debug -d" and the output seems to indicate my first guess, that Calibre is struggling with the read-only SETTING partition:

Code:
Looking for devices...
USBDevice(busnum=1, devnum=9, vendor_id=0x054c, product_id=0x031e, bcd=0x031a, manufacturer=Sony, product=Sony Digital Book Reader, serial=08004610011DE1F5)
		Detected possible device PRS505
 
Devices possibly connected: SONY Device Interface,  
Trying to open SONY Device Interface ... 
Found device nodes: /dev/sdm None None

The mountpoint /run/media/user/SETTING/ is readonly, ignoring it

Found device nodes: /dev/sdm None None

The mountpoint /run/media/user/SETTING/ is readonly, ignoring it
failed
Opening of the following devices failed
<calibre.devices.prs505.driver.PRS505 object at 0x7f71e28c5910>
Traceback (most recent call last):
  File "/usr/lib64/calibre/calibre/devices/__init__.py", line 158, in debug
    dev.open(det, None)
  File "/usr/lib64/calibre/calibre/devices/usbms/device.py", line 864, in open
    self.open_linux()
  File "/usr/lib64/calibre/calibre/devices/usbms/device.py", line 638, in open_linux
    self.filter_read_only_mount_points()
  File "/usr/lib64/calibre/calibre/devices/usbms/device.py", line 676, in filter_read_only_mount_points
    %self.__class__.__name__)
DeviceError: Hauptspeicher von PRS505 ist schreibgeschützt. Dies passiert üblicherweise aufgrund von Fehlern im Dateisystem.
The output is correct as SETTING is readonly, but Calibre does not find the READER partition (/dev/sdj). Also manually unmounting the SETTING partition does not help as Calibre somehow forces the OS to remount the SETTING partition (I did a umount, SETTING was not mounten, ran calibre-debug -d which produced the same output as above and afterwards SETTING was mounted again).

Thanks again for your patience!
bRick57720 is offline   Reply With Quote
Old 03-19-2017, 09:13 AM   #9
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,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If it is not able to find any device nodes other than the settings partition, then sysfs/the usbms kernel driver on your system is broken. Trying to debug that involves running calibre from source. See the find_device_nodes() function in usbms/device.py in the calibre source code.

Or just use the connect to folder function in calibre instead.
kovidgoyal is offline   Reply With Quote
Old 03-19-2017, 11:17 AM   #10
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,171
Karma: 8800000
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Are you using the disto version of calibre? Try downloading and calibre 2.82.
Next try downgrade your kennel to a lower version, I see you are at kennel 4.9.13 and Fedora shipped with 4.5.5, yes I have had kennel issues in the past with drivers not working.

bernie
gbm is offline   Reply With Quote
Old 03-21-2017, 05:09 PM   #11
bRick57720
Junior Member
bRick57720 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2017
Device: PRS-650
kovidgoyal, gbm - thanks for your suggestions. I tried the latest Calibre binary version 2.82 64bit which did not connect to the PRS-650 as well. So I downgraded the kernel to 4.5.5 and voilà - it works. So it definitely is a kernel-issue.
As the 4.5.5 kernel did not work well with my desktop environment I will stick to the latest kernel 4.9.13, but at least I know that it's solely the kernel.

@kovidgoyal I wonder if more users of Calibre will experience this problem when the relevant kernel update e.g. ships in Ubuntu which is much more wide spread than Fedora - what do you think?
bRick57720 is offline   Reply With Quote
Old 03-21-2017, 09:13 PM   #12
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,171
Karma: 8800000
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by bRick57720 View Post
kovidgoyal, gbm - thanks for your suggestions. I tried the latest Calibre binary version 2.82 64bit which did not connect to the PRS-650 as well. So I downgraded the kernel to 4.5.5 and voilà - it works. So it definitely is a kernel-issue.
As the 4.5.5 kernel did not work well with my desktop environment I will stick to the latest kernel 4.9.13, but at least I know that it's solely the kernel.

@kovidgoyal I wonder if more users of Calibre will experience this problem when the relevant kernel update e.g. ships in Ubuntu which is much more wide spread than Fedora - what do you think?
You can try the 4.9.16 kernel it is the stable with all the back-ports and patches(hopefully). Mint does not have the 4.5.* kernels in the depositary, go from 4.4 to 4.8.

https://www.kernel.org/


bernie

look at this bug report--has been patched in stable.

http://lkml.iu.edu/hypermail/linux/k...3.2/00562.html

Last edited by gbm; 03-21-2017 at 09:19 PM.
gbm is offline   Reply With Quote
Old 03-21-2017, 10:21 PM   #13
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,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I use 4.9.11 and havent seen any problems, although I no longer have a SONY device to test with, my other devices continue to work fine with it.

Not sure what I can do about kernel bugs in any case. Though generally speaking Linus is very good about not breaking userspace in kernel updates, so hopefully the bug will be fixed soonish.
kovidgoyal is offline   Reply With Quote
Old 04-19-2017, 05:57 PM   #14
bRick57720
Junior Member
bRick57720 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2017
Device: PRS-650
Hello again,

I finally (meanwhile having updated to kernel 4.10.10) figured the reason why calibre could not access the reader: an external, fully encrypted USB HDD was connected producing the following dmesg output:

Code:
[ 5532.183684] sd 8:0:0:0: Attached scsi generic sg13 type 0
[ 5532.183738] sd 8:0:0:0: [sdm] 2930272256 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 5532.184150] sd 8:0:0:0: [sdm] Test WP failed, assume Write Enabled
[ 5532.184562] sd 8:0:0:0: [sdm] Asking for cache data failed
[ 5532.184567] sd 8:0:0:0: [sdm] Assuming drive cache: write through
[ 5532.243850]  sdm: sdm1
[ 5532.245721] sd 8:0:0:0: [sdm] Attached SCSI disk
[ 5532.408959] sd 8:0:0:0: [sdm] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[ 5532.408965] sd 8:0:0:0: [sdm] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[ 5532.408969] sd 8:0:0:0: [sdm] tag#0 Add. Sense: No additional sense information
Mounting the encrypted drive works fine and the partition is ok as well.

Calibre will recognize and connect to the Sony PRS-650 if the USB HDD is disconnect. Calibre does also recognize the PRS-650 after mounting the encrypted partition.

So I do not know what changed with kernel > 4.5.5 which at least for me was the last confirmed working kernel with the same encrypted USB HDD connected to the computer, but somehow an unmounted encrypted USB HDD is blocking calibre from connecting to the reader properly.

Long story short: anybody encountering the same problem might solve the problem by simply disconnecting other USB mass storage devices.

Thanks again, kovidgoyal and gbm, for your patience and suggestions.

Best,
bRick
bRick57720 is offline   Reply With Quote
Old 04-21-2017, 11:28 PM   #15
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by bRick57720 View Post
Mounting the encrypted drive works fine and the partition is ok as well.

Calibre will recognize and connect to the Sony PRS-650 if the USB HDD is disconnect. Calibre does also recognize the PRS-650 after mounting the encrypted partition.
The only time I have seen calibre ignore a device when a USB drive was connected is when the Tweak

# Specify a folder calibre should connect to at startup

was set to connect to a folder on that USB drive. Connecting to a folder treats a folder on the USB drive as a device and will ignore all other devices while it is connected. This was not the case for you or it would have showed up in the log you posted in the first post.

Since this was not the case I wonder if simply setting calibre to ignore the USB drive would work. Find this under Preferences - Sharing - Ignored devices. The USB drive would need to be connected in order for this setting to possibly work.

Thanks for sharing your solution.
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre will not recognise (Sony PRS 650) styxywyx Devices 39 08-03-2012 04:17 AM
A few questions about using Calibre with a Sony PRS-650 brophs Calibre 2 07-31-2011 10:05 AM
Calibre Filenames and Sony PRS-650 Uluhara Devices 8 05-29-2011 01:34 AM
disconnecting Sony PRS-650 from Calibre Arroll Calibre 8 01-18-2011 02:40 AM
Calibre and Sony PRS 650 eBook reader robertpolson Calibre 1 09-21-2010 01:44 PM


All times are GMT -4. The time now is 05:13 AM.


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