I need to change PhD topics. Should I pursue one of my advisor's ideas, or one of my own?
Big Fat Note On Timing: First and foremost here, make sure to changing your topic is allowed by your supervisor. Then your supervisor will check the time you have left and will point out if you can do it or not. You don't want to change a topic while your supervisor do not know about it.

Answer On Changing the PhD Topic With Your Supervisor Agreement

Ok, I did my PhD in CS as well; also was very close to change it for two times as my supervisor was not as an expert I thought he would be. So here my takes on changing your topic as a CS PhD student: 

1.What you have gained so far?: Without comparing yourself to anyone else, are you deep down happy with your progress and how much did you gained, knowledge wise, so far? The conclusion in this point brings me to the second point. 

2. Problem is Environment or Yourself?: After thinking about how much you have done, if the sadness relates to the environment (such as supervisor) or yourself (such as the issue of focus). 

2.1 If the problem is you: If the problem is you then, changing your topic does not change a thing. Now you might say well "I will change myself"; this is not as easy you might think and you might need professional help on this. If you see you need help and the supervisor is not helping either or even recognizing that you are having an issue, then you need to think seriously on how to get help. This is very important, as you might get depressed without doing anything wrong. You see what I'm trying to say here? 

2.2 Problem Is Supervisor: It is more common as you might think, so in this case, if you have the ability to do the PhD, then YOU need to inform the supervisor about the changes and YOU need to decide what you want to do. This might get ugly at times, because if the supervisor does not know the topic and tells you, your thesis is total rubbish, you should know "well I'm submitting it and defending it regardless". So basically, take the control of the situation from start to finish.  

2.3 Problem is Topic: To be honest I doubt it, because most of the time the problem is based on the first two sub points. Anyway if this is the case, then change the topic. Don't listen to supervisor to do a topic in a field he/she did not publish a thing for the last 5 years. Be honest to yourself and your supervisor ability before choosing it. This should be also discussed with your supervisor as well, don't accept anything without knowledge. I recommend to choose a topic that your supervisor is known for. If your supervisor works on software testing and you want to do a topic on code generation, things might not go well.