Linux 10 minute screensaver
#16
I launch Kodi by Systemd like this:
[Unit]
Description = Kodi Media Center

# if you don't need the MySQL DB backend, this should be sufficient
After = systemd-user-sessions.service network.target sound.target

# if you need the MySQL DB backend, use this block instead of the previous
# After = systemd-user-sessions.service network.target sound.target mysql.service
# Wants = mysql.service

[Service]
User = meklon
Group = meklon
Type = simple
#PAMName = login # you might want to try this one, did not work on all systems
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi -- :0 -nolisten tcp vt7
Restart = always
RestartSec = 5

[Install]
WantedBy = multi-user.target
Reply
#17
Unfortunately, workaround doesn't work in my case. Kodi starts with:

#!/bin/sh

xset s off -dpms
/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi -- :0 -nolisten tcp vt7

But I got blank screen after 10 minutes.
Reply
#18
(2019-02-03, 22:36)fritsch Wrote: In short: if you want that your system does not go into power saving mode, disable it in the system - and this is NOT Mint / whatever screensaver.
Curious to know how to do this at command-line level: "xset -q" gives xset:  unable to open display "" (there some getty parameter to pass?)

Running Kodi 2:18.1+git20190217.1232-final-0xenial on Ubuntu 16.04.6 LTS; didn't have this issue on Ubuntu 14 so guessing it's an OS powersaving issue (but Ubunny 14 didn't have systemd so I can't compare the two setups)

Kodi is running as a systemctl service:
Quote:# systemctl status kodi.service
● kodi.service - kodi-standalone using xinit
   Loaded: loaded (/etc/systemd/system/kodi.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
And the kodi.service file contains:
Quote:ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/openbox-session -- :0 -nolisten tcp vt7
 
So... can I add an additional parameter in there? Or amend some system-wide file that alters display power settings?
Reply
#19
(2019-02-02, 22:18)StallmanWasRight Wrote:
(2019-02-02, 11:58)fritsch Wrote: Try:

1.) xset s off -dpms
2.) kodi

from the same terminal. Still 10 minutes issue?
That seems to have done it.  Thank you!  For anyone else who's reading, since I start Kodi automatically once a certain user logs in, I ended up editing the Kodi X session:

Edit /usr/share/xsessions/kodi.desktop and point it to a new executable:
bash:
[Desktop Entry]
Name=Kodi
Comment=This session will start Kodi media center
Exec=kodi-no-blank-screen
TryExec=kodi-no-blank-screen
Type=Application
(Note the `Exec` and `TryExec`.) 

`kodi-no-blank-screen` didn't exist, so I created it in /usr/bin/ and made it executable.  It's just
bash:

#!/bin/sh

xset s off -dpms

/usr/bin/kodi-standalone -fs
 
Thank you for this. I have implemented it on four different kodi front end's around the house and it has finally stopped the screen blanking. It was driving me BAT S@#T crazy.
Reply
#20
(2019-03-30, 22:35)Preacher Wrote: So... can I add an additional parameter in there? Or amend some system-wide file that alters display power settings?
I may have found the answer to this, but untested - so if anyone else wants to try it, here's what I've done...

It seems on my system (Ubuntu 16.04.6 LTS) Kodi launches via openbox (I can see sh /home/user/.config/openbox/autostart as a running process). 

Checking this file, I see there's a line reading xset -dpms - so I've commented this out and added another under reading xset s off -dpms

Hope that helps someone; I'll be testing it out myself at some point.
Reply

Logout Mark Read Team Forum Stats Members Help
10 minute screensaver0