diff --git a/ilwt_oc.c b/ilwt_oc.c
index fa19ea1..e964977 100644
--- a/ilwt_oc.c
+++ b/ilwt_oc.c
@@ -14,6 +14,7 @@
 */
 
 #include <stdio.h>
+#include <stdbool.h>
 #include <fcntl.h>
 #include <ctype.h>
 #include <stdlib.h>
@@ -31,6 +32,7 @@
 #define SYS_CMAX_C0 "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
 #define SYS_CMIN_C0 "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
 
+#define SYS_C1 "/sys/devices/system/cpu/cpu1"
 #define SYS_CGOV_C1 "/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor"
 #define SYS_CMAX_C1 "/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq"
 #define SYS_CMIN_C1 "/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq"
@@ -81,6 +83,7 @@ void my_trim(char *str)
       str[i] = 0;
 }
 
+
 int write_to_file(char *path, char *value)
 {
   FILE  *fd;
@@ -95,18 +98,26 @@ int write_to_file(char *path, char *value)
   return res;
 }
 
-int set_cpu_params(char *governor, char *min_freq, char *max_freq)
+int set_cpu_params(char *governor, char *min_freq, char *max_freq, bool dc)
 {
+  struct stat statinfo;
+
     if (write_to_file(SYS_CGOV_C0, governor) != 0)
       return -1; 
     if (write_to_file(SYS_CMAX_C0, max_freq) != 0)
       return -1;
     if (write_to_file(SYS_CMIN_C0, min_freq) != 0)
       return -1;
+    
+    if(dc) {
+      if (write_to_file(SYS_CGOV_C1, governor) != 0)
+        return -1; 
+      if (write_to_file(SYS_CMAX_C1, max_freq) != 0)
+        return -1;
+      if (write_to_file(SYS_CMIN_C1, min_freq) != 0)
+        return -1;
+    }
 
-    write_to_file(SYS_CGOV_C1, governor);
-    write_to_file(SYS_CMAX_C1, max_freq);
-    write_to_file(SYS_CMIN_C1, min_freq);
 
     char buf[255];
     buf[0] = 0;
@@ -324,6 +335,11 @@ int main (int argc, char **argv)
 	  int charging = 0;
 	  int low_batt = 0;
 	  int hot_batt = 0;
+          bool dc = false;
+          if(stat(SYS_C1,&statinfo)==0) {
+            __android_log_write(ANDROID_LOG_INFO, APPNAME, "Found 2nd CPU.");
+            dc=true;
+          }
 	  
 	  __android_log_write(ANDROID_LOG_INFO, APPNAME, "Starting service.");
 	  if (load_config(&conf) == -1)
@@ -373,8 +389,9 @@ int main (int argc, char **argv)
 	  if (strcmp(input_buffer, "awake") == 0)
 	  {
 		__android_log_write(ANDROID_LOG_INFO, APPNAME, "Setting awake profile for boot sequence.");
-		set_cpu_params(my_governor, my_min_freq, my_max_freq);
+		set_cpu_params(my_governor, my_min_freq, my_max_freq, dc);
 	  }
+
 		
 	  while (1)
 	  {
@@ -383,7 +400,7 @@ int main (int argc, char **argv)
 		if (asleep == 2)
 		{
 		  __android_log_write(ANDROID_LOG_INFO, APPNAME, "Setting sleep profile.");
-		  set_cpu_params(conf.sleep_governor, conf.sleep_min_freq, conf.sleep_max_freq);
+		  set_cpu_params(conf.sleep_governor, conf.sleep_min_freq, conf.sleep_max_freq, dc);
 		}
 		else if (asleep == 1)
 		{
@@ -433,7 +450,7 @@ int main (int argc, char **argv)
 				}
 			}
 				
-			set_cpu_params(my_governor, my_min_freq, my_max_freq);
+			set_cpu_params(my_governor, my_min_freq, my_max_freq, dc);
 		}
 	  }
   }
