Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Seems this is an open problem -- streaming over Samba apparently doesn't pause the idle timer on Ubuntu (12.10 Unity), so the machine will suspend after the usual 30 minutes despite the fact that I'm streaming something.

I found this solution for Gnome, but nothing for Unity: http://aikar.co/2011/03/03/ubuntu-prevent-sleep-samba/

Any advice?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

For what it's worth, Caffeine works if you tell it to active when smbd is running, but smbd doesn't stop or start based on when you're streaming -- it'll make the machine effectively never sleep and the display never turns off.

share|improve this answer
    
For a workaround so far I've just been VNCing into the machine and turning on caffeine whenever I start streaming media over samba. Not too clean, but it works. –  serilain Jan 12 '13 at 21:44
add comment

from the linked thread: this works fine in unity as an */30 * * * * cron job:

#!/bin/bash
if [ `/usr/bin/smbstatus | grep DENY | wc -l` == "0" ] ; then
    pm-suspend
else echo “Got user on SMB”
fi
exit 0
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.