[mythtv-users] Video jitter possibly cased by low cpu usage

Marius Schrecker marius.schrecker at lyse.net
Mon Dec 16 18:24:40 UTC 2013


An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20131216/f968030d/attachment.html>
-------------- next part --------------


frequencyup.sh

#!/bin/bash

echo 1800000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
> /dev/null

-------------------

frequencydown.sh

#!/bin/bash

echo 1000000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
> /dev/null

--------------------

This is in my /etc/sudoers file
{username} ALL=(ALL) PASSWD: ALL, NOPASSWD: /usr/bin/tee
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

--------------------

Finally I trigger the scripts with the "Playback started" and "Playback
stopped" system events. I also trigger the slower clockspeed when paused, and
unpaused but that bit's optional.
--
Stuart MorganHi again,

 The issue is certainly better if I set a higher min. freq. but I found I had to raise the frequency on both cores to 2300000 to minimise the problem. Now I'm evidently doing something wrong in my scripts or sudoers file because when I run the script manually it sets both cpu cores, but when I invoke it as a system event only cpu1 seems to be set. Mythfrontend runs in the "mythuser" user context.


Here are my scripts:
/usr/local/bin/frequencydown.sh
#!/bin/bash
echo 800000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq > /dev/null
echo 800000 | sudo tee /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq > /dev/null

/usr/local/bin/frequencyup.sh
#!/bin/bash
echo 2300000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq > /dev/null
echo 2300000 | sudo tee /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq > /dev/null


and /etc/sudoers.d/cpufrequency_video_playback

mythuser    ALL=(ALL) PASSWD: ALL, NOPASSWD: /usr/bin/tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
mythuser    ALL=(ALL) PASSWD: ALL, NOPASSWD: /usr/bin/tee /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq


 


More information about the mythtv-users mailing list