advantages of DeviceKit support

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sraue Offline
Team-XBMC Developer
Posts: 796
Joined: Oct 2009
Reputation: 14
Location: Switzerland, Solothurn
Post: #11
topfs2 Wrote:Well DeviceKit.Power is used for suspend and hibernate, but to be able to shutdown and reboot we need ConsoleKit.

in the moment i dont need this powersave things...
the problem is when i am build xbmc with hal it starts and works, except when i am unplug an usb device or remove the cd the mountpoint will be not deleted, but when i am build without hal but i have Consolekit/DeviceKit-disks it doesnt start (i see only the splash and xbmc restarts - the last entry in logfile are this from consolekit. i also have this entrys if i build and run with HAL+ CK+DKd but then runs). i think it is because consolekit is not working for me. i tryed this now for days but i cant find my problem with consolekit. devicekit-disks found my devices, but xbmc does they not mount...

topfs2 Wrote:I guess we can make it so that one of them is only needed, will need to think abit on the implementation for that. I'd still suggest you to add ConsoleKit though Smile


because i have no login or any users (except for the services) on my system i dont understand what CK does... the next problem is, because i use busybox i have not all programs for usermanagement on my system or only any "light" versions of this...

topfs2 Wrote:EDIT2: To not build with hal should only be to undefine HAS_HAL and fix so that the configure doesn't check for it.

this i have do but i dont know if there any code that prevents run of xbmc (for me). i can you send my patch later today for an revisit

greetings, Stephan

[Image: userbar-openelec-001.gif]
[Image: project_thin_badge.gif]
find quote
topfs2 Offline
Team-XBMC Developer
Posts: 3,825
Joined: Dec 2007
Reputation: 8
Post: #12
The check if DeviceKit.Disks and DeviceKit.Power exists aren't mutually exclusive. So you can for sure have HALDisks and DeviceKit.Power, this is by design.

So if you don't have hal or consolekit but you have DeviceKit.Disks you'll get DiskManagement with devicekit.disks and nothing in the powerdepartment. I'll take a look at not needing ConsoleKit but for your distro it should work as DeviceKit.Disks but nothin in power.

If this doesn't work as supposed please provide a log (and ticket with me cc'd) and I'll take a closer look.

Cheers,
Tobias

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
sraue Offline
Team-XBMC Developer
Posts: 796
Joined: Oct 2009
Reputation: 14
Location: Switzerland, Solothurn
Question    Post: #13
Hi Tobias,

i have updated my distro to using udisks as an HAL/DeviceKit-disks replacement. And after the update automounting of USB drives works for me the first time without problems! Very nice!

Now i have an question: It is possible to run my distro from any USB stick or USB drive. if i run from this Stick any other USB drives will be mounted by udisks to /media. But any internally (SATA/IDE) drives will not mount. Is it possible to change XBMC in standalone mode to mount also all not already mounted partitions from internally drives to /media?

thanks

greetings, Stephan

[Image: userbar-openelec-001.gif]
[Image: project_thin_badge.gif]
find quote
sraue Offline
Team-XBMC Developer
Posts: 796
Joined: Oct 2009
Reputation: 14
Location: Switzerland, Solothurn
Post: #14
openelec.tv Wrote:i have updated my distro to using udisks as an HAL/DeviceKit-disks replacement. And after the update automounting of USB drives works for me the first time without problems! Very nice!

Tobias, forgot this. It works now with HAL again, because i have changed to udisks. I think XBMC needs some changes to support udisks too (for example org.freedesktop.DeviceKit.Disks are now org.freedesktop.UDisks)

openelec.tv Wrote:Now i have an question: It is possible to run my distro from any USB stick or USB drive. if i run from this Stick any other USB drives will be mounted by udisks to /media. But any internally (SATA/IDE) drives will not mount. Is it possible to change XBMC in standalone mode to mount also all not already mounted partitions from internally drives to /media?
thanks

greetings, Stephan

[Image: userbar-openelec-001.gif]
[Image: project_thin_badge.gif]
find quote
sraue Offline
Team-XBMC Developer
Posts: 796
Joined: Oct 2009
Reputation: 14
Location: Switzerland, Solothurn
Question    Post: #15
Tobias and others,

What do you think of support for automount dirctly via udev (libudev) instead support and maintenence HAL, DeviceKit-disk (oldAPI), DeviceKit-disk (newAPI) and udisks?

udev are installed on every recent Linux System and HAL, DeviceKit-disks and udev depends also on HAL.

you can find an standalone automounter based on udev here (for inspiration)

http://sources.openelec.tv/tmp/source/automountd.c

greetings, Stephan

[Image: userbar-openelec-001.gif]
[Image: project_thin_badge.gif]
find quote
sraue Offline
Team-XBMC Developer
Posts: 796
Joined: Oct 2009
Reputation: 14
Location: Switzerland, Solothurn
Post: #16
openelec.tv Wrote:udev are installed on every recent Linux System and HAL, DeviceKit-disks and udev depends also on HAL.
]

i mean:
udev are installed on every recent Linux System and HAL, DeviceKit-disks and HAL depends also on udev

greetings, Stephan

[Image: userbar-openelec-001.gif]
[Image: project_thin_badge.gif]
find quote
topfs2 Offline
Team-XBMC Developer
Posts: 3,825
Joined: Dec 2007
Reputation: 8
Post: #17
Well downside with udev is that it might not play nice with the other tools? I'm not very read up on it tbh.

I've been in talks with the udisk guys and we will be adding the udisk namespace, just waited abit for it to make an appearance in ubuntu so I had something to work against. Should be fairly straightforward though, basically copy the DeviceKit-Disks class, strip the oldapi support and alter the namespace.

Regarding localdisks, I know it wasn't possible under HAL since it forced root for that, not sure if devicekit-disks can do this userspace. I guess it should in theory be able to do it if udev grants the disk node as userspace though? I'd love to see us able to mount internal ones aswell, especially the esata ones. Starting a discussion on udisk mailing list would be good for that.

Cheers,
Tobias

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
sraue Offline
Team-XBMC Developer
Posts: 796
Joined: Oct 2009
Reputation: 14
Location: Switzerland, Solothurn
Post: #18
Hi Tobias,

topfs2 Wrote:Regarding localdisks, I know it wasn't possible under HAL since it forced root for that, not sure if devicekit-disks can do this userspace. I guess it should in theory be able to do it if udev grants the disk node as userspace though? I'd love to see us able to mount internal ones aswell, especially the esata ones. Starting a discussion on udisk mailing list would be good for that.

i have asked on udisks ML some days before (in this time it was not conscious to me that XBMC not supports udisks):

http://lists.freedesktop.org/archives/de...00774.html

maybe you can also talk on this ML, you know lot more things about this (i am not a coder :-( )

greetings and thanks

greetings, Stephan

[Image: userbar-openelec-001.gif]
[Image: project_thin_badge.gif]
find quote
tidalf Offline
Junior Member
Posts: 35
Joined: Dec 2009
Reputation: 1
Post: #19
Hi,

I've tried to alter the namespace from DeviceKit.(Disks|Power) to UDisks & UPower and I've removed the oldapi check and like Tobias said, it works.

I haven't tried yet to duplicate the class so the thing works for both devicekit et uthings.

If anyone care about this quick&dirty&temporary fix it's here (that's for 28276):
udisks.diff
http://pastebin.com/hxyEga6z
upower.diff
http://pastebin.com/80ippHc6
find quote
sraue Offline
Team-XBMC Developer
Posts: 796
Joined: Oct 2009
Reputation: 14
Location: Switzerland, Solothurn
Thumbs Up    Post: #20
tidalf Wrote:Hi,

I've tried to alter the namespace from DeviceKit.(Disks|Power) to UDisks & UPower and I've removed the oldapi check and like Tobias said, it works.

I haven't tried yet to duplicate the class so the thing works for both devicekit et uthings.

If anyone care about this quick&dirty&temporary fix it's here (that's for 28276):
udisks.diff
http://pastebin.com/hxyEga6z
upower.diff
http://pastebin.com/80ippHc6

great!

i would prefer to create an ticket with this patch(es). so it would be easyer for tobias to include this the next time. i will also try your patch the next days.

thanks

greetings, Stephan

[Image: userbar-openelec-001.gif]
[Image: project_thin_badge.gif]
find quote