- This topic has 20 replies, 5 voices, and was last updated Oct 18-1:29 pm by augusteBurin.
-
AuthorPosts
-
October 14, 2022 at 9:49 pm #90728Member
augusteBurin
::Hello, back to business, I take the script up again, and I see it will maybe need some adjustments in order to determine the idle limit. having things like firefox and libreoffice writer running
it feels to busy. Any hints how to trig this? Or maybe I didn’t wait long enough for a relevant average measure?More to come: There is also a problem with the poweroff command as it appears here: yad –on-top –text “SHUT DOWN” –timeout 4 –timeout-indicator=top –button “Cancel” || poweroff
That is: it doesn’t poweroff the machine, though doing the poweroff command in a shell does it.Thanks in advance
ab- This reply was modified 6 months, 3 weeks ago by augusteBurin.
- This reply was modified 6 months, 3 weeks ago by augusteBurin.
- This reply was modified 6 months, 3 weeks ago by augusteBurin.
October 15, 2022 at 10:05 pm #90783MemberVincent17
::Hello Auguste,
Sorry, “poweroff needs to be superuser”. I forgot I had changed that in my system. Tryyad –on-top –text “SHUT DOWN” –timeout 4 –timeout-indicator=top –button “Cancel” || sudo poweroffRegarding cpu load, you could run htop in a terminal while doing your normal things and watch the Load average item (2nd row, 2nd column, 1st number) to get an idea of an appropriate number to use in the script.
- This reply was modified 6 months, 3 weeks ago by Vincent17.
October 16, 2022 at 1:51 pm #90797Member
augusteBurin
::You’re a flower, as we say in french!
[almost SOLVED]
- This reply was modified 6 months, 3 weeks ago by augusteBurin.
- This reply was modified 6 months, 3 weeks ago by augusteBurin.
- This reply was modified 6 months, 3 weeks ago by augusteBurin.
October 17, 2022 at 9:56 am #90838Member
augusteBurin
::This script works quite well, it checks fine the load average but it does not consider mouse or keyboard activity, not at all. Sorry to say that, Vincent17 (I have installed xprintidle)
Workaround?October 17, 2022 at 3:59 pm #90848MemberVincent17
::it does not consider mouse or keyboard activity, not at all.
Do you mean that the script powers off the computer even if you are moving the mouse or typing? To test xprintidle, you could try in a terminal
sleep 5; xprintidle [ENTER]
If you don’t touch the computer for 5 seconds, it should print out a number close to 5000. If you use mouse or keyboard during the 5 seconds, it should print out a smaller number. xprintidle has always worked for me, but if for some reason it does not on your computer, then the script is useless for you. 🙁 I don’t know a workaround.EDIT: This ubuntu user found that a certain game resets the variable used by xprintidle every 30 seconds.
- This reply was modified 6 months, 3 weeks ago by Vincent17.
October 18, 2022 at 1:29 pm #90908Member
augusteBurin
::Hello
sleep 5; xprintidle
That works fine: idle = 4959
Mouseactivity : less than 3000Trying the script again today seems like working fine. I have no idea why yesterday it didn’t.
Well: SOLVED
Thanks a lot!
(And I dont game) -
AuthorPosts
- You must be logged in to reply to this topic.