Bug 242902 - Plasma device notifier does not recognize exFAT USB drives
Summary: Plasma device notifier does not recognize exFAT USB drives
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: kde
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-27 01:19 UTC by Jason W. Bacon
Modified: 2020-01-19 09:51 UTC (History)
4 users (show)

See Also:


Attachments
FAT32 popup (23.52 KB, image/png)
2020-01-06 16:23 UTC, Jason W. Bacon
no flags Details
solid-hardware5 details (6.59 KB, text/plain)
2020-01-17 19:22 UTC, Max Brazhnikov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer 2019-12-27 01:19:49 UTC
If I plug in a FAT32 USB stick under Plasma, device notifier opens up and everything is peachy.

If I plug in an exFAT stick, I get nothing. The same exFAT stick will mount using autofs or sysutils/automounter under Lumina, but Plasma ignores it.

This is a pristine KDE install on 12.1-RELEASE.  fuse-exfat and exfat-utils are installed and the fusefs module is loaded.  From what I've found searching the web, that should be all that's necessary for device notifier to recognize an exFAT volume.

Is there something additional that needs to be done to make KDE recognize exFAT media?

FreeBSD manatee.acadix  bacon ~ 116: gpart show /dev/da0
=>       63  120127425  da0  MBR  (57G)
         63  120127425    1  ntfs  (57G)

FreeBSD manatee.acadix  bacon ~ 119: fstyp /dev/da0s1
exfat
Comment 1 Tobias C. Berner freebsd_committer 2019-12-27 04:33:06 UTC
Moin moin

Are you using bsdisks or hald


Mfg Tobias
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-27 06:17:06 UTC
What category/port is this issue likely/most appropriate for?
Comment 3 Tobias C. Berner freebsd_committer 2019-12-27 07:50:03 UTC
(In reply to Kubilay Kocak from comment #2)
https://www.freshports.org/devel/kf5-solid/
Comment 4 Jason W. Bacon freebsd_committer 2019-12-27 15:09:07 UTC
hald.  Everything installed via "pkg".  Thanks...
Comment 5 Jason W. Bacon freebsd_committer 2019-12-27 15:10:17 UTC
I tried building kf5-solid from source with bsdisks enabled + disable hald + reboot, but then it wouldn't even recognize my FAT32 drive.
Comment 6 commit-hook freebsd_committer 2020-01-03 09:35:07 UTC
A commit references this bug:

Author: arrowd
Date: Fri Jan  3 09:34:09 UTC 2020
New revision: 521919
URL: https://svnweb.freebsd.org/changeset/ports/521919

Log:
  sysutils/bsdisks: Update to 0.12.

  Add support for exfat FS.

  PR:		242902

Changes:
  head/sysutils/bsdisks/Makefile
  head/sysutils/bsdisks/distinfo
Comment 7 Gleb Popov freebsd_committer 2020-01-03 09:47:51 UTC
(In reply to Jason W. Bacon from comment #5)

This is strange. What's the output of `solid-hardware5 list`?
Comment 8 Jason W. Bacon freebsd_committer 2020-01-03 14:39:43 UTC
Still running hald:

Comparison with FAT32 or exFAT device plugged in:

FreeBSD manatee.acadix  bacon ~ 136: diff fat32 exfat 
2,8c2,6
< udi = '/org/freedesktop/Hal/devices/volume_uuid_4A7E_1306'
< udi = '/org/freedesktop/Hal/devices/volume_part2_size_8019476992'
< udi = '/org/freedesktop/Hal/devices/storage_serial_5A08100192367'
< udi = '/org/freedesktop/Hal/devices/usb_device_54c_243_5A08100192367_if0_scsi_host_scsi_device_lun0'
< udi = '/org/freedesktop/Hal/devices/usb_device_54c_243_5A08100192367_if0_scsi_host'
< udi = '/org/freedesktop/Hal/devices/usb_device_54c_243_5A08100192367_if0'
< udi = '/org/freedesktop/Hal/devices/usb_device_54c_243_5A08100192367'
---
> udi = '/org/freedesktop/Hal/devices/storage_serial_4C530001250504123444'
> udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444_if0_scsi_host_scsi_device_lun0'
> udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444_if0_scsi_host'
> udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444_if0'
> udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444'

Full output with exFAT:

FreeBSD manatee.acadix  bacon ~ 139: cat exfat
udi = '/org/kde/fstab'
udi = '/org/freedesktop/Hal/devices/storage_serial_4C530001250504123444'
udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444_if0_scsi_host_scsi_device_lun0'
udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444_if0_scsi_host'
udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_781_5581_4C530001250504123444'
udi = '/org/freedesktop/Hal/devices/pcm_0_oss_mixer_0'
udi = '/org/freedesktop/Hal/devices/pcm_0_oss_pcm_0'
udi = '/org/freedesktop/Hal/devices/pcm_1_oss_mixer_1'
udi = '/org/freedesktop/Hal/devices/pcm_1_oss_pcm_1'
udi = '/org/freedesktop/Hal/devices/net_00_1f_e2_1a_1d_c0'
udi = '/org/freedesktop/Hal/devices/volume_part2_size_524288_block'
udi = '/org/freedesktop/Hal/devices/volume_part2_size_524288'
udi = '/org/freedesktop/Hal/devices/volume_part3_size_155692040192'
udi = '/org/freedesktop/Hal/devices/storage_serial_100830PCKB04VNH83G2K_block'
udi = '/org/freedesktop/Hal/devices/storage_serial_100830PCKB04VNH83G2K'
udi = '/org/freedesktop/Hal/devices/computer_scsi_host_scsi_device_lun0'
udi = '/org/freedesktop/Hal/devices/computer_scsi_host'
udi = '/org/freedesktop/Hal/devices/storage_model_DVD_CDRW_UJDA775'
udi = '/org/freedesktop/Hal/devices/ide_host_0_scsi_host_scsi_device_lun0'
udi = '/org/freedesktop/Hal/devices/ide_host_0_scsi_host'
udi = '/org/freedesktop/Hal/devices/usb_device_17ef_1003_noserial_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_17ef_1003_noserial'
udi = '/org/freedesktop/Hal/devices/usb_device_483_2016_noserial_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_483_2016_noserial'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_5_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_5'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_4_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_4'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_3_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_3'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_2_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_2'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_1_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_1'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_0_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial_if0'
udi = '/org/freedesktop/Hal/devices/usb_device_0_0_noserial'
udi = '/org/freedesktop/Hal/devices/acpi_acad_0'
udi = '/org/freedesktop/Hal/devices/acpi_button_0'
udi = '/org/freedesktop/Hal/devices/acpi_lid_0'
udi = '/org/freedesktop/Hal/devices/acpi_tz_0'
udi = '/org/freedesktop/Hal/devices/acpi_tz_1'
udi = '/org/freedesktop/Hal/devices/ide_host_0'
udi = '/org/freedesktop/Hal/devices/atkbd_0'
udi = '/org/freedesktop/Hal/devices/battery_0'
udi = '/org/freedesktop/Hal/devices/cardbus_0'
udi = '/org/freedesktop/Hal/devices/cpu_0'
udi = '/org/freedesktop/Hal/devices/cpu_1'
udi = '/org/freedesktop/Hal/devices/pccard_0'
udi = '/org/freedesktop/Hal/devices/pcm_0'
udi = '/org/freedesktop/Hal/devices/pcm_1'
udi = '/org/freedesktop/Hal/devices/psm_0'
udi = '/org/freedesktop/Hal/devices/atkbdc_0'
udi = '/org/freedesktop/Hal/devices/usbus_0'
udi = '/org/freedesktop/Hal/devices/usbus_1'
udi = '/org/freedesktop/Hal/devices/usbus_2'
udi = '/org/freedesktop/Hal/devices/usbus_3'
udi = '/org/freedesktop/Hal/devices/usbus_4'
udi = '/org/freedesktop/Hal/devices/usbus_5'
udi = '/org/freedesktop/Hal/devices/usbus_6'
udi = '/org/freedesktop/Hal/devices/pci_8086_2a00'
udi = '/org/freedesktop/Hal/devices/pci_8086_2a02'
udi = '/org/freedesktop/Hal/devices/pci_8086_2a03'
udi = '/org/freedesktop/Hal/devices/pci_8086_1049'
udi = '/org/freedesktop/Hal/devices/pci_8086_2834'
udi = '/org/freedesktop/Hal/devices/pci_8086_2835'
udi = '/org/freedesktop/Hal/devices/pci_8086_283a'
udi = '/org/freedesktop/Hal/devices/pci_8086_284b'
udi = '/org/freedesktop/Hal/devices/pci_8086_283f'
udi = '/org/freedesktop/Hal/devices/pci_8086_4230'
udi = '/org/freedesktop/Hal/devices/pci_8086_2841'
udi = '/org/freedesktop/Hal/devices/pci_8086_2843'
udi = '/org/freedesktop/Hal/devices/pci_8086_2845'
udi = '/org/freedesktop/Hal/devices/pci_8086_2847'
udi = '/org/freedesktop/Hal/devices/pci_8086_2830'
udi = '/org/freedesktop/Hal/devices/pci_8086_2831'
udi = '/org/freedesktop/Hal/devices/pci_8086_2832'
udi = '/org/freedesktop/Hal/devices/pci_8086_2836'
udi = '/org/freedesktop/Hal/devices/pci_1180_0476'
udi = '/org/freedesktop/Hal/devices/pci_1180_0832'
udi = '/org/freedesktop/Hal/devices/pci_1180_0822'
udi = '/org/freedesktop/Hal/devices/pci_1180_0843'
udi = '/org/freedesktop/Hal/devices/pci_1180_0592'
udi = '/org/freedesktop/Hal/devices/pci_1180_0852'
udi = '/org/freedesktop/Hal/devices/pci_8086_2448'
udi = '/org/freedesktop/Hal/devices/pci_8086_2811'
udi = '/org/freedesktop/Hal/devices/pci_8086_2850'
udi = '/org/freedesktop/Hal/devices/pci_8086_2829'
udi = '/org/freedesktop/Hal/devices/pci_8086_283e'
udi = '/org/freedesktop/Hal/devices/computer'
udi = '/org/freedesktop/UPower'
udi = '/org/freedesktop/UPower/devices/battery_devxbatteryx0'
udi = '/org/freedesktop/UPower/devices/line_power_hwxacpixacline'
Comment 9 Gleb Popov freebsd_committer 2020-01-03 14:53:54 UTC
If you want to try bsdisks:

1. Build Solid with BSDISKS on.
2. Remove hald_enable="YES" from /etc/rc.conf
3. Exit Plasma and launch it again.

This should make Solid pick up bsdisks as backend.
Comment 10 Jason W. Bacon freebsd_committer 2020-01-03 15:43:23 UTC
Is bsdisks going to be the default in the near future?  I'd be happy to ditch hal as soon as it's feasible.

I'll test it again since the last commit, but we'll a configuration that survives pkg upgrade.

Thanks.
Comment 11 Tobias C. Berner freebsd_committer 2020-01-03 16:59:59 UTC
(In reply to Jason W. Bacon from comment #10)
Yes the plan is to switch the default soon.


Mfg Tobias
Comment 12 Serge Volkov 2020-01-05 17:58:38 UTC
(In reply to Tobias C. Berner from comment #11)

I understand that the HAL is out of date. But I think switching to using the bsdisks now is not a good idea.

When using the bsdisks, the Plasma5 Device Notifier shows 'No Devices Available'. And the connected device can be seen only by opening the Dolphin. It is not comfortable. See screenshot http://www.ulbsd.ru/devel/notifier_bsdisks.png

When using the HAL, the Plasma5 Device Notifier shows connected devices. And with the connected device, I can perform some actions. It is very comfortable.
When using the HAL, I can very easily connect devices with UFS, FAT, FAT32, NTFS (with my patches) file systems and CD/DVD disks. See screenshot http://www.ulbsd.ru/devel/notifier_hal.png

Maybe I don’t know something and the bsdisks can be integrated with the Plasma5 Device Notifier?
Comment 13 Gleb Popov freebsd_committer 2020-01-05 18:02:38 UTC
(In reply to Serge Volkov from comment #12)

Connected Devices list works fine with bsdisks for me.

You probably have kf5-solid compiled without BSDISKS option. You can also verify that by running `solid-hardware5 list`. The command's output should contain UDisks entries.
Comment 14 Serge Volkov 2020-01-05 18:25:13 UTC
(In reply to Gleb Popov from comment #13)

I have kf5-solid compiled with BSDISKS option. da0 device is connected and `solid-hardware5 list` shows it. But Device Notifier shows 'No Devices Available'. See screenshot http://www.ulbsd.ru/devel/notifier_hardware_list.png

Maybe I have not installed all the necessary packages? Or maybe I need to make any additional settings in Plasma5?
Comment 15 Gleb Popov freebsd_committer 2020-01-05 19:20:25 UTC
(In reply to Serge Volkov from comment #14)

Hum, strange. And if you run `solid-hardware5 listen` and then insert/remove the flash disk, do you see any events coming?
Comment 16 Serge Volkov 2020-01-05 19:53:53 UTC
(In reply to Gleb Popov from comment #15)

Events are coming. But Plasma5 Device Notifier is silent.

user@ulbsd:~ % solid-hardware5 listen
QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory
Listening to add/remove events: 
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0'
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0'
Device Removed:
udi = '/org/freedesktop/UDisks2/drives/da0'
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/drives/da0'
Comment 17 Jason W. Bacon freebsd_committer 2020-01-06 02:36:39 UTC
Trying again with bsdisks, solid-hardware5 listen shows events, but device notifier does not respond to FAT32 or exFAT drives.  The icon is always in the tray, but just shows "Most Recent Device CDROM".

hald is disabled.

Is there anything else that needs to be configured?  PolicyKit?

Anything besides kf5-solid that needs to be rebuilt?

FreeBSD manatee.acadix  bacon ~ 159: solid-hardware5 listen
QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory
Listening to add/remove events: 
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/drives/da0'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
org.kde.solid.udisks2: Error getting props: "org.freedesktop.DBus.Error.UnknownObject" "No such object path '/org/freedesktop/UDisks2/block_devices/da0'"
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0'
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0'
Device Removed:
udi = '/org/freedesktop/UDisks2/drives/da0'
org.kde.solid.udisks2: Error getting props: "org.freedesktop.DBus.Error.UnknownObject" "No such object path '/org/freedesktop/UDisks2/block_devices/da0s1'"
org.kde.solid.udisks2: Error getting props: "org.freedesktop.DBus.Error.UnknownObject" "No such object path '/org/freedesktop/UDisks2/block_devices/da0s1'"
org.kde.solid.udisks2: Error getting props: "org.freedesktop.DBus.Error.UnknownObject" "No such object path '/org/freedesktop/UDisks2/block_devices/da0s1'"
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
org.kde.solid.udisks2: Error getting props: "org.freedesktop.DBus.Error.UnknownObject" "No such object path '/org/freedesktop/UDisks2/block_devices/da0s1'"
org.kde.solid.udisks2: Error getting props: "org.freedesktop.DBus.Error.UnknownObject" "No such object path '/org/freedesktop/UDisks2/block_devices/da0s1'"
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Device Removed:
udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
Comment 18 Gleb Popov freebsd_committer 2020-01-06 08:02:02 UTC
I'm clueless what's wrong with your setup, guys.

Another thing to try:

- Make sure you have Plasma, KF and bsdisks packages up to date.
- Create a new user with empty home dir and run a Plasma session under it. This should give you default settings for all Plasma-related things. Maybe this will make difference.
Comment 19 Serge Volkov 2020-01-06 08:53:39 UTC
(In reply to Gleb Popov from comment #18)

I created a new user with empty home dir and started a Plasma5 session under it. All Plasma5 default settings is applied. But nothing has changed. All packages is up to date.

I think I need to recompile something else besides the kf5-solid. But what exactly?
Comment 20 Gleb Popov freebsd_committer 2020-01-06 09:48:58 UTC
(In reply to Serge Volkov from comment #19)
> I think I need to recompile something else besides the kf5-solid. But what exactly?

I'm pretty sure you don't need anything else.

Check "Removable devices" widget settings. Do you have "Only automatically mount media that has been manually mounted before" turned off?
Comment 21 Serge Volkov 2020-01-06 12:22:16 UTC
(In reply to Gleb Popov from comment #20)

I already have "Only automatically mount media that has been manually mounted before" turned off in "Removable devices" widget settings. See screenshot http://www.ulbsd.ru/devel/notifier_settings.png

However, Plasma5 Device Notifier not working.
Comment 22 Jason W. Bacon freebsd_committer 2020-01-06 15:31:37 UTC
My "only mount previous media" is also off.  I never touched any settings in there until now.

I tried turning on automatic mounting, but still no response.  If I understand correctly, this should not affect device notifier, but simply open a file manager automatically.

I also tried a fresh user account.

Does PolicyKit.conf matter?  I see that bsdisks installs a config file under dbus-1, but I would assume it should work from where it sits without modification.

Can you describe the process you use to produce a working configuration?  I.e. what packages do you install, what do you build from source and what options are selected, what services do you enable, what configuration file changes do you make if any, ...
Comment 23 Jason W. Bacon freebsd_committer 2020-01-06 15:32:39 UTC
And yes, all my packages were updated last night.
Comment 24 Gleb Popov freebsd_committer 2020-01-06 15:57:16 UTC
Judging from `solid-hardware5 listen` output, everything is fine on bsdisks side - it sees devices and notifies kf5-solid about them. Solid also catches these events and propagates them to consumers (solid-hardware5 in this case). So everything up to Removable Devices widget is working OK.

I have no idea what's wrong. I didn't do any special configuration on my machine, never touched polkit stuff.
Comment 25 Max Brazhnikov freebsd_committer 2020-01-06 15:58:58 UTC
With BSDISKS all my usb sticks are detected as non-removable drives, so I don't get plasma notifications until I set "Show all media" in the widget settings.
Comment 26 Jason W. Bacon freebsd_committer 2020-01-06 16:22:21 UTC
That helped some...  Looks like we need to tweak the default settings to show USB sticks.

Updated status:

I right-clicked the device notifier icon, selected "Configure device notifier", then selected "All devices".

Now when I insert a FAT32 thumb drive, Device Notifier pops up a window showing the device twice and the only option is "Download photos with Gwenview".

When I insert the exFAT drive notifier does not open a window automatically, but if I open it manually I see the drive (once), again with only the Gwenview option.
Comment 27 Jason W. Bacon freebsd_committer 2020-01-06 16:23:07 UTC
Created attachment 210479 [details]
FAT32 popup
Comment 28 Serge Volkov 2020-01-06 16:30:35 UTC
(In reply to Max Brazhnikov from comment #25)

Thanks for the help. I tried to set "All devices" in the Device Notifier widget settings. And it worked. Indeed, with BSDISKS all usb sticks are detected as non-removable drives. This is the problem.
Comment 29 Gleb Popov freebsd_committer 2020-01-07 18:54:15 UTC
Good catch, makc! Indeed, that's the source of the problem.

Now I have to figure out what makes the widget think that all those disks aren't removable, because bsdisks reports correct values for org.freedesktop.UDisks2.Drive.{Removable,Ejectable} properties.
Comment 30 Jason W. Bacon freebsd_committer 2020-01-07 19:42:30 UTC
Ugh...  I think the laptop I was testing on has hardware issues, so I tried another machine with KDE installed, but pkg upgrade broke it.

Looks like there's a problem with one of the KDE deps:

root@auerbsd:/home/bacon # pkg install kde5
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'kde5' have been found in the repositories

I'll report new device notifier results after this gets fixed.
Comment 31 Gleb Popov freebsd_committer 2020-01-07 19:50:06 UTC
(In reply to Jason W. Bacon from comment #30)
There is no "kde5" package. You're probably want "plasma5-plasma" one.
Comment 32 Jason W. Bacon freebsd_committer 2020-01-07 20:34:00 UTC
Seems like there should be:

FreeBSD orca.acadix  bacon ~ 944: auto-print-make-variable x11/kde5 PKGNAME
kde5-5.17.4.19.12.0

I've always used this metaport in the past.  The port is still there and not marked broken.
Comment 33 Gleb Popov freebsd_committer 2020-01-07 20:35:43 UTC
(In reply to Jason W. Bacon from comment #32)
Oh, hum. Sorry for confusing you, then.
Comment 34 Jason W. Bacon freebsd_committer 2020-01-07 20:38:32 UTC
Looks like dolphin is broken (from kde-baseapps from kde5).
Comment 35 Max Brazhnikov freebsd_committer 2020-01-07 21:58:23 UTC
(In reply to Gleb Popov from comment #29)

Below is a snippet from  `solid-hardware5 list' for one of my usb drive:

udi = '/org/freedesktop/UDisks2/block_devices/da0'
  parent = '/org/freedesktop/UDisks2/drives/da0'  (string)
  vendor = 'Generic Flash Disk'  (string)
  product = ''  (string)
  description = 'DISK-13722B26'  (string)
  icon = 'drive-removable-media'  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 0  (0x0)  (int)
  Block.device = '/dev/da0'  (string)
  StorageVolume.ignored = true  (bool)
  StorageVolume.usage = 'PartitionTable'  (0x3)  (enum)
  StorageVolume.fsType = ''  (string)
  StorageVolume.label = 'DISK-13722B26'  (string)
  StorageVolume.uuid = ''  (string)
  StorageVolume.size = 8178892800  (0x1e7800000)  (qulonglong)

udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
  parent = '/org/freedesktop/UDisks2/drives/da0s1'  (string)
  vendor = ''  (string)
  product = ''  (string)
  description = 'QFS'  (string)
  icon = 'drive-harddisk'  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 0  (0x0)  (int)
  Block.device = '/dev/da0s1'  (string)
  StorageAccess.accessible = false  (bool)
  StorageAccess.filePath = ''  (string)
  StorageAccess.ignored = true  (bool)
  StorageVolume.ignored = false  (bool)
  StorageVolume.usage = 'FileSystem'  (0x2)  (enum)
  StorageVolume.fsType = 'vfat'  (string)
  StorageVolume.label = 'QFS'  (string)
  StorageVolume.uuid = ''  (string)
  StorageVolume.size = 8178860032  (0x1e77f8000)  (qulonglong)

udi = '/org/freedesktop/UDisks2/drives/da0'
  parent = '/org/freedesktop/UDisks2'  (string)
  vendor = 'Generic Flash Disk'  (string)
  product = ''  (string)
  description = 'Generic Flash Disk'  (string)
  icon = 'drive-removable-media'  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 0  (0x0)  (int)
  Block.device = '/dev/da0'  (string)
  StorageDrive.bus = 'Platform'  (0x5)  (enum)
  StorageDrive.driveType = 'HardDisk'  (0x0)  (enum)
  StorageDrive.removable = true  (bool)
  StorageDrive.hotpluggable = false  (bool)
  StorageDrive.inUse = false  (bool)
  StorageDrive.size = 8178892800  (0x1e7800000)  (qulonglong)
Comment 36 Jason W. Bacon freebsd_committer 2020-01-08 17:12:02 UTC
I just finished a fresh 12.1-RELEASE + KDE install on an old desktop machine using sysutils/desktop-installer.

Using HAL, FAT32 devices are recognized, but I get a "Malformed URL" pop-up when selecting "Open with File Manager" on an unmounted device.  The mount succeeds, though, and selecting "Open with File Manager" a second time, I can see the contents.

exFAT devices are still not recognized.  Opening Device Notifier manually, I see "No devices available".

After reinstalling kf5-solid with bsddisks support, installing exfat-utils and fusefs-exfat, and enabling "All devices" in notifier, both FAT32 and exFAT drives are detected and mount cleanly.

It seems hald must remain running for other plasma components, or very weird things will happen when starting plasma.

So it seems we'll be in good shape once the "All devices" issue is resolved and kf5-solid defaults to bsdisks.
Comment 37 Gleb Popov freebsd_committer 2020-01-08 17:14:37 UTC
(In reply to Jason W. Bacon from comment #36)

> It seems hald must remain running for other plasma components, or very weird things will happen when starting plasma.


Can you elaborate on this? I don't have hald installed for a long time and don't see any weirdness.
Comment 38 Jason W. Bacon freebsd_committer 2020-01-08 17:37:47 UTC
After stopping hald (from a VT while not logged into plasma) and logging in, the GUI becomes unresponsive and no applications will launch.  When I tried switching to ttyv0 (Ctrl+Alt+F1), it started jumping back and forth between the VT and the GUI.  I had to tap the power button to shut down.

HAL is still a dependency for plasma5, so how could it not be installed?

root@auerbsd:/home/bacon # pkg remove hal
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 7 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	hal-0.5.14_34
	webcamd-5.3.7.1_1
	xf86-input-wacom-0.39.0
	xf86-input-evdev-2.10.6_4
	plasma5-plasma-desktop-5.17.4_2
	plasma5-plasma-5.17.4
	kde5-5.17.4.19.12.0

Number of packages to be removed: 7

The operation will free 42 MiB.

Proceed with deinstalling packages? [y/N]: n

After rebooting and allowing hald to start, everything seems to work fine with bsdisks-enabled kf5-solid.
Comment 39 Gleb Popov freebsd_committer 2020-01-08 17:41:40 UTC
(In reply to Jason W. Bacon from comment #38)

Hum, right, I also have hald installed. However, I don't have "hald_enable="YES"" in my rc.conf and no hal processes running. Plasma runs fine, neverthless.

Maybe GUI hangs you are seeing are VT-switching related? What if you simply remove hald entry from rc.conf and not run service at all?
Comment 40 Serge Volkov 2020-01-08 17:53:09 UTC
If I disable the hald service in rc.conf, then the plasma5 continues to work normally for me. There are no problems. But the hald service is needed for other things, for example, for webcamd. Therefore, even using bsdisks I do not disable the hald service.
Comment 41 Serge Volkov 2020-01-08 18:42:00 UTC
When I connect a USB pen stick using the hald service, I get this:

udi = '/org/freedesktop/Hal/devices/storage_serial_0423390000000239_block'
  parent = '/org/freedesktop/Hal/devices/storage_serial_0423390000000239'  (string)
  vendor = ''  (string)
  product = 'Block Device'  (string)
  description = 'Block Device'  (string)
  icon = ''  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 129  (0x81)  (int)
  Block.device = '/dev/da0s1'  (string)

udi = '/org/freedesktop/Hal/devices/storage_serial_0423390000000239'
  parent = '/org/freedesktop/Hal/devices/usb_device_90c_1000_0423390000000239_if0_scsi_host_scsi_device_lun0'  (string)
  vendor = 'General'  (string)
  product = 'USB Flash Disk'  (string)
  description = 'General USB Flash Disk'  (string)
  icon = 'drive-removable-media-usb'  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 128  (0x80)  (int)
  Block.device = '/dev/da0'  (string)
  StorageDrive.bus = 'Usb'  (0x1)  (enum)
  StorageDrive.driveType = 'HardDisk'  (0x0)  (enum)
  StorageDrive.removable = true  (bool)
  StorageDrive.hotpluggable = true  (bool)
  StorageDrive.inUse = false  (bool)
  StorageDrive.size = 0  (0x0)  (qulonglong)

When I connect a same USB pen stick using the bsdisks, I get this:

udi = '/org/freedesktop/UDisks2/block_devices/da0'
  parent = '/org/freedesktop/UDisks2/drives/da0'  (string)
  vendor = 'General USB Flash Disk'  (string)
  product = ''  (string)
  description = 'DISK-0423390000000239'  (string)
  icon = 'drive-removable-media'  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 0  (0x0)  (int)
  Block.device = '/dev/da0'  (string)
  StorageVolume.ignored = true  (bool)
  StorageVolume.usage = 'PartitionTable'  (0x3)  (enum)
  StorageVolume.fsType = ''  (string)
  StorageVolume.label = 'DISK-0423390000000239'  (string)
  StorageVolume.uuid = ''  (string)
  StorageVolume.size = 16131293184  (0x3c1800000)  (qulonglong)

udi = '/org/freedesktop/UDisks2/block_devices/da0s1'
  parent = '/org/freedesktop/UDisks2/drives/da0s1'  (string)
  vendor = ''  (string)
  product = ''  (string)
  description = 'Жёсткий диск (15,0 ГиБ)'  (string)
  icon = 'drive-harddisk'  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 0  (0x0)  (int)
  Block.device = '/dev/da0s1'  (string)
  StorageAccess.accessible = false  (bool)
  StorageAccess.filePath = ''  (string)
  StorageAccess.ignored = true  (bool)
  StorageVolume.ignored = false  (bool)
  StorageVolume.usage = 'FileSystem'  (0x2)  (enum)
  StorageVolume.fsType = 'exfat'  (string)
  StorageVolume.label = ''  (string)
  StorageVolume.uuid = ''  (string)
  StorageVolume.size = 16131260928  (0x3c17f8200)  (qulonglong)

udi = '/org/freedesktop/UDisks2/drives/da0'
  parent = '/org/freedesktop/UDisks2'  (string)
  vendor = 'General USB Flash Disk'  (string)
  product = ''  (string)
  description = 'General USB Flash Disk'  (string)
  icon = 'drive-removable-media'  (string)
  Block.major = 0  (0x0)  (int)
  Block.minor = 0  (0x0)  (int)
  Block.device = '/dev/da0'  (string)
  StorageDrive.bus = 'Platform'  (0x5)  (enum)
  StorageDrive.driveType = 'HardDisk'  (0x0)  (enum)
  StorageDrive.removable = true  (bool)
  StorageDrive.hotpluggable = false  (bool)
  StorageDrive.inUse = false  (bool)
  StorageDrive.size = 16131293184  (0x3c1800000)  (qulonglong)

The values for StorageDrive.hotpluggable vary. Maybe that’s why the USB pen stick is recognized as non-removable with bsdisks?
Comment 42 Jason W. Bacon freebsd_committer 2020-01-08 22:07:25 UTC
(In reply to Gleb Popov from comment #39)

I logged out of the GUI, ran "service hald stop" from a vt, then logged in on the GUI again.  It acted weird immediately, which was actually why I tried the vt switch that made everything blow up.  If other people are able to use KDE without hald, I won't worry about it.  Maybe my incantations weren't quite right.  Thanks.
Comment 43 Gleb Popov freebsd_committer 2020-01-09 08:56:09 UTC
(In reply to Serge Volkov from comment #41)

> The values for StorageDrive.hotpluggable vary. Maybe that’s why the USB pen stick is recognized as non-removable with bsdisks?

Yep, that seems like a culprit. Relevant solid code even contains an #ifdef for FreeBSD case added by me, but forgotten. I'll fix this shortly.

Thanks for figuring this out.
Comment 44 Gleb Popov freebsd_committer 2020-01-09 18:01:44 UTC
(In reply to Serge Volkov from comment #41)
It turned out that adding hotpluggable property doesn't help.

Can you provide an output for `solid-hardware5 nonportableinfo <usb flash disk>` for hald backend?
Comment 45 Serge Volkov 2020-01-09 20:48:11 UTC
(In reply to Gleb Popov from comment #44)

solid-hardware5 nonportableinfo /org/freedesktop/Hal/devices/storage_serial_HA08040000003876

udi = '/org/freedesktop/Hal/devices/storage_serial_HA08040000003876'
  block.device = '/dev/da0'  (string)
  block.freebsd.cam_path = '2,0,0'  (string)
  block.is_volume = false  (bool)
  block.major = 0  (0x0)  (int)
  block.minor = 148  (0x94)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_HA08040000003876'  (string)
  freebsd.device_file = '/dev/da0'  (string)
  freebsd.driver = 'da'  (string)
  freebsd.unit = 0  (0x0)  (int)
  info.addons = {'hald-addon-storage'}  (string list)
  info.capabilities = {'block', 'storage'}  (string list)
  info.category = 'storage'  (string)
  info.interfaces = {'org.freedesktop.Hal.Device.Storage.Removable'}  (string list)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_90c_1000_HA08040000003876_if0_scsi_host_scsi_device_lun0'  (string)
  info.product = 'USB DISK'  (string)
  info.subsystem = 'block'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_HA08040000003876'  (string)
  info.vendor = 'SMI'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.bus = 'usb'  (string)
  storage.drive_type = 'disk'  (string)
  storage.firmware_revision = '1100'  (string)
  storage.hotpluggable = true  (bool)
  storage.lun = 0  (0x0)  (int)
  storage.media_check_enabled = true  (bool)
  storage.model = 'USB DISK'  (string)
  storage.no_partitions_hint = false  (bool)
  storage.originating_device = '/org/freedesktop/Hal/devices/usb_device_90c_1000_HA08040000003876_if0_scsi_host'  (string)
  storage.removable = true  (bool)
  storage.removable.media_available = true  (bool)
  storage.removable.media_size = 31669223424  (0x75fa20000)  (qulonglong)
  storage.removable.support_async_notification = false  (bool)
  storage.requires_eject = false  (bool)
  storage.serial = 'HA08040000003876'  (string)
  storage.vendor = 'SMI'  (string)
Comment 46 Gleb Popov freebsd_committer 2020-01-10 15:08:13 UTC
I have fixed 2 bugs in bsdisks, but it didn't help. I'm a bit lost.

Serge, I need you to perform following steps:

- Switch to HAL backend.
- Run `solid-hardware5 list` to identify UDI's of USB flash disk. Note that there are many of them, and I need all of them. Look at "Parent" property in `solid-hardware5 details <udi>` output to find parent UDI. In your message #41 you missed at least "/org/freedesktop/Hal/devices/usb_device_90c_1000_0423390000000239_if0_scsi_host_scsi_device_lun0" one.
- In KRunner (Alt+F2) type "engine" and launch "Plasma Engine Explorer" application.
- Select "soliddevice" provider.
- Put found UDI's into "Source name" textbox and press "Request Source" button.
- Provide me properties for each UDI in the data grid.

Let's hope I'll spot any difference there.
Comment 47 Gleb Popov freebsd_committer 2020-01-10 15:47:10 UTC
Oh, forget it, it seems I made it work. It'll require some polishing, though.
Comment 48 Jason W. Bacon freebsd_committer 2020-01-10 17:07:00 UTC
Excellent.

How soon might kf5-solid switch to bsdisks by default?  If it's going to be a while, it might be worth having a kf5-solid-bsdisks slave port during the transition, so beta-testers can run pkg upgrade without breaking their config.
Comment 49 Tobias C. Berner freebsd_committer 2020-01-10 17:58:35 UTC
(In reply to Jason W. Bacon from comment #48)
I would like to do it before Q2 is cut -- but I defer the final decision to Gleb.
Comment 50 Gleb Popov freebsd_committer 2020-01-10 18:40:28 UTC
Instead of flavorization, let's try enabling both backends. Create a ${PORTSDIR}/devel/kf5-solid/files directory and drop the following patch there:

--- CMakeLists.txt.orig	2019-12-07 21:50:54 UTC
+++ CMakeLists.txt
@@ -117,9 +117,8 @@ elseif (NOT ANDROID)
     endif()
     if(EXPERIMENTAL_BSDISKS)
         add_device_backend(udisks2)
-    else()
-        add_device_backend(hal)
     endif()
+    add_device_backend(hal)
 endif()
 add_device_backends_cmake()
 
Name the patch "patch-CMakeLists.txt".

This should cause solid to use bsdisks if it is installed and hal otherwise.
Comment 51 Jason W. Bacon freebsd_committer 2020-01-11 16:20:37 UTC
Nope...

With the patch in place, it seems to always use hal if possible and fall back on bsdisks.

With FAT32, I see the same behavior as when bsdisks is disabled, namely "Malformed URL" popup when mounting.

exFAT works normally, whereas it doesn't work at all for me with a hal-only build.  That suggests to me that it's falling back on bsdisks after trying hal.

I tried reversing your patch, adding the hal backend before bsdisks, but the resulting behavior was the same.

Removing the patch and rebuilding with bsdisks support restored full functionality.
Comment 52 Serge Volkov 2020-01-11 17:52:56 UTC
(In reply to Jason W. Bacon from comment #51)

> With FAT32, I see the same behavior as when bsdisks is disabled,
> namely "Malformed URL" popup when mounting.

I think the error appears because an attempt to device open occurs earlier than mounting the device. I just changed the value

Exec=kde-open5 "%f"

in the file /usr/local/share/solid/actions/test-predicate-openinwindow.desktop to another

Exec=[ ! -z "%f" ] && kde-open5 "%f"

And the error "Malformed URL" does not appear. But in this case when the device is mounted, you need to open it yourself.
Comment 53 Jason W. Bacon freebsd_committer 2020-01-11 23:04:03 UTC
(In reply to Serge Volkov from comment #52)

Why does this only happen with hal?  It's been very consistent for me: Always with hal, never with bsdisks.
Comment 54 Serge Volkov 2020-01-12 09:10:49 UTC
(In reply to Jason W. Bacon from comment #53)

> Why does this only happen with hal?

I dont know. For me this also happens only with the hald backend. Perhaps some concurrent processes are taking place.
Comment 55 Jason W. Bacon freebsd_committer 2020-01-12 15:37:09 UTC
I would vote to focus man-hours on expediting the bsdisks rollout rather than fixing hald issues.

That's up to the KDE team, of course, but I can report that the bsdisks-enabled build is working well for me.
Comment 56 commit-hook freebsd_committer 2020-01-14 18:06:35 UTC
A commit references this bug:

Author: arrowd
Date: Tue Jan 14 18:06:22 UTC 2020
New revision: 523058
URL: https://svnweb.freebsd.org/changeset/ports/523058

Log:
  devel/kf5-solid: Enable bsdisks backend unconditionally.

  To use it, install sysutils/bsdisks and disable hald (set hald_enable="NO" in rc.conf or just remove the package).

  PR:		242902
  Reviewed by:	tcberner

Changes:
  head/devel/kf5-solid/Makefile
  head/devel/kf5-solid/files/
  head/devel/kf5-solid/files/patch-CMakeLists.txt
  head/devel/kf5-solid/pkg-message
Comment 57 Gleb Popov freebsd_committer 2020-01-14 18:10:34 UTC
Solid is now built with bsdisks support. See pkg-message for instructions how to enable and test it.

Make sure to use latest bsdisks (0.13 as of now). Bug reports can be sent to https://bitbucket.org/arrowd/bsdisks/issues/

Closing this now, thanks everyone for inputs and participation.
Comment 58 Jason W. Bacon freebsd_committer 2020-01-15 02:22:24 UTC
Confirmed working properly on my end.

I updated the WIP version of sysutils/desktop-installer, so the next commit will install bsdisks and no longer enable hald for KDE installations.

Thanks!
Comment 59 Serge Volkov 2020-01-15 08:34:26 UTC
Unfortunately, removable devices continue to be recognized as non-removable. Maybe we will continue to look for differences between the parameters passed from hald and bsdisks? I have a hald set. I can help.
Comment 60 Jason W. Bacon freebsd_committer 2020-01-15 18:56:55 UTC
(In reply to Serge Volkov from comment #59)

I can confirm that here.  I had forgotten that "All devices" was set in my config.

What would be the down side of patching to set "All devices" by default?  I'm not clear on what devices would be detected and whether this would be a nuisance to a significant number of users.  I can only say that device notifier doesn't list my hard disk.

Either way, this should be fixed, but it might be better to recognize USB sticks out-of-the-box until a solution is found.
Comment 61 Gleb Popov freebsd_committer 2020-01-16 05:27:54 UTC
Are you sure you're running bsdisks-0.13? I can't reproduce this on my side.
Comment 62 Serge Volkov 2020-01-16 07:45:42 UTC
(In reply to Gleb Popov from comment #61)

Yes, I am sure. I rebuilt and reinstalled from ports the latest version of the bsdisks-0.13. I also rebuilt and reinstalled the kf5-solid. However, the same USB sticks are not detected by Plasma5 Device Notifier until I set "All devices".
Comment 63 Gleb Popov freebsd_committer 2020-01-16 08:38:43 UTC
(In reply to Serge Volkov from comment #62)

Well, let's debug again. Install sysutils/libudisks and show the output of `udisksctl dump` command related to your USB stick.
Comment 64 Serge Volkov 2020-01-16 08:58:18 UTC
(In reply to Gleb Popov from comment #63)

For one my NONAME 32GB USB stick with FAT32, the output is as follows:

/org/freedesktop/UDisks2/block_devices/da0:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     
    DeviceNumber:               0
    Drive:                      '/org/freedesktop/UDisks2/drives/da0'
    HintAuto:                   false
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          false
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         _
    IdLabel:                    
    IdType:                     
    IdUUID:                     
    IdUsage:                    
    IdVersion:                  
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            
    ReadOnly:                   false
    Size:                       0
    Symlinks:                   
  org.freedesktop.UDisks2.PartitionTable:
    Type:               dos

/org/freedesktop/UDisks2/block_devices/da0s1:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     
    DeviceNumber:               0
    Drive:                      '/org/freedesktop/UDisks2/drives/da0'
    HintAuto:                   false
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          false
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         __s1
    IdLabel:                    
    IdType:                     vfat
    IdUUID:                     
    IdUsage:                    filesystem
    IdVersion:                  
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            
    ReadOnly:                   false
    Size:                       31669191168
    Symlinks:                   
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:               
    Number:             1
    Offset:             32256
    Size:               31669191168
    Table:              '/org/freedesktop/UDisks2/block_devices/da0'
    Type:               fat32lba
    UUID:               

/org/freedesktop/UDisks2/drives/da0:
  org.freedesktop.UDisks2.Drive:
    CanPowerOff:                false
    Configuration:              {}
    ConnectionBus:              usb
    Ejectable:                  true
    Id:                         
    Media:                      
    MediaAvailable:             false
    MediaChangeDetected:        false
    MediaCompatibility:         
    MediaRemovable:             false
    Model:                      
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  true
    Revision:                   
    RotationRate:               0
    Seat:                       
    Serial:                     HA08040000003876
    SiblingId:                  
    Size:                       31669223424
    SortKey:                    
    TimeDetected:               0
    TimeMediaDetected:          0
    Vendor:                     SMI USB DISK
    WWN:                        
    bsdisks_AtaSata:            ata
    bsdisks_ConnectionBus:      
    bsdisks_IsHotpluggable:     true
Comment 65 Serge Volkov 2020-01-16 10:07:55 UTC
I noticed strange behavior with bsdisks backend. If the USB stick is connected before logging in the system, then the Plasma5 Device Notifier shows it. If I disconnect the USB stick and connect it again, then the Plasma5 Device Notifier does not show it. If I log off and log in again, then the Plasma5 Device Notifier shows it again.
Comment 66 Gleb Popov freebsd_committer 2020-01-16 13:15:31 UTC
(In reply to Serge Volkov from comment #65)
Let's try a wild guess. Can you compile bsdisks while applying following patch?

diff -r 934941acb30c main.cpp
--- main.cpp	Thu Jan 16 14:59:14 2020 +0400
+++ main.cpp	Thu Jan 16 17:12:55 2020 +0400
@@ -106,7 +106,7 @@
     new ObjectManagerAdaptor(&manager);
 
     QThreadPool::globalInstance()->setExpiryTimeout(-1);
-    QThreadPool::globalInstance()->setMaxThreadCount(4);
+    QThreadPool::globalInstance()->setMaxThreadCount(1);
 
     manager.initialProbe();
 
Does it change anything?
Comment 67 Jason W. Bacon freebsd_committer 2020-01-16 16:05:02 UTC
The MaxThreads patch did not help.

I also tried wiping my .kde and .config directories from a VT so I'd get a fresh default config on the next session - no change.

Here's everything related to da0 on my FAT32 USB stick.

/org/freedesktop/UDisks2/block_devices/da0s1:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     
    DeviceNumber:               0
    Drive:                      '/org/freedesktop/UDisks2/drives/da0s1'
    HintAuto:                   false
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          false
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         __s1
    IdLabel:                    SONY8
    IdType:                     vfat
    IdUUID:                     
    IdUsage:                    filesystem
    IdVersion:                  
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            
    ReadOnly:                   false
    Size:                       8019476992
    Symlinks:                   
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:               
    Number:             1
    Offset:             32256
    Size:               8019476992
    Table:              '/org/freedesktop/UDisks2/block_devices/da0'
    Type:               fat32
    UUID:               

/org/freedesktop/UDisks2/block_devices/da0s2:

/org/freedesktop/UDisks2/block_devices/da0s2a:

/org/freedesktop/UDisks2/drives/da0:
  org.freedesktop.UDisks2.Drive:
    CanPowerOff:                false
    Configuration:              {}
    ConnectionBus:              
    Ejectable:                  true
    Id:                         
    Media:                      
    MediaAvailable:             false
    MediaChangeDetected:        false
    MediaCompatibility:         
    MediaRemovable:             false
    Model:                      
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  true
    Revision:                   
    RotationRate:               0
    Seat:                       
    Serial:                     5A08100192367
    SiblingId:                  
    Size:                       8019509248
    SortKey:                    
    TimeDetected:               0
    TimeMediaDetected:          0
    Vendor:                     Sony Storage Media
    WWN:
Comment 68 Jason W. Bacon freebsd_committer 2020-01-16 16:06:47 UTC
And...  My USB stick is *not* recognized if I plug in before logging in.
Comment 69 Serge Volkov 2020-01-16 20:39:59 UTC
(In reply to Gleb Popov from comment #66)

The MaxThreads patch did not help. I confirm that nothing has changed.
Comment 70 Jason W. Bacon freebsd_committer 2020-01-16 21:21:14 UTC
One more clue: If I configure "All devices", mount my exFAT drive, unmount it, remove it, switch to "Removable devices only", then plug it back in, Device notifier *usually* pops up, but if I click "Open with File Manager", it switches to "No Device Available".  Might this provide some clue as to where the problem is occurring?
Comment 71 Serge Volkov 2020-01-17 09:39:58 UTC
(In reply to Jason W. Bacon from comment #70)

Yes, I confirm. Changing a MaxThreadCount to 1 does affect behavior. The behavior is described in the comment #70. But I always have "Removable devices only" set and I did not set "All devices".
Comment 72 Jason W. Bacon freebsd_committer 2020-01-17 14:53:35 UTC
(In reply to Serge Volkov from comment #71)

Actually, I did not apply the MaxThreads patch on this machine.  I did build from source to ensure that I have the latest, as I wasn't sure if the binary package was up-to-date yet.
Comment 73 Max Brazhnikov freebsd_committer 2020-01-17 19:22:02 UTC
Created attachment 210825 [details]
solid-hardware5 details

I've compiled bsdisks-0.13 with patch from comment #65. It works fine with usb stick formatted as raw device (without partition table) to FAT, i.e. stick is detected as a removable drive, it can be flawlessly mounted and unmounted.
However, I see problems with partitioned usb sticks. At first, stick is detected as a removable drive. But first mount command hangs with errors and at the same time the stick is re-detected as non-removable drive. Now it can be mounted and unmounted without any problems.
Comment 74 Gleb Popov freebsd_committer 2020-01-19 09:51:39 UTC
All your inputs doesn't ring any bell for me, unfortunately.

However, I have an idea what might be wrong, but that'd require some work. Stay tuned.