<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Power options - not inhibiting sleep]]></title><description><![CDATA[<p dir="auto">First thing first, I must say: Kudos for excellent work (...and choosing Snowy White for screenshots <img src="https://forum.strawberrymusicplayer.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f917.png?v=faqqna7874c" class="not-responsive emoji emoji-android emoji--hugging_face" style="height:23px;width:auto;vertical-align:middle" title=":hugging_face:" alt="🤗" /> ).</p>
<p dir="auto">Now, the only problem on my Kubuntu laptop is that Strawberry don't implement any power options. To be precise, after time defined in OS settings my laptop will go to sleep, although Strawberry is still playing.</p>
<p dir="auto">Earlier, as a workaround, I could start Strawberry with .desktop file containing:</p>
<pre><code>Exec=bash -c 'inhibit_lock=$(qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.Inhibit "strawberry" "playing") ; /path/Strawberry-0.9.3-Qt5-x86_64.AppImage %U ; qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.UnInhibit $inhibit_lock'
</code></pre>
<p dir="auto">but since v0.9.3 that, for some reason, that will not work, nether for Qt5 nor Qt6 appimage.  The same thing is with outdated 0.8.3 deb version. Well, you can imagine how annoying it is.</p>
<p dir="auto">Anyway, Godspeed and if I may a little advice.<br />
If you plan to get Strawberry viral, you really need to implement that <em>modern album grid view</em> for Collection sidebar as  some have been requested it, maybe something like KDE's Elisa. Now, I don't promise to use it, but still, you get the point.<br />
Best of luck.</p>
]]></description><link>https://forum.strawberrymusicplayer.org/topic/280/power-options-not-inhibiting-sleep</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 14:44:42 GMT</lastBuildDate><atom:link href="https://forum.strawberrymusicplayer.org/topic/280.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Apr 2021 18:10:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Power options - not inhibiting sleep on Mon, 06 Sep 2021 15:32:28 GMT]]></title><description><![CDATA[<p dir="auto"><strong>Actual solution:</strong><br />
Now this can be easily achieved by simple python script and as a result, Plasma will correctly recognise inhibition in it's default "Battery and Brightness" widget:</p>
<pre><code>#!/usr/bin/env python3

import dbus, subprocess, sys

session_bus = dbus.SessionBus()

obj = session_bus.get_object('org.freedesktop.PowerManagement.Inhibit', 
                             '/org/freedesktop/PowerManagement/Inhibit')
iface = dbus.Interface(obj, dbus_interface='org.freedesktop.PowerManagement.Inhibit')
data = iface.Inhibit(str(sys.argv[1]), '\nfor reason: playing music')

# Output report
print(f'''\n----------
{sys.argv[0]}
    script inhibiting program: "{sys.argv[1]}"
    with cookie: {data}
    To release inhibit manually run:\n
    " qdbus org.freedesktop.PowerManagement.Inhibit
    /org/freedesktop/PowerManagement/Inhibit
    org.freedesktop.PowerManagement.Inhibit.UnInhibit {data} " 
----------\n''')

process = subprocess.run(sys.argv[1:], stderr=subprocess.STDOUT)
sys.exit(process.returncode)
</code></pre>
<p dir="auto">As a bonus, it  will work with any other program, too. To use it, call script with program as arguments. For example, in desktop file:</p>
<pre><code>Exec=/pathToScript/inhibit_sleep.py    /path_to_executable/Strawberry-0.9.3-Qt5-x86_64.AppImage %U
</code></pre>
<p dir="auto">It will disable inhibition right after you exit Strawberry.</p>
<p dir="auto">@devs<br />
Well, it's not PyQt as an effort to be more portable, but from the top of my head, it can be easily achieved with QDBusConnection and QDBusInterface classes.</p>
]]></description><link>https://forum.strawberrymusicplayer.org/post/1033</link><guid isPermaLink="true">https://forum.strawberrymusicplayer.org/post/1033</guid><dc:creator><![CDATA[nashoba]]></dc:creator><pubDate>Mon, 06 Sep 2021 15:32:28 GMT</pubDate></item><item><title><![CDATA[Reply to Power options - not inhibiting sleep on Sat, 21 Aug 2021 10:39:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://forum.strawberrymusicplayer.org/uid/461">@nashoba</a><br />
Apparently, it's a change in powerdevil.<br />
If anyone interested for a MR it's explained here:</p>
<p dir="auto"><a href="https://www.reddit.com/r/kde/comments/hruubo/unable_to_inhibit_suspend/" rel="nofollow ugc">https://www.reddit.com/r/kde/comments/hruubo/unable_to_inhibit_suspend/</a></p>
]]></description><link>https://forum.strawberrymusicplayer.org/post/996</link><guid isPermaLink="true">https://forum.strawberrymusicplayer.org/post/996</guid><dc:creator><![CDATA[nashoba]]></dc:creator><pubDate>Sat, 21 Aug 2021 10:39:56 GMT</pubDate></item></channel></rss>