[Nexus 5 Android Development] xeraphael:
For the gpu issue, see here: http://xdaforums.com/showpost.php?p=63175463&postcount=2655

For governors, I mostly stick with the three oldies: interactive, ondemand, conservative. Most other governors I find to be gimmicks that don't really offer anything extra that's actually useful, and some I don't understand how their algorithms work, so I don't use them.

For my daily usage, I usually opt for interactive + msm_sleeper, which I've tuned to give reasonable performance while being reasonably battery-friendly.

#!/system/bin/sh

echo 450000000 > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk
echo 0 > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_pwrlevel
echo 55 > /sys/module/msm_kgsl_core/parameters/down_threshold
echo 85 > /sys/module/msm_kgsl_core/parameters/up_threshold

echo 0 > /sys/kernel/msm_limiter/limiter_enabled

echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 2419200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 422400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1267200 > /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq
echo 1 > /sys/devices/system/cpu/cpu1/online
echo interactive > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 2419200 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 422400 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1267200 > /sys/devices/system/cpu/cpu1/cpufreq/screen_off_max_freq
echo 1 > /sys/devices/system/cpu/cpu2/online
echo interactive > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo 2419200 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 422400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo 1267200 > /sys/devices/system/cpu/cpu2/cpufreq/screen_off_max_freq
echo 1 > /sys/devices/system/cpu/cpu3/online
echo interactive > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo 2419200 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo 422400 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 1267200 > /sys/devices/system/cpu/cpu3/cpufreq/screen_off_max_freq

echo "30000 1728000:60000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 1267200 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis
echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "95 1958400:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack

echo 1 > /sys/devices/platform/msm_sleeper/enabled
echo 0 > /sys/kernel/intelli_plug/intelli_plug_active
echo 0 > /sys/kernel/msm_mpdecision/conf/enabled
echo 0 > /sys/module/msm_hotplug/msm_enabled

echo 2 > /sys/devices/platform/msm_sleeper/down_count_max
echo 1 > /sys/devices/platform/msm_sleeper/suspend_max_online
echo 85 > /sys/devices/platform/msm_sleeper/up_threshold

renice 14 `pidof kswapd0`

sysctl -w kernel.random.read_wakeup_threshold=512
sysctl -w kernel.random.write_wakeup_threshold=1024
sysctl -w vm.dirty_writeback_centisecs=6000
sysctl -w vm.overcommit_ratio=20
sysctl -w vm.swappiness=0
sysctl -w vm.vfs_cache_pressure=40

echo 0 > /sys/block/mmcblk0/queue/iostats
echo 512 > /sys/block/mmcblk0/queue/nr_requests
echo 2 > /sys/block/mmcblk0/queue/rq_affinity
echo 0 > /sys/block/mmcblk0rpmb/queue/iostats
echo 512 > /sys/block/mmcblk0rpmb/queue/nr_requests
echo 2 > /sys/block/mmcblk0rpmb/queue/rq_affinity

echo 2 > /sys/devices/system/cpu/sched_mc_power_savings
echo N > /sys/module/cpu_boost/parameters/hotplug_boost
echo "0:0 1:0 2:0 3:0" > /sys/module/cpu_boost/parameters/input_boost_freq
echo N > /sys/module/cpu_boost/parameters/load_based_syncs
echo 0 > /sys/module/cpu_boost/parameters/sync_threshold

io scheduler doesn't really matter, but stick with fiops (battery), row, or bfq (multitasking performance). I find bfq a bit tricky to tune properly for various scenarios, but the CM developers seem to like it, so I dunno. Note that my settings above may not be suitable for gaming as I've biased the gpu freq scaling rather conservatively (I don't game on mobile). Also, my settings assume no swap, and stock voltages (or global undervolt/overvolt for all frequencies).