In the Coolidge tube, the cathode is heated till electrons are thermionically ejected from the filament. We could also use photoelectric effect on the cathode plate to obtain these electrons for x-ray generation.
True
Let me just put it this way -
When superfast electrons are all you need,
Photoelectric effect should work indeed!
Light hit the metal cathode,
Out, electrons overflowed!
Thus the poor anode atoms, in x-rays, bleed!
Convinced? Since the essential part is that electrons with high kinetic energy must bombard the anode, it does not matter how these electrons are generated, as long as the external potential does its job of accelerating them towards the target. Thermionic emission has a much higher efficiency than photoelectric effect, thus becoming a good choice for the source of electrons.