If DSPSpeed will be configured similar to CPUSpeed so that users can set a max overclock limit, with default settings for 600MHz/1GHz setup, then we should be safe with a non-sudo dspspeed settings.
I second that. If I am not mistaken, that's how notaz implemented it right now.
There's
/etc/pandora/dsp.conf that lets you configure the min/max limits, then there's
/usr/pandora/scripts/op_dspspeed.sh that lets change the current clock rate.
/proc/pandora/dsp_mhz_max can be read to determine the current rate but it should not be written to directly since it ignores the min/max settings defined in
dsp.conf (
same thing with cpu_mhz_max and cpu.conf). You need to be root in order to write to the
/proc files, though.
Just like
op_cpuspeed.sh,
op_dspspeed.sh should be added to the sudoers so no root passwd entry is required.
I do not see any reason why this would cause any serious problems.
(
maybe a decreased unit life time but chances are that everything else will fall apart before the SoC surrenders yes this is completely off topic but ED, I beg you to use a better case in the DragonBox or whatever it will be called. My Ghz Pandora is just two months old, I treated it like a raw egg and yet the upper part of the case already has two cracks -- just from opening/closing the lid!)
Like the CPU max rate in
cpu.conf, the DSP max rate has to depend on the Pandora edition -- you probably already set that during install/reflash (after checking the the SoC type ?)
I want to try to use of gtkdialog to create a complete UI for CPUSpeed and DSPSpeed-Settings, should be a lot better than using multiple zenity dialogue
It would be nice-to-have but is it really worth the effort ?
The current zenity dialogues are fine, IMHO, and ppl. will (most likely) install SysInfo anyway, so it would be great if _wb_ would add DSP clock info + controls to his tool (on the processor page). I would suggest to use the system bus speed (
fn+
<,
>) keys for that, and move the sys.speed controls to a less comfortable key combo, e.g.
shift+
<,
>
So in short I'm strongly against op_sysspeed.sh not requiring a password, but still in doubt about op_dspspeed.sh
I agreed with your
op_sysspeed.sh concerns but see no issue with adding
op_dspspeed.sh to sudoers (
except for what I said at the end of this post).
Besides, you currently do not need to be root to change the DSP clock rate (if you think about it!) but my plea to all devs is
not to try to be clever and abuse this loophole, but rather use the
op_dspspeed.sh script instead, please!
I think it would be good if you could set a global max RAM overclock that is respected by op_sysspeed.sh (and also a global minimum by the way, because underclocking it too much also leads to trouble). You would still need to enter the root password to change that global maximum. The initial value for the maximum could be as low as the default value for the SoC.
I have no motivation to work on this, patches welcome.
A
sys.conf would make sense, especially because of the reasons you mentioned (
potentially dangerous resp. not so well understood like CPU/DSP under/overclocking), i.e. the user/UI-configurable values should be clamped to reasonable limits.
Then again, the comments in
op_sysspeed.sh imply that this is quite a hack and changing the sysspeed, regardless of the value, could already be problematic..
Hell I'm starting to regret I've added op_sysspeed.sh thing at all.
well, it's up to the user to shoot her/himself in the foot. they've been warned. Although, assuming that
gksudo is used when this is done via the UI (SysInfo), it would probably be a good idea to add a warning message (in SysInfo) that clearly states that this might cause e.g. SD card corruption ...
Last but not least, the only reason I advocate password-less CPU/DSP clock rate changes are the system tools (CPU-Speed, DSP-Speed, SysInfo).
Normal applications should have no business changing these clock rates, IMHO.
AFAIK, unfortunately it's not possible to configure sudo so that it allows access only from certain parent processes (
even if it were possible, you'd have to exclude e.g. bash).