A possibility to control the electrical activity of extended defects (grain boundaries, dislocations) under annealing and hydrogen plasma treatment by different regimes of silicon ribbons grown with the edge-defined film-fed growth technique was studied. It is shown that the results of hydrogenation of grain boundaries (GBs) significantly depend on two factors: the type of GBs (deviated or general) and the state of ribbons (as-grown or annealed). Heat treatment of polysilicon in different ambients results in a considerable decrease of the electrical activity of dislocation, and special and weakly-deviated GBs too. On the contrary, the activity of general and highly-deviated GBs is enhanced after annealing. Our investigation has revealed that the electrical activity of general GBs is defined significantly by the cooling rate after annealing.