Read the statement by Michael Teeuw here.
Want to turn off my monitor
-
Thanks this is very useful information that I didn’t know before.
I have issued the sudo tvservice -o command and it did indeed shut down my monitor.
But what I am trying at the moment is to have it shutdown and wakeup the monitor with a usb webcam now.
That’s what I’m struggling with.
Cheers -
One interesting thing I like about the second way is it seems easy :) lol.
Would it be possible to say have the screen come on 6-9am in the morning Monday to Friday then come on again 4-10pm as everyone out at work or school during the day. Than say set it so that its on 8am till 10pm on a saturday and sunday when everyone is usually about.
Thanks
-
Sure, this is possible. For the beginning it seems easy, because u needn’t any optional hardware :)
For your understanding how cronjobs works u should note the following:
* * * * * user executive_command ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ │ │ │ │ └──── Weekday (0-7, Sunday is 0 or 7) │ │ │ └────── Month (1-12) │ │ └──────── Day (1-31) │ └────────── Hour (0-23) └──────────── Minute (0-59)So for your special wish ^^it should look like this:
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) 0 6,16 * * 1,2,3,4,5 root /home/pi/monitor_on.sh 0 9,22 * * 1,2,3,4,5 root /home/pi/monitor_off.sh 0 8 * * 6,7 root /home/pi/monitor_on.sh 0 22 * * 6,7 root /home/pi/monitor_off.sh #Or if you don’t want to create the *.sh files u can also just type the directly command.
Like this:0 6,16 * * 1,2,3,4,5 root /usr/bin/tvservice -p 0 9,22 * * 1,2,3,4,5 root /usr/bin/tvservice -o 0 8 * * 6,7 root /usr/bin/tvservice -p 0 22 * * 6,7 root /usr/bin/tvservice -oLast thing is the extremely easiest way because u just need to modify the crontab. there is nothing else needed at all.
Just put these commands in your crontab and u are done ^^ -
That’s brill your a legend, got a few hours to myself tomorrow so armed with all this information and sure be giving this a try see what the outcome is.
Thank you so much :) -
@Mykle1 said in Want to turn off my monitor:
{ exec(‘xset dpms force on’, null); }
{ exec(‘xset dpms force off’, null); }These commands do work. I just tested them on my desktop machine with a monitor connected through DVI and a laptop. Displays are immediately turned off (standby) and on. Here’s the laptop.
-
@Mykle1 that’s cool as :) what are you using for the voice command I love that its brill.
-
@robmcc83 said in Want to turn off my monitor:
that’s cool as :) what are you using for the voice command I love that its brill.
-
@cruunnerr i made your tutorial, works like charm! only problem i found is: replaced print “.”, with: print (“.”), Thenks!
-
@Jonae
i encounterd another problem, sometimes after display goes ON the resolution is changed. any ideas why? -
-
@karsten13 said in Want to turn off my monitor:
I had similar problems using
xrandrfor disabling/enabling the monitor.We did a fix in mm for the above problem (coming with next release) but I don’t know if this fixes your problem too.
You can find the fix in this PR.
Thank you, i updated the file, hope for the best :)
-
so far so good, no problems. so i can call it a fix for me.
Thanks
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login