Bug 257210

Summary: SolidUiServer doesn't register new partitions in UDisks backend
Product: [Frameworks and Libraries] solid Reporter: Alex Merry <alex.merry>
Component: generalAssignee: Kevin Ottens <ervin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alex Merry 2010-11-18 01:50:09 UTC
Version:           unspecified (using Devel) 
OS:                Linux

User-facing issue:

My laptop has an SD card reader built-in.  When I insert a card, I get two devices showing up in the plasma device notifier - one is from the HAL backend, the other from the UDisks backend.  solid-hardware shows both as well.  If I try to open the HAL one in Dolphin, it works fine.  If I try to open the UDisks one in Dolphin, nothing happens (the paritition is not even mounted) and I get the following message in my xsession-errors:

kded(4718) MacroExpander::expandEscapedMacro: DeviceServiceAction::execute:  "/org/freedesktop/UDisks/devices/sdb1"  is not a StorageAccess device

This is clearly nonsense, as solid-hardware displays the StorageAccess properties of this device just fine.

I'll note here that I don't get this problem with USB memory sticks - they work as expected.


Underlying problem:

Playing around with gdb, I found that the backend object for /org/freedesktop/UDisks/devices/sdb1 is null, and the reason for this is that it doesn't appear in the UDisks backend device cache in the kded process.

I set a breakpoint on Solid::Backends::UDisks::UDisksManager::slotDeviceAdded, and it wasn't triggered when I inserted the SD card.  In fact, none of the signals are connected.  And I think the only reason my USB stick works is that I happened to have it plugged in when I logged in (so it's still in the device cache from then).

Reproducible: Always
Comment 1 Alex Merry 2010-11-18 01:58:30 UTC
OK, I put in a debug statement to print a message if the "m_manager.isValid()" check in the UDisksManager constructor, and it is emitted when I log in (if the UDisks service isn't already running).

In fact, this check always fails if UDisks isn't already running (if I kill udisks-daemon and call `solid-hardware list`, for example).
Comment 2 Alex Merry 2010-11-18 02:19:19 UTC
SVN commit 1198261 by alexmerry:

Don't check if the UDisks service is valid - just try to connect the signals.

UDisks is an autostart service, which means that it may not be valid _until_ we try to connect.

BUG: 257210



 M  +0 -2      udisksmanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1198261