stephenbrooks.orgForumMuon1General(poll?) Muon1 on laptops - default setting
Username: Password:
Search site:
Subscribe to thread via RSS
Stephen Brooks
2007-11-30 18:55:48
In v4.44 there's going to be a feature to make the Muon1 client sleep if running on a laptop that is on battery power.  However, I've got to figure out what the default setting for this should be.

If it's "N" then it will be annoying for laptop users as the thing will drain their battery by default unless they change the setting.

If it's "Y" then the people who know what's going on will be happy, but any new user who happens to try running the program while the laptop is on batteries will wonder why it's not running.

Any suggestions?
2007-12-01 19:22:01
I think the "N" setting is best, so everything stays the same.
Or if it would be "Y", the client could change in a "battery-mode" showing this information when started, and waiting for it to end.


PS: Is this a bug?  The date shows: "37-11-30 18:55:48"
Stephen Brooks
2007-12-02 01:30:06
I've made it say "In battery mode, sleeping..." when it is doing that (in graphical or commandline mode - obviously in background mode it doesn't say anything).  I'm tending towards thinking "Y" for the default actually but I'm still not sure.
2007-12-03 03:48:14
I'm the one who requested this. 

The defauult should be 'Y', because

1. battery life is more valuable, and
2. this not only concerns laptops, but also PCs with an USV in case of a power failure.

Since the config.txt has a tendency to reset itself (a real PITA), a default of 'N' would be no good.  And at the moment muon1 does not run with a read-only config.txt file.
Stephen Brooks
2007-12-04 18:33:29
I was worried about this "config.txt resetting" problem (I've never had it).  So put something into the config routine where if it couldn't open the config.txt file to read from it BUT the error was not that the file wasn't there (i.e. some other I/O problem) then it will wait a while and try again to see if it can be read from.  That might be why it's resetting: it encounters an I/O error, loads a blank config set into the client, which then repopulates it with the defaults and saves the file.
2007-12-05 11:08:42
One thing I really want to know is, why is muon1 writing to the config.txt on exit?  AFAIK there is no line in there that can be changed from the GUI or CLI client.
I had an idea to counter the file resetting.  I locked it down to read-only via NTFS ACLs.  But muon1 crashes if the config.txt is not writable.  Even setting a simple 'Readonly' attribute leads to a crash.
Stephen Brooks
2007-12-05 11:44:30
Muon1 reads the existing config.txt (or gets a blank set if it's not there) and then adds in any default values for parameters that aren't present.  It can also reset out-of-bounds values.  Then it saves it.  It does this before the start of each simulation, so a few things can be changed without restarting the client at all.
2007-12-06 04:55:50
Maybe have a second file, maybe named config-defaults.txt, where the user can put some (non-critical) values that will be used should the config.txt be resetted.  I especially think of values like BackgroundPriority=P, the samplefile and update behavior etc. In case the file is not present, internal defaults are used.  Ah yes, this file should never be written to by muon1.

Think of it like a 'template' for defaults.
Stephen Brooks
2007-12-06 12:03:00
Well the writing to the config.txt file shouldn't in principle cause any problems, so I'm just going to try and detect any I/O errors.
: contact : - - -
E-mail: sbstrudel characterstephenbrooks.orgTwitter: stephenjbrooksMastodon: strudel charactersjbstrudel RSS feed

Site has had 22185907 accesses.