site  contact  subhomenews

More on the "black desktop"

May 10, 2009 — BarryK
I think that I have narrowed down the problem. The daemon script /sbin/pup_event_frontend_d uses SOAP method to request ROX-Filer to modify the desktop icons. However, on a slow PC Rox is not quite ready and the result is that Rox crashes.

/sbin/pup_event_frontend_d has a 'sleep 2' at the beginning. I increased this to 4 seconds and that fixed it. However, I don't want to leave it at 4 seconds for faster CPUs.

What I would really like is some way of determining that Rox is fully loaded and ready to receive SOAP requests.

Failing that, a rough estimate of CPU speed should do the job. But how? On my laptop I can do this:

# dmidecode --string "processor-frequency"

...however that does not work on the Ntavo.

Hmmm, as pup_event_frontend_d has a 'sleep 2', maybe I could replace that with a loop, which would automatically take longer to complete the slower the CPU ...yeah, that might do it!

Comments

Re: black desktop
Username: BarryK
Ah, /proc/cpuinfo has speed information. So, I have put this code at the beginning of /sbin/pup_event_frontend_d: [code]sleep 2 #let the dust settle after X has started. #w471 slow cpus need more delay (well, rox does)... DELAYFACTOR=0 CPUMHZ=`grep -i '^cpu MHz' /proc/cpuinfo | tr -d ' ' | cut -f 2 -d ':' | cut -f 1 -d '.'` [ $CPUMHZ ] && [ $CPUMHZ -gt 100 ] && DELAYFACTOR=`expr 1100 \/ $CPUMHZ` [ $DELAYFACTOR -gt 0 ] && sleep $DELAYFACTOR[/code]

CPUMHZ with dual prcessors
Username: zygo
"# CPUMHZ=`grep -i '^cpu MHz' /proc/cpuinfo | tr -d ' ' | cut -f 2 -d ':' | cut -f 1 -d '.'` # echo $CPUMHZ 2199 2199 so grep -m 1 -i ... http://en.wikipedia.org/wiki/BogoMips BogoMips (from "bogus" and MIPS) is an unscientific measurement of CPU speed made by the Linux kernel when it boots, to calibrate an internal busy-loop.

Re: CPUMHZ
Username: BarryK
"zygo, Thanks for that feedback. I'm curious, what do the exact entries look like in /proc/cpuinfo?

My Acer's /proc/cpuinfo
Username: zygo
"I'm running Unnamed 1.1. Notice that bogomips is stated. processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz stepping : 13 cpu MHz : 2199.784 cache size : 2048 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm bogomips : 4401.88 clflush size : 64 power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz stepping : 13 cpu MHz : 2199.784 cache size : 2048 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm bogomips : 4401.19 clflush size : 64 power management:

dmidecode on your Ntavo
Username: zygo
"Barry, Please can say what you get on your Ntavo from "dmidecode --string "processor-frequency" ? Does it error becauses there is no such string decoded? Does "dmidecode" work?

Re: dmidecode
Username: BarryK
"zygo, No, dmidecode does not work at all, zilch, nothing.


Tags: woof