Sunday, April 24, 2016

Post-installation configuration (also reduce heat) for Windows 7/8 on Macbook Pro

After installing Windows 7 on Macbook Pro 13 inch late 2011, most of the things work out of the box using Boot Camp drivers. However, there are still things you need to manually configure to make them work well such as:

HOT TEMPERATURE NOTE

I'm not sure if they are the cause of the problem, but I made the change and my machine cooled down a lot. Seems like Windows has many more services that do disk activities even when the machine is idle such as indexing, defrag scheduler, and Windows Defender. This cause the disk much hotter than on Mac OS then the rest palm area is very warm all the time.
- Don't use third-party anti-virus program. Use Windows Defender, but turn off Real Time Protection or completely disable this program.
- Go to Control Panel, Power Options, and click on Change Plan Settings. Then, click on "Change advance power settings" and select "Process power management" item from the listbox. Set "Maximum processor state to 97%" and "System cooling polcy" to "Passive" for both "Plugged in" and "On battery".
- Disable Adobe Flash Player in all browsers
- Install Power Plan Assistance (i installed it to turn off backlid keyboard automatically when login but the temperature seemed to reduce too)
- Go to Control Panel > Administrative Tools > Task Scheduler > Task Scheduler Library > Microsoft > Windows > Defrag > then disable the "ScheduledDefrag"
- Disable PreFetch and SuperFetch
- Go to Control Panel > System > Advanced system settings > Advance > Settings > Custom and check only: "Animate controls and elements inside windows", "Fade out menu items after clicking", "Show shadows under windows", "Show thumbnails instead of icons", "Slide open combo boxes", "Smooth edges of screen fonts", "Smooth-scroll list boxes"
- Reduce CPU usage and Disk Activity in Chrome by disable "Enable phising and maleware protection"
- Turn off "Auto-play video" feature on Facebook
- Perform the step in Disable Unnecessary Services section below

Increase SSD's lifespan

Reducing read/write operations does increase the lifespan of SSD. Turning off some services such as indexing, hibernation, and automatic defragmentation not only reduce the heat but also increase the SSD's lifespan.

SMC Fan

What i hate about Lubbo's Fan Control is you have to put it in Startup menu yourself to make start automatically when login and its GUI will open too. It does not minimize in system tray automatically. MacFan Control beat it to this. Then, I configure the fan speed based sensor CPU Core 1. Min value is 35 degree celsius and max value is 83 celsius so that the fan speed is never below 4200 even if the machine is idle.

Power Saver

I enable Power Saver mode in Control Panel. Then, I click on Change plan setting and Change advance power settings. Then, under Processor Power Management, I set Maximum Processor State to 90% when On Battery and Minimum Processor State to 5% for both On battery and Plugged in.

Reduce Animations

Open Control Panel, then Ease of Access and Ease of Access Center. Then check the option "Turn off all unnecessary animations (when possible)"

Disable Indexing Search (to improve performance or might reduce heat)
1. Open Windows Explorer and right click on the drive you want to stop indexing then select Properties. After than, uncheck "Allow files on this drive to have contents indexed in addition to file properties" and click OK.
2. Disable Windows Indexing service in services.msc.

Disable Unnecessary Services

Start "services.msc" program and stop and disable the following services (reference):
- Windows Update
- Google Update Service
- Server
- Computer Browser
TCP/IP NetBIOS Helper
Windows Error Reporting Service
Windows Image Acquisition (WIA) (If you don't have a scanner)
- Windows Search (If you don't use Windows built-in Search feature frequently)
Print Spooler (If you don't have a printer)
IP Helper (If you don't use IPv6 connection)
- Diagnostic Policy Service
- Superfetch
** You might also try registry tweak here to make it faster and so not hotter.

Remap Keys

- To remap the right Command key to Control key, you can use sharpkeys.codeplex.com



Thursday, April 21, 2016

Installing Khmer Unicode Font on Windows 7

1. Download the installation file from here and install it
2. Manually install the fonts
   - Download fonts LimonS1 and LimonR1
   - Double click on them and click on Install button

Configuring Ubuntu 15.04 on Macbook Pro 13 Inch Late 2011

Most of things work out of the box for Ubuntu 15 on Macbook Pro but there are still something you have to fix.

Keyboard backlight is reset to maximum every time I reboot


Put the following command in /etc/rc.local file just before 'exit 0':
chmod 777 /sys/class/leds/smc::kbd_backlight/brightness
Then add the following command in /etc/profile file:
echo 0 | tee /sys/class/leds/smc::kbd_backlight/brightness

Note that we can just put the second command in /etc/rc.local and it should work but I don't know why the content of the file is reset back when I enter the login screen every reboot.

Reverse function keys


To use 'fn' key in combination with function keys to turn on or off volume for example, you must put the following command in /etc/rc.local just before 'exit 0':
chmod 777 /sys/module/hid_apple/parameters/fnmode
Then, add the following command in /etc/profile file:
echo 2 | tee /sys/module/hid_apple/parameters/fnmode

Trackpad


For drag and drop, just use your index finger to click and hold the trackpad and move your middle finger for dragging.

In my case, 3-finger tap for making middle click does not work so I have to configure it in the default synaptics driver settings. You can use synclient program to make the real-time change to the settings but just temporarily.
synclient TapButton1=1
synclient TapButton2=3
synclient TapButton3=2
synclient ClickFinger3=2
1, 2, and 3 mean left, middle, and right buttons respectively. To make permanent change, you can put those commands in a script file, /usr/share/mysynclients.sh for example and then add it to Startup Application. Or you can try to modify xorg.conf file but it made palm detection not work well. However, if you want to do it, you can put the following codes in /usr/share/X11/xorg.conf.d/50-synaptics.conf file as following:
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
        Option "TapButton1" "1"
        Option "TapButton2" "3"
        Option "TapButton3" "2"
EndSection
But, it might not work as the Gnome setting daemon in /etc/X11/xorg.conf file will override existing settings in /usr/share/X11/xorg.conf.d/50-synaptics.conf. You can fix it by:
> sudo apt-get install dconf-editor
> dconf-editor
And then, browse to /org/gnome/settings-daemon/plugins/mouse/ (or /org/cinnamon/settings-daemon/plugins/mouse/ for cinnamon) in the editor and uncheck Active checkbox. Then, reboot.

Disable locked drags
synclient TapAndDragGesture=OFF

Sensors (Fan)


coretemp allows lm-sensor detect the other sensors such as the rotation speed of the fan and the GPU temperature. Typing the following command will activate the coretemp in next reboot:
sudo modprobe coretemp
You should use fan controller daemon included in the mactel-support ppa called macfanctl.
sudo add-apt-repository ppa:mactel-support/ppa 
sudo apt-get update
sudo apt-get install macfanctld

You can change the minimum fan speed in this file /etc/macfanctl.conf.

Others

For more configurations for such as battery saving (or you can install indicator-cpufreq), go read this.



Related Articles:
http://myt8chnote.blogspot.com/2016/04/installing-ubuntu-on-macbook-pro-using.html

Monday, April 18, 2016

Where is Java home on Mac OS X?

I'm using Mac OS X Lion v10.7 and I have downloaded Java 8 DMG file from Oracle's web site and installed it. After installing it, i can't find Java home directory. According to http://stackoverflow.com/questions/1348842/what-should-i-set-java-home-to-on-osx, there is an executable file that print Java home location to console by default, /usr/libexec/java_home.

> ls -l /usr/libexec/java_home
lrwxr-xr-x  1 root  wheel  79 Apr  7 17:03 /usr/libexec/java_home -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home
> /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home

And then you can set JAVA_HOME variable in /etc/profile file as following:
> export JAVA_HOME=$(/usr/libexec/java_home)


Add favorite folder to Finder's sidebar

To add a favorite folder to the Finder's side bar on Mac OSX Lion v10.7, we can just simply drag that folder in Finder to the sidebar. ;)

Saturday, April 9, 2016

How I backup/clone all drives of my Macbook Pro

I'm running OS X Lion v10.7 on Macbook Pro 13 inch late 2011. I have installed 3 operating systems on it such as Mac OS X Lion, Windows 7, and Ubuntu 15.04. To avoid problems in the future such as disk failure, I have backup my drive as following:

1. Mac OS X Lion is my primary OS and I use Carbon Copy Cloner to clone the partition to external hard disk drive so I can boot OS X from the external HDD any time to restore the partition.

2. To backup and restore Windows 7, I must do it from within OS X using Winclone app version 4.x.

3. For Ubuntu, I used Clonezilla to backup/restore the partition it was installed on to/from image files. I installed Clonezilla Live on a USB drive so that I can boot into Clonezilla from that USB by not depending on any operating systems. According to Clonezilla's official website, I made the bootable USB on Ubuntu using Tuxboot program. There are 2 methods to make a Clonezilla live USB by Tuxboot, online (downloading) and offline (ISO file). I used the online method in which Tuxboot downloaded the latest Clonezilla live for me and wrote it to my USB drive.

I think I should use only Clonezilla to backup/restore all partitions of my Macbook Pro.


Installing Ubuntu on Macbook Pro using bootable USB stick

I'm using Macbook Pro 13 inch late 2011 and I have just installed Ubuntu 15.04 on it successfully using a bootable USB stick. I followed this post http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx to make a bootable USB stick. When restarting machine, I hold option key until I see an option to boot from the USB drive. Surprisingly, it worked only for Ubuntu 15.04 ISO file I downloaded from Ubuntu's web site. For other previous versions such as 10.04 and 11.10, the USB drive is not bootable at all (it didn't show up boot menu).

Note that if you have an external hard drive and want to put Ubuntu Live on that partition to make it bootable, it wouldn't work. You can only do it with the entire USB drive.


Related Articles:
http://myt8chnote.blogspot.com/2016/04/problems-with-ubuntu-1504-on-macbook.html

Thursday, April 7, 2016

A workaround for setting up Windows 7 on Macbook Pro without optical drive

I want to make an update on the post i wrote here http://myt8chnote.blogspot.com/2016/04/installing-windows-7-on-macbook-pro.html After rebooting several time, the Windows partition was corrupted and then i also tried to do it the same way again many times but it no longer worked. I have just found a workaround for that.

As my Macbook Pro only boot from the USB drive that has OSX on it, I used Carbon Copy Clone to clone or backup my OSX partition to the external hard drive so if anything happens, I can use it to restore the main OSX partition.

I also have Windows installed along side the OS X. I downloaded the Winclone image file of Windows 7 from thepiratebay.se web site and use Winclone app on Mac OS X to restore the image file to another partition then the partition is bootable too.

NOTE: resizing partition might corrupt your Windows 7 installed even if the partition is not the one you installed Windows on.

Monday, April 4, 2016

How to prevent partition from mounting automatically on OS X Lion

You might have another OS installed a long side OS X and don't want to mount it when starting OS X to avoid modifying it accidentally which can corrupt the OS. To prevent the partition from mounting automatically, you can do as followings:

See which volume you don't want to be mounted automatically from the output of the command below.
> diskutil list

From the following command, note the Volume Name and Type (Bundle) attributes.
> diskutil info /Volumes/<Win7>
   Device Identifier:        disk0s6
   Device Node:              /dev/disk0s6
   Part of Whole:            disk0
   Device / Media Name:      BOOTCAM

   Volume Name:              Win7
   Escaped with Unicode:     Win7

   Mounted:                  Yes
   Mount Point:              /Volumes/Win7
   Escaped with Unicode:     /Volumes/Win7

   File System Personality:  Tuxera NTFS
   Type (Bundle):            fusefs_txantfs
   Name (User Visible):      Windows NT Filesystem (Tuxera NTFS)

Create or edit /etc/fstab file
> sudo nano /etc/fstab
LABEL=Win7      none    fusefs_txantfs  ro,noauto       0       0

Then, reboot machine. That's it.




Problems I solved:
At first, I put ntfs instead of fusefs_txantfs in /etc/fstab file then it didn't work. I changed it to fusefs_txantfs and it worked.