I suffer from the same problem
I Use debian 9.3, it is always at the current stable .
I Note that Fairphone2 with Open OS reports different usb Ids,
with Setting on Charging the report is
libmtp version: 1.1.13
Listing raw device(s)
Device 0 (VID=2ae5 and PID=f003) is a Fairphone Fairphone 2.
Found 1 device(s):
Fairphone: Fairphone 2 (2ae5:f003) @ bus 2, dev 2
Attempting to connect device(s)
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
ignoring libusb_claim_interface() = -6LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
Once USB is set to set to MTP : the output is
Device 0 (VID=2ae5 and PID=9039) is a Fairphone Fairphone 2 OS.
Available devices (busLocation, devNum, productId, vendorId, product, vendor):
2, 4, 0x9039, 0x2ae5, Fairphone 2 OS, Fairphone
So with Charging the output is different.
Only in developer mode !
I needed one week (calendar time ), work time was more like 16 hours to find all that out.
Stupid enough, I disconnect the usb cable and the setting MTP is gone.
The USB Cable I suspected defective works only in MTP mode for charging.
Another USB cable works always for charging !
I hope these hints help.
Best Regards Erich