How to come up with an non-trivial idea in theoretical computer science?
Almost certainly there are lists of open problems in your particular subfield.  Find them and read them.  Although it's rather unlikely you will be able to solve these problems --- at least right away ---, use them as a starting point.  Can you solve some particular cases?  Can you solve a less general problem?  Can you show a more general problem is computationally difficult?
Read what other people are doing.  This means making a list of the conferences and journals in your area, and devoting at least an hour a day to reading papers in them.  There is no need to understand everything at once.  Try to familiarize yourself with the general themes, then pick one or two papers that seem interesting or fundamental and immerse yourself in them.  Study the
techniques and proofs.  Can you apply them to similar or related problems?  Work out specific examples in detail, to the extent possible.
When reading any result, ask yourself:  are all the hypotheses necessary?  What if the hypotheses are weakened or strengthened?  Are the bounds really optimal?  If only an upper bound is proved, can you prove a matching lower bound?