• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Off Topic General Discussion Jellyfin-Inhibit-Sleep for Linux

     
    • 0 Vote(s) - 0 Average

    Jellyfin-Inhibit-Sleep for Linux

    Prevent Stop Inhibit the OS from going to sleep whilst streaming
    Kwakers
    Offline

    Junior Member

    Posts: 9
    Threads: 3
    Joined: 2023 Dec
    Reputation: 0
    Country:United Kingdom
    #1
    2025-04-26, 07:11 PM
    I'm not sure if this is where I am supposed to post this so please move to the correct location if needed.

    I have created a Linux application to prevent the Jellyfin server from suspending whilst a user is streaming a video.
    Suspend the server after streaming depending on the inactivity timeout value and user inputs. 

    https://github.com/Kwakers01/Jellyfin-Inhibit-Sleep

    Please feel free to test, add code (e.g. ssh/vnc detection), I have puts lots of comments in the code, configured logging and testing (on/off). I will try to look at ssh and vnc when I get my server built (tested on laptop).

    Feel free to raise issues if needed, I may not be able to fix them but I will have a go and try to help, other users may try to help too.

    I hope people find this useful.
    1
    JustAnotherDude
    Offline

    Junior Member

    Posts: 37
    Threads: 2
    Joined: 2024 Apr
    Reputation: 0
    Country:United States
    #2
    2025-04-27, 01:23 AM
    I have my system set to just never suspend, always on. Does the system wake up and allow jellyfin streaming once it is already asleep?
    OpenMandriva ROME
    Ryzen 7600
    Arc A380
    32GB RAM
    x3 8TB hdd mdadm RAID5
    Kwakers
    Offline

    Junior Member

    Posts: 9
    Threads: 3
    Joined: 2023 Dec
    Reputation: 0
    Country:United Kingdom
    #3
    2025-04-27, 06:16 AM
    To wake up the PC/Server you have to configure "wake-up on lan" or "wake-up on wireless lan" if your hardware supports it (which in 2024/2025 most do) on your PC/Server.  You can then use a WOL client on your phone or laptop (or possibly streaming stick) to wake up the PC/Server.

    WOL Clients I use:
    Linux : gWakeOnLAN from the Linux Mint software manager.
    Android : "Wake On Lan"
    Apple : "RemoteBoot WOL".

    All of these will wake up my Desktop PC (currently running Windows 10) in an upstairs room.  
    I use https://github.com/jonschz/jellyfin-plugin-preventsleep by @jonschz (Windows ONLY) to stop the windows desktop from sleeping whilst streaming.
    I need to move it to Linux which is why I have created this application.  There was a quick hack by @txhammer68, but it did not include preventing sleep if the OS was on the logon screen.

    From what I read a while back, Jellyfin developers will not add a wol client to the jellyfin app. I believe the plex client has it, but not sure why Jellyfin clients don't.  With the price of electric going up and modern pc's/laptops able to support running Jellyfin Server (e.g. memory size, processor and disk size), more people are just using an old laptop/pc to run JS.  For the 2-4hrs a day/couple of days or so they use it, they want to be able to suspend it and wake it up after the 20-22hrs/days it is suspend. They don't want to have to have it running 24x7 when it is technically possible to suspend and wake it and has been for years.
    Kwakers
    Offline

    Junior Member

    Posts: 9
    Threads: 3
    Joined: 2023 Dec
    Reputation: 0
    Country:United Kingdom
    #4
    2025-05-13, 08:31 AM
    I've just found this as well which is an alternative to my code if you want some choice.  If I had found this first it may have saved me a couple of weeks of coding and testing.  I have not tested the below, but thought I would add it here for information.

    https://github.com/bulletmark/sleep-inhibitor
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode