Bug 393416 - Can't import pictures on MacOS High Sierra from SD card or camera
Summary: Can't import pictures on MacOS High Sierra from SD card or camera
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-MacOS (show other bugs)
Version: 7.2.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
: 396115 441170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-23 09:21 UTC by Glomme
Modified: 2024-09-17 20:18 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Error importing images from the camera (112.92 KB, image/png)
2018-04-23 09:21 UTC, Glomme
Details
Import Button (15.82 KB, image/png)
2018-04-26 11:34 UTC, Glomme
Details
Misc (227.86 KB, image/png)
2018-04-26 11:35 UTC, Glomme
Details
Camera setting (86.82 KB, image/png)
2018-04-26 12:20 UTC, Glomme
Details
Camera settings (206.72 KB, image/png)
2018-04-26 12:20 UTC, Glomme
Details
What I see in Finder (iMAC 2014) (128.72 KB, image/png)
2018-04-27 09:20 UTC, Glomme
Details
What I see in DK (iMAC 2014) (574.78 KB, image/png)
2018-04-27 09:21 UTC, Glomme
Details
USB Media on old iMAC (41.05 KB, image/jpeg)
2018-04-27 09:27 UTC, Glomme
Details
That happened when I click on the SD Card (41.49 KB, image/jpeg)
2018-04-27 09:27 UTC, Glomme
Details
Can't see SD Card (146.30 KB, image/png)
2018-05-01 14:53 UTC, Glomme
Details
solid-hardware5 list nonportableinfo (386.96 KB, text/plain)
2018-05-01 22:13 UTC, caulier.gilles
Details
solid-hardware5 list details (250.76 KB, text/plain)
2018-05-01 22:14 UTC, caulier.gilles
Details
Now 2 entries in the card reader menu (66.88 KB, image/png)
2018-05-13 14:50 UTC, Glomme
Details
example on OS X 10.9 with digiKam 5.9 (40.07 KB, image/png)
2018-05-13 15:05 UTC, RJVB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glomme 2018-04-23 09:21:01 UTC
Created attachment 112184 [details]
Error importing images from the camera

I can add my Fudji Fudjifilm X-T2 camera but after I click on it it say : Error connecting to camera. If I use the OSX program to import the pictures from the camera it works.
When I insert a SD Cam to my SD cam reader it will be not found in digicam but shown in the Finder.
I attached a screenshot from the camera import. (sorry only in german)
Comment 1 Glomme 2018-04-23 09:24:35 UTC
Sorry typo:
When I insert a SD card to my SD card reader it will be not found in digicam but shown in the Finder.
Comment 2 caulier.gilles 2018-04-23 09:34:35 UTC
did you use the official PKG installer ?

Gilles caulier
Comment 3 Glomme 2018-04-23 09:52:44 UTC
Yes, even though it only worked after the third attempt with the installation.
Comment 4 caulier.gilles 2018-04-23 09:53:50 UTC
What's the problem while installed 2 first times ?

Gilles Caulier
Comment 5 Glomme 2018-04-23 09:58:00 UTC
After all files were copied, it seemed to hang in an endless loop in the window which immediately after startup comes up where the version number is visible.
(Don't find a suitable word for it). After I deleted the created database (SQLite) by hand I could finally start digikam on the Mac.
Comment 6 caulier.gilles 2018-04-23 12:30:54 UTC
Ok, it's not an installer problem, it's a startup init problem with database.

Do you installed digiKam previously with an older database file on your computer, or it's a fresh install ?

Gilles Caulier
Comment 7 Glomme 2018-04-23 12:41:00 UTC
This is the first installation.
I had previously used Aperture on my computer and want to replace Aperture by digikam because it is no longer supported by Apple.


When I first installed digiKam, I thought it would take a little longer under OSX and waited for the installation to be completed, but it was never really finished.

Even after shutting down the software and restarting the software, nothing really changed  at this situation.
I uninstalled it with Appdelete to make sure that all digikam data is deleted from the hard disk.
Comment 8 Glomme 2018-04-23 12:42:24 UTC
Was fresh install. Never had it before on my iMAC.
Comment 9 Glomme 2018-04-26 10:53:33 UTC
Yes was a fresh install.
Comment 10 Maik Qualmann 2018-04-26 11:06:50 UTC
Can you look in the Setup-> Misc whether the native file dialog is activated? If the access to the SD drives over the file dialog is now possible?

Maik
Comment 11 Glomme 2018-04-26 11:34:19 UTC
Created attachment 112254 [details]
Import Button

What I see when I press the import button
Comment 12 Glomme 2018-04-26 11:35:14 UTC
Created attachment 112255 [details]
Misc

Misc settings I made (highlighted)
Comment 13 Glomme 2018-04-26 11:37:57 UTC
Also with the new setting I can't see the sd card what is inserted into the internal card reader from the iMAC.
I don't see anything by pressing on "Card reader" and also nothing under "USB memory device".
The only two ways are to copy pictures direct into one of the before created folders or to go over the dialogue "Add folder" / "Add picture"
Over this dialogue I can see also the card into the finder.
Comment 14 Glomme 2018-04-26 11:41:00 UTC
When I go to Digikam -> Preferences -> Cams and press onto "Automatic detection" the camera will be found and added. Only when I go then to import and choose the added camera it say that there is no camera also if the camera still connected and also can be found by the internal iMAC picture import tool.
Comment 15 caulier.gilles 2018-04-26 11:50:24 UTC
To Comment #14 : The problem is due to KDE::Solid interface used to detect automatically device and populate the Import menu. Solid API was recently updated with a better MacOS support, and i just find a way to build DK 6.0.0 PKG bundle with this code. Try the installer here to see if it work better than 5.x release.

https://files.kde.org/digikam/

Note : when you use setup dialog, the auto-detection pass by libgphoto2 interface. It's completely different and less powerful than Solid way. for ex, gphoto2 do not support fully the image preview for import icon view. Solid detect the camera as an USB Mass Storage device permit to process more background operations.
Comment 16 caulier.gilles 2018-04-26 12:02:36 UTC
Maik,

See my screenshot from my MacBook Pro with MacOS 10.13.4 :

https://www.flickr.com/photos/digikam/40815701755

The native dialog is used properly. I inserted a SDCard and with Import/Add Images, i can see the "NONAME" sd card contents. So this way work.

The autodetection through Solid API do not work, and it's normal. Look well in Components Info dialog, it's KF5 5.42, not the last one 5.45 including MacOS fixes in Solid.

I will rebuild the Mac bundle PKG today.

Gilles Caulier
Comment 17 Glomme 2018-04-26 12:19:24 UTC
Tried now also 6.0

digikam version 6.0.0-git
CPU cores: 8
Eigen: 3.3.4
Exiv2: 0.26
Exiv2 can write to Jp2: Ja
Exiv2 can write to Jpeg: Ja
Exiv2 can write to Pgf: Ja
Exiv2 can write to Png: Ja
Exiv2 can write to Tiff: Ja
Exiv2 supports XMP metadata: Ja
KF5: 5.42.0
LensFun: 0.3.2-0
LibCImg: 130
LibJPEG: 90
LibJasper: 2.0.12
LibLCMS: 2080
LibLqr support: Nein
LibPGF: 7.15.32
LibPNG: 1.6.30
LibRaw: 0.18.9
LibTIFF: 4.0.8
Marble: 0.27.20
MediaWiki support: Ja
Parallelized demosaicing: Keine
Qt: 5.8.0
VKontakte support: Nein
Datenbanktreiber: QSQLITE
LibAVCodec: 57.89.100
LibAVFormat: 57.71.100
LibAVUtil: 55.58.100
LibGphoto2: 2.5.14
LibOpenCV: 3.2.0
LibQtAV: 1.12.0
Unterstützung für Baloo: Nein
Unterstützung für DBus: Nein
Unterstützung für HTML-Galerie: Ja
Unterstützung für Kalender: Ja
Unterstützung für Medienwiedergabe: Ja
Unterstützung für Panorama: Ja
Unterstützung von Akonadi-Kontakten: Nein

Same result, the only way to add pictures (now) is over the "add pictures" and "add folder" import.

Other options not working.
Comment 18 Glomme 2018-04-26 12:20:06 UTC
Created attachment 112256 [details]
Camera setting

Add camera preferrence.
Comment 19 Glomme 2018-04-26 12:20:30 UTC
Created attachment 112257 [details]
Camera settings

Camera settings
Comment 20 caulier.gilles 2018-04-26 13:43:10 UTC
I just completed the new 6.0.0 PKG installer with last KF5 5.45 and Solid MacOS support. 

File is only at the same place. Please try again...

https://files.kde.org/digikam/

Gilles Caulier
Comment 21 Maik Qualmann 2018-04-26 16:47:22 UTC
Gilles, your Flickr image is private. I went with the file dialog to see if the access via images from directory import with mounted SD card works.

Maik
Comment 22 caulier.gilles 2018-04-26 17:42:41 UTC
I just fixed the access right to flickr screenshot.

Gilles
Comment 23 Glomme 2018-04-27 09:18:42 UTC
I tried it on two separate iMAC. One from 2010 and a newer one from 2014.
The older one I can see the SD Card but if I click on that it say : Failed to connect to camera also if there is no camera installed.
On the newer iMAC I can't see the SD Card only the internal hard drives.
I attached two screenshots from the newer iMAC (2014), what I can see in DK.
Comment 24 Glomme 2018-04-27 09:20:54 UTC
Created attachment 112279 [details]
What I see in Finder (iMAC 2014)

Finder view (card can be seen)
Comment 25 Glomme 2018-04-27 09:21:54 UTC
Created attachment 112280 [details]
What I see in DK (iMAC 2014)
Comment 26 Glomme 2018-04-27 09:27:03 UTC
Created attachment 112281 [details]
USB Media on old iMAC

SD Card view on old iMAC
Comment 27 Glomme 2018-04-27 09:27:47 UTC
Created attachment 112282 [details]
That happened when I click on the SD Card

Error messsage when I click on the SD Card to import pictures.
Comment 28 Maik Qualmann 2018-04-27 10:25:31 UTC
What kind of entries are in the digiKam menu under Card Reader in the newer iMAC (2014)? What happens when you go over "Bilder hinzufügen"?

Maik
Comment 29 Glomme 2018-05-01 14:52:12 UTC
Sorry for my late reply. 
When I go on the new mac it don't show the card reader (15GB) only the internal drive.
See also screenshot.
When I import pictures over "Add pictures" then I can choose the card and import all pictures I want / need in my database.
Comment 30 Glomme 2018-05-01 14:53:15 UTC
Created attachment 112345 [details]
Can't see SD Card
Comment 31 Maik Qualmann 2018-05-01 15:00:42 UTC
Is there no entry under Card Reader (Kartenleser)?

Maik
Comment 32 caulier.gilles 2018-05-01 16:38:57 UTC
Maik,

No entry inside Card Reader menu. I can reproduce the problem here with MacOS 10.13.4.

This is a problem with Solid, certainly in internal implmentation using MAcOS API to handle removable devices, written by René J.V. Bertin and published with recent KF5::Solid

René, I CC you in this file. We are near to find a suitable solution about removable device notification from MacoOS through Solid API. It need certainly few tune to use it with success with digiKam 6.0.0.

Please try the digiKam 6.0.0 MacOS PKG installer published here :

https://files.kde.org/digikam/

This one include last KF5 5.45 with your Solid patch for MacOS :

https://phabricator.kde.org/D7401?vs=25846&id=27395

When digiKam is installed and run, just insert a SD card to memory reader from your mac, and look the result into Import sub menus.

Thanks in advance

Gilles Caulier
Comment 33 RJVB 2018-05-01 17:03:44 UTC
I'll have a look but can't promise when. (What I can promise is that I won't be able to test anything on a newer Mac than I own (2011) or on 10.13 :-/)

Solid comes with a `solid-hardware` utility (possibly called solid-hardware5) which can be used to see what is being detected:

```
> solid-hardware list details
```

or

```
> solid-hardware list nonportableinfo
```

Does either output show something that you recognise as your card reader?

Do regular removable drives show up as such?
Comment 34 caulier.gilles 2018-05-01 22:13:48 UTC
Created attachment 112359 [details]
solid-hardware5 list nonportableinfo
Comment 35 caulier.gilles 2018-05-01 22:14:27 UTC
Created attachment 112360 [details]
solid-hardware5 list details
Comment 36 caulier.gilles 2018-05-01 22:18:30 UTC
René,

See my 2 traces from solid-hardware5 CLI tool.

The expected detected memory card in a FAT32 7.94Gb SanDisk card plugged directly in my Macbook pro 2012 card reader. The volume name is "Untitled"

As you can see, nothing appear in the traces about this card.

Gilles Caulier
Comment 37 RJVB 2018-05-02 00:10:26 UTC
Oh? Then what is the stuff from the details trace I copied below? ;)

At first glance this looks comparable to what I get on my own machine, which means that hopefully there hasn't been a hardware design change that I cannot reverse-engineer from here. It could help if you can still boot that same computer with an older OS X version, one where digiKam does show the SD card as it should.

udi = 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP01@1C/IOPP/SDXC@0,1/AppleSDXC/AppleSDXCSlot@1/AppleSDXCBlockStorageDevice/IOBlockStorageDriver/Apple SDXC Reader Media'
  parent = 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP01@1C/IOPP/SDXC@0,1/AppleSDXC/AppleSDXCSlot@1/AppleSDXCBlockStorageDevice/IOBlockStorageDriver'  (string)
  vendor = 'Apple'  (string)
  product = 'Built In SDXC Reader'  (string)
  description = 'Apple SDXC Reader Media'  (string)
  Block.major = 1  (0x1)  (int)
  Block.minor = 8  (0x8)  (int)
  Block.device = '/dev/disk2'  (string)
  StorageAccess.accessible = false  (bool)
  StorageAccess.filePath = ''  (string)
  StorageAccess.ignored = false  (bool)
  StorageDrive.bus = 'Usb'  (0x1)  (enum)
  StorageDrive.driveType = 'SdMmc'  (0x7)  (enum)
  StorageDrive.removable = true  (bool)
  StorageDrive.hotpluggable = true  (bool)
  StorageDrive.inUse = true  (bool)
  StorageDrive.size = 7948206080  (0x1d9c00000)  (qulonglong)
  StorageVolume.ignored = false  (bool)
  StorageVolume.usage = 'PartitionTable'  (0x3)  (enum)
  StorageVolume.fsType = ''  (string)
  StorageVolume.label = ''  (string)
  StorageVolume.uuid = ''  (string)
  StorageVolume.size = 7948206080  (0x1d9c00000)  (qulonglong)

udi = 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP01@1C/IOPP/SDXC@0,1/AppleSDXC/AppleSDXCSlot@1/AppleSDXCBlockStorageDevice/IOBlockStorageDriver/Apple SDXC Reader Media/IOFDiskPartitionScheme/Untitled 1@1'
  parent = 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP01@1C/IOPP/SDXC@0,1/AppleSDXC/AppleSDXCSlot@1/AppleSDXCBlockStorageDevice/IOBlockStorageDriver/Apple SDXC Reader Media/IOFDiskPartitionScheme'  (string)
  vendor = 'Apple'  (string)
  product = 'Built In SDXC Reader'  (string)
  description = 'Untitled (Untitled 1)'  (string)
  Block.major = 1  (0x1)  (int)
  Block.minor = 9  (0x9)  (int)
  Block.device = '/dev/disk2s1'  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = '/Volumes/Untitled'  (string)
  StorageAccess.ignored = false  (bool)
  StorageVolume.ignored = false  (bool)
  StorageVolume.usage = 'FileSystem'  (0x2)  (enum)
  StorageVolume.fsType = 'msdos'  (string)
  StorageVolume.label = ''  (string)
  StorageVolume.uuid = ''  (string)
  StorageVolume.size = 7944011776  (0x1d9800000)  (qulonglong)
Comment 38 RJVB 2018-05-13 12:21:33 UTC
Also, digiKam 5.9.0 shows my SD card just fine (I only have one with a GUID partition scheme at the moment). To be more precise, I get 2 SD items in the import menu; one for the card reader device and one for the volume mounted from the inserted card. I presume that's because of the different way IOKit presents drives, disks and volumes, and evidently there's nothing to import from the former.
Comment 39 caulier.gilles 2018-05-13 13:09:12 UTC
To comment #37

>It could help if you can still boot that same computer with an older OS X >version, one where digiKam does show the SD card as it should.

No, i cannot. I use this computer to teach with a closed source software from Adobe which have been updated to work only with MacOS 10.13. I cannot use an older MacOS version easily.

Gilles Caulier
Comment 40 caulier.gilles 2018-05-13 13:11:01 UTC
Glomme,

Can you try the last 6.0.0 PKG installer that i published as pre-release bundle. This one is now compiled under MacOS 10.13, not a VM with MacOS 10.10.

File is available here :

https://files.kde.org/digikam/

Thanks in advance for your feedback.

Gilles Caulier
Comment 41 RJVB 2018-05-13 14:36:26 UTC
> Glomme,
??

Will that installer run on 10.9?

FWIW, Macs have always been extremely easy to boot off an external disk holding a clone of an older OS - with OS X you can use Carbon Copy Cloner to make a bootable clone. And that doesn't have to be on the same computer; you might even be able to clone your 10.10 VM onto an external drive and use that to boot an actual Mac.
Comment 42 caulier.gilles 2018-05-13 14:42:33 UTC
yes, PKG has a backward compatibility with MacOS 10.8. Macports and XCode are set in this way.

If you want to see how i build the PKG, please take a look here :

https://github.com/KDE/digikam/tree/master/project/bundles/macports

Gilles Caulier
Comment 43 Glomme 2018-05-13 14:48:29 UTC
(In reply to caulier.gilles from comment #40)
> Glomme,
> 
> Can you try the last 6.0.0 PKG installer that i published as pre-release
> bundle. This one is now compiled under MacOS 10.13, not a VM with MacOS
> 10.10.

I installed it and it works. Can see under card reader 2x the SD card. (See screenshot)

The only thing is when you click on the first entry it say: Camera not connected (red bar on the bottom)
If you click on the second entry (s. screenshot) you are able to import the pictures.

Installed it unter OSX 10.13
Comment 44 Glomme 2018-05-13 14:50:03 UTC
Created attachment 112617 [details]
Now 2 entries in the card reader menu

After installing the latest version (V6) I can see now the sd card in the card reader menu.
Comment 45 caulier.gilles 2018-05-13 14:59:56 UTC
Glomme,

Thanks for the feedback. This confirm that we need to compile the PKG with last MacOS to see the feature fully functional.

Gilles Caulier
Comment 46 RJVB 2018-05-13 15:05:19 UTC
Created attachment 112618 [details]
example on OS X 10.9 with digiKam 5.9

Good, apparently there was indeed a small regression in digiKam.

I've attached what I get (yes, that's on a Mac, with the menubar set to be in the window, and using my personal QtCurve theme).

Notice how the 2nd, "business" entry has the name of the volume, and how the English text is a little bit more appropriate than the German translation - though in fact the card reader is neither "at" nor "under" the mountpoint of the volume on the card in the reader. Something like `"VolumeName" in "SD / MMC Card Reader"` would be more appropriate IMHO.

I also notice that digiKam doesn't detect neither card insertion nor removal.
Comment 47 caulier.gilles 2018-08-21 19:50:33 UTC
Glomme,

Using a SD card is possible when you switch on the "Use NAtive file dialog " option from Setup/Miscs section from DK.

Launch Import/Images menu and select the right SD card folder to parse with Import tool.

The Gphoto2 import directly with the camera can be problematic. It's relevant of libgphoto2 and i don't know how this library support MacOS.

Gilles Caulier
Comment 48 caulier.gilles 2018-08-22 12:28:13 UTC
To RJVB, comment #46

>I also notice that digiKam doesn't detect neither card insertion nor removal.

This is the lead problem. There is no notification from Solid when i plug a SD card in my Macbook pro 2012.

It's not a digiKam dysfunction. The problem is in Solid, as no notification can be show in a terminal when i run unit test "solid-hardware5 listen". Nothing appear under MacOS, where a notification is visible under Linux.

So, there is a bug or something is missing in you AppleKit support code from Solid, i fear...

PS : in current digiKam 6.0.0 source code, i plug more debug trace with the Solid API wrapper to see if notifications are visible, as with "solid-hardware5 listen". To run this debug traces, just run digiKam from a terminal.

Gilles Caulier

Gilles
Comment 49 RJVB 2018-08-23 07:54:25 UTC
I'm far away from my Mac and development environment, but I do not recall seeing anything in the code I adapted nor in the skeleton code that suggests notification support. IOW, all I recall working on is code that reads out the current state.

But I never claimed that I made a full implementation, on the contrary.
Comment 50 RJVB 2018-08-23 08:03:13 UTC
> The Gphoto2 import directly with the camera can be problematic. It's
> relevant of libgphoto2 and i don't know how this library support MacOS.

I think it does or is supposed to, but it isn't straightforward. In fact, I think it mostly does not work (not from digiKam in any case), and I wouldn't be surprised if the application has to be signed in order for it to be allowed to communicate with an iPhone.

I do know that even Apple's "Image Capture" utility has issues accessing the photos on my current iPhone under the latest iOS version. I always forget the exact order of operations to see the photo library; I think it's 1) launch Image Capture 2) connect (locked) phone 3) unlock the phone when Image Capture complains about the lock.
Comment 51 caulier.gilles 2020-12-18 12:10:45 UTC
https://bugs.kde.org/show_bug.cgi?id=426938

--- Comment #4 from caulier.gilles@gmail.com ---
Hi,

digiKam 7.2.0-beta2 pre-release PKG installer now support BigSur and is
compiled with last stable Qt 5.15.2.

https://files.kde.org/digikam/

Problem still reproducible with this version.

Thanks and happy Christmas in advance

Best Regards

Gilles Caulier
Comment 52 caulier.gilles 2021-01-08 16:05:20 UTC
Git commit c3077451a517fb160e0e25a9991a279948610500 by Gilles Caulier.
Committed on 08/01/2021 at 15:58.
Pushed by cgilles into branch 'master'.

Add new dialog with all devices detected by KF5::Solid hardware interface.
This will allow to investiguate about missing device detections, or wrong device types assignments in Solid interface, especially under Windows and macOS.
Related: bug 379970, bug 381729, bug 398166, bug 412466, bug 431107

M  +2    -1    core/app/main/digikamui5.rc
M  +2    -0    core/libs/dialogs/CMakeLists.txt
A  +327  -0    core/libs/dialogs/solidhardwaredlg.cpp     [License: GPL (v2+)]
A  +57   -0    core/libs/dialogs/solidhardwaredlg.h     [License: GPL (v2+)]
M  +11   -0    core/libs/widgets/mainview/dxmlguiwindow.cpp
M  +1    -0    core/libs/widgets/mainview/dxmlguiwindow.h
M  +2    -1    core/showfoto/main/showfotoui5.rc
M  +12   -0    core/tests/miscs/CMakeLists.txt
A  +41   -0    core/tests/miscs/solidhardware.cpp     [License: GPL (v2+)]
M  +2    -1    core/utilities/imageeditor/main/imageeditorui5.rc
M  +3    -1    core/utilities/import/main/importui5.rc
M  +2    -1    core/utilities/lighttable/lighttablewindowui5.rc
M  +2    -1    core/utilities/queuemanager/main/queuemgrwindowui5.rc

https://invent.kde.org/graphics/digikam/commit/c3077451a517fb160e0e25a9991a279948610500
Comment 53 caulier.gilles 2021-01-09 19:22:49 UTC
Git commit 1d69260946da53b92067105224468723482e2f8c by Gilles Caulier.
Committed on 09/01/2021 at 19:20.
Pushed by cgilles into branch 'master'.

Solid Hardware resume dialog. Use real tree-view to display list of devices and properties.
Implement search and copy to clipboard for hacking purpose and help end users to report problem in bug files.
Add Refresh button to list new hot-plugged hardwares.
Related: bug 379970, bug 381729, bug 398166, bug 412466, bug 431107

M  +171  -183  core/libs/dialogs/solidhardwaredlg.cpp
M  +2    -0    core/libs/dialogs/solidhardwaredlg.h

https://invent.kde.org/graphics/digikam/commit/1d69260946da53b92067105224468723482e2f8c
Comment 54 caulier.gilles 2021-01-09 19:34:07 UTC
To RJVB,

Hi René and Happy new year.

I implemented a dialog with a full list of devices detected by Solid framework include portable and non-portable properties. This dialog is available in digiKam/Showfoto Help menu and can help end users to reports information easily and quickly about Solid devices detection on all platform. 

https://i.imgur.com/aG3Sb5r.png

My goal is to see the macOS and Windows digiKam port running perfectly as under Linux.

With this king of tool, it will help to investigate about not handled device has SD-card reader, USB external drive, or camera for ex.

Did you continue to work on Solid support for macOS ?

My best

Gilles Caulier
Comment 55 RJVB 2021-01-09 21:44:56 UTC
Hi Gilles,

Better new year to you too (I'm calling it 2020bis for the time being...) ;)

No, I haven't contined work on the Mac backend for Solid. I was under the impression that I mapped just about all the relevant information IOKit provides. Someone else is currently working on support for encrypted disks but I'd guess that that isn't really relevant for digiKam.
Comment 56 caulier.gilles 2021-01-10 16:10:10 UTC
Git commit cdee9fb951c3f1b3aa354535174eb7c232a241eb by Gilles Caulier.
Committed on 10/01/2021 at 16:02.
Pushed by cgilles into branch 'master'.

Solid info dialog: add new tab with hotplug device events.
With this kind of tool, we can idenitfy quickly which device with properties is plug/unplug and detected by Solid framework.
As exemple, in this screenshoot, see my Iphone 7 connected and disconnected from USB port: https://i.imgur.com/dfL1Grs.png
Of course, if nothing happen in this view, this want mean that device is not recognized at all from Solid framework,
and end-user need to report this problem to Solid team.
Related: bug 379970, bug 381729, bug 398166, bug 412466, bug 431107

M  +14   -4    core/libs/dialogs/infodlg.cpp
M  +5    -4    core/libs/dialogs/infodlg.h
M  +96   -3    core/libs/dialogs/solidhardwaredlg.cpp
M  +3    -0    core/libs/dialogs/solidhardwaredlg.h

https://invent.kde.org/graphics/digikam/commit/cdee9fb951c3f1b3aa354535174eb7c232a241eb
Comment 57 caulier.gilles 2021-01-10 18:51:56 UTC
René,

It's clear. Unlike with a Linux based computer, Solid do not detect my iphone and a SDCard pluged to my 2 macbook pro (one 2015 with BigSur, other one 2012 with Catalina).

My Solid test dialog do not report anything about hot plug device. Under Linux all work as expected.

So, i'm sure that something is missing in Solid backend for macOS.

How can we continue this story to hack, debug, patch Solid in the right way ?

Best

Gilles Caulier
Comment 58 caulier.gilles 2021-01-10 18:55:23 UTC
René,

In KDE bugzilla, why Solid project do not have a libsolid-macos section ? there is one libsolid-windows after all...

This want mean that Solid do not support officially macOS, and nothing will be improved in the future to support this platform ?

Are you in contact with Solid team ?

Gilles
Comment 59 RJVB 2021-01-10 22:17:41 UTC
I indeed did not implement any kind of event handling, if memory serves me well the backend just queries the current state. My argument was that there was little reason to implement event handling (or indeed support for many of the other things Solid does on Linux) because that is mostly interesting for the desktop shell and possibly "system utilities" that are tightly integrated with that shell. On Mac (and MSWin), there are a priori only KDE applications, and the consensus among the KDE team is that this is how it should be - they don't even approve of the idea to make the system-settings app available, some even object to providing DrKonqi.

This suited me because I hardly know IOKit myself, and I didn't really see the added value to dive in and become an expert on it.

I'm pretty certain I tested if SD cards were detected; IIRC they show up as any other volume does. FWIW, you must have noticed that IOKit doesn't use the same abstraction for disks and volumes; this is quite clear in the Dolphin sidebar. I can't remember the exact difference right now, but I do remember that there wasn't really a way around it, not if I wanted to support the different categories Solid supports.

Digikam shouldn't have a need to be informed immediately and with minimal overhead when a device becomes available, I think. You should be able to work around the missing events by using "aboutToXX" signals to get current information about available devices for populating menus or lists. And possibly by setting a KDirWatch on album directories on removable devices (if memory serves me well you can set a watch on a non-existent directory and get a creation event when it is created).

I guess I could take a look at how complicated it would be to add support for device events to the Mac backend. I'm handicapped here by the fact that my sole Mac still runs 10.9.5 which I don't really plan to upgrade enough to be able to run the Qt version that is required by the latest KF5 frameworks. I'm a bit tired of spending lots of time upgrading every few weeks. Maybe Solid still builds against Qt 5.9; if not I'd be developing for KF5 5.60 and someone else would need to incorporate it in git/master.

I'm not in touch with the Solid team (if such a team exists). The bugtracker is managed by a separate team as far as I know, it would have been up to them to notice that there should be a libsolid-mac section.

Re: iPhone: doesn't accessing those require a different library which probably has its own event hooks?! iDevices do not appear as disks/volumes on Mac, so my Solid backend does not have support for them.
Comment 60 Maik Qualmann 2021-08-19 14:22:26 UTC
*** Bug 441170 has been marked as a duplicate of this bug. ***
Comment 61 Maik Qualmann 2021-08-19 14:23:09 UTC
*** Bug 396115 has been marked as a duplicate of this bug. ***
Comment 62 caulier.gilles 2024-09-17 20:01:06 UTC
Hi all,

Good news from my current test with the new digiKam 8.5.0 pre-release macOS PKG installer for Apple Silicon (arm64). It's Qt 6.7.2 and KDE frameworks 6.5.0 based, and the detection of SD card work as expected on my macbook pro M1 2021.

I plug a TOSHIBA 4 Gb Fat32 SD card in the computer. This one was previously used by a digital still camera. Note that the grant access to disk is given to digiKam application in the macOS control panel :

https://i.imgur.com/Faq1Xl6.png

I start digiKam and look if the SD card is detected by KDE::Solid. As you can see, yes, it's works:

https://i.imgur.com/4afO0xv.png

Now, i start the import tool and the SD card contents appears, and i can play with it as expected :

https://i.imgur.com/LopnPco.png

KDE::Solid do not work as under Linux, as for exemple, the SD card detection do not work. I must plug the card before to run digiKam.

There are plenty of signals/slots connection broken at start up of digiKam from the Solid API. this can explain perhaps the problem :

digikam.coredb: Core database: have a structure version  16
digikam.coredb: Core database: makeUpdates  16  to  16
digikam.database: Creating new Location  "/Users/gilles/Pictures"  uuid  "volumeid:?uuid=b4763aae-bedc-4fa9-b761-c36e884340bb&fileuuid=96021973-a760-4310-8a42-d92986e37e48"
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairRequested(QString)
qt.core.qobject.connect: QObject::connect: No such signal Solid::Backends::IOKit::IOKitStorageAccess::repairDone(Solid::ErrorType, QVariant, QString)
digikam.database: Found Location "/System/Volumes/Data/Users/gilles/Pictures" with file uuid "96021973..."
digikam.database: Location for "/System/Volumes/Data/Users/gilles/Pictures" is available: true => case sensitivity: 1
digikam.general: Allowing a cache size of 983 MB

Rene, i remeber your work on the Solid framework to support macOS. Well if these signals/slots connections can be fixed, this will be great...

Gilles Caulier
Comment 63 caulier.gilles 2024-09-17 20:18:21 UTC
To test the new digiKam 8.5.0 pre-release PKG installer for macOS Silicon (arm64), file is here:

https://files.kde.org/digikam/

Gilles Caulier