2012-11-19

Mac OS X Desktop Background is gray

One thing which bugged me was that every now and then my desktop background on my Mac Book Pro would turn plain medium gray at tome point. I cannot even tell when this happens. Trying to reset the background image will not help when this occurs.

(I am using an external monitor connected to the Mac Book Pro and I put this configuration to sleep and I turn the monitor off at least once a day. I do not power down or reboot the laptop at all unless absolutely necessary.)

Logging out and back in solves the problem, but is of course tedious. I found a better workaround here: http://reviews.cnet.com/8301-13727_7-57389668-263/os-x-desktop-backgrounds-gray-after-waking-from-sleep/

  • open a Terminal 
  • type: killall Dock
The background image is managed by the Dock application which automatically restarts when killed. This is of course not a solution, but is a rather easy way to 'fix' this, until it happens again. :-)

2012-06-14

Ubuntu 12.04: Boot Windows by default

If you have a dual-boot system with Ubuntu Linux and Windows and you would like to boot Windows by default instead of Ubuntu you will find to useful answers here:
http://askubuntu.com/questions/100232/how-do-i-change-the-grub-boot-order

I was using the GUI option since the manual option requires you to know the index of the Windows entry upfront (index starting at 0, for me Windows was at index 5).
This is what I did:

- Start a Terminal (search for 'Terminal' in one of the topmost icons), then paste/type this into the terminal:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
(enter password)
sudo apt-get update
sudo apt-get install grub-customizer
grub-customizer
(program comes up)
- click Preferences
- select Windows as default
- Close
- Save
- close the program
- restart to test it, done

2012-06-07

Viewing local manpages (files)

When I have an unformatted manpage file like foo.1 I had always big trouble looking at it. man foo.1 and setting the man path using -M did not help, and figuring out the usage of nroff manually is a pain. I found the answer on here which I just bluntly replicate here for my (and potentially your) convenience: http://craiccomputing.blogspot.de/2007/01/viewing-local-man-pages.html Just specify an absolute or relative path to the file, like:
man ./foo.1

2012-05-24

CPU Benchmark Intel Core i3-2350M vs Intel Core i7-2820QM

Today I benchmarked my i3 Linux laptop vs my i7 MacBook. The results are what I expected, though I am quite happy about the performance of the 'slow' i3, which is a really cheap Lenovo B570 mainstream notebook.

The benchmarks are of course rather meaningless.

Machines:
  • Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz 
    • (dual core, 4 cores with hyperthreading, no turbo boost)
    • (in a Lenovo B570 M58GMGE, 8GB, Ubuntu 12.04)
    • (according to cat /proc/cpuinfo)
  • Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz
    • (quad core, 8 cores with hyperthreading, turbo boost up to 3.4GHz)
    • (in a MacBookPro8,2, 8GB, Mac OS 10.7.4)
    • (according to Temperaturmonitor 4.94)
Benchmark      i3     i7     speedup
g++-4.6        6.8s   3.9s   1.74x
calc           5.7s   4.2s   1.36x
Cinebench CPU  2.22P  4.63P  2.09x (i3 Win7, i7 OSX)
Cinebench GL   12.40  27.90  2.25x (i3 Win7, i7 OSX)
Cinebench CPU  -      1.24   -     (VirtualBox guest Windows 7, host OSX, 1 CPU)
Cinebench CPU  -      4.27   -     (VirtualBox guest Windows 7, host OSX, 8 CPUs)
(s in real time)

Benchmark command lines:
  • time make CXX=g++-mp-4.6 OPT=-O3 -j 20 
    • compiling streplace 0.9.36
    • just 5 parallel objects (does not fill the 8 slots of the i7)
  • time calc 'log(fact(11**5))
    • single core
  • Cinebench 11.5 on Windows 7 SP1 and Max OS X 10.7.4