2

I am using ubuntu as NAS with Samba connected via Ethernet on my router to organize photos and movies. Automatic suspend is on after 15 minutes idle and it's working fine. It's also working fine when pressing a button to awake or via wol magic packets thru a client. I am using my laptop, 3-4 mobile phones, a tablet, and a pc to save photos and family documents as window or android clients to the server. I connect via wifi to the server for watching movies. The problem is that the server is suspending while I am watching (streaming) a movie. (vlc or kodi). Everything else is working fine! I want the server to suspend when idle and NO network traffic. How to do this?

Installed: ubuntu 18.04.1 lts. Gnome 3.28.2. AMD® Ryzen 3 2200g, 8gm ram, boot:ssd128gb, 3tb toshiba (data and movies)

aalve
  • 21
  • Welcome to AskUbuntu. This may possibly be a duplicate of https://askubuntu.com/questions/170307/how-does-ubuntu-determine-inactivity-before-suspending – Bernard Wei Aug 28 '18 at 21:07
  • thanks for replying. I can understand that suspend ignores network traffic. But is it possible in anyway to overcome this? There is a script keep.awake but it didn't work for me or I couldn't make it work. I need the "suspend" function because the server is working only for some hours a day and I don't want to work 24/7. – aalve Aug 28 '18 at 21:20
  • Oh good, you modified the title to this question. The best way I think is to diable the desktop suspend on idle, that is not suitable for server type activities. Treat this like a server without desktop. So without the GUI trying to put the computer to sleep on keyboard/mouse idle. You need to figure out how to check if the network is IDLE, that's something you have to figure out as network connection usually have some periodic activities. Once you detect network is idle for 15 minutes, issue the pm-suspend to suspend your server. You can set your bios to do a wake on network activities. – Bernard Wei Aug 28 '18 at 21:53

1 Answers1

-1

Here first main website and second explained for use NAS. I used in my desktop, this daemon works fine.

Development major was for server, but as I mentioned It work in desktop.

  1. https://github.com/languitar/autosuspend
  2. https://blog.ja-ke.tech/2020/05/30/nas-automation.html