Under some circumstances, a person who goes to school in state X but last had a permanent residence in state Y should be regarded as a resident of state X; in some other cases, the person should be considered a resident of state Y. The proper thing to do would be to make people choose which state is their 'home'.
If the person going to school in state X obtains or renews a driver's license from state Y, I would consider that a sign that the person should request an absentee ballot from state Y and vote in that state's elections. If the person wants to be declared a resident of state X, he should affirm his residency there, and should not get a license elsewhere.
Perhaps the best thing to do would be for the federal government to specify a standard procedure for states to exchange voter-registration information. Registration changes should be processed in such fashion as to ensure continuity of people's right to vote.
For example, if Joe Green moves to a state which requires registration 30 days prior to an election, and residency 30 days prior to registration, he should retain the right to vote in his old state (absentee if necessary) for something over 60 days. Probably either 67 days or the date his registration would become effective, whichever comes first.
In cases where different states have elections on different days, it may be hard to formulate totally sensible rules (e.g. if Joe Green had voted in the primaries for both national and local candidates prior to his move, and his destination state had later primaries, to what extent should he be entitled to vote there?)
Michigan law states that the voting adddress and driver’s license (or state issued ID card) address must be the same. If you get an out-of-state drivers license, you just forfeited the right to vote in Michigan. Also, if you register using an address that doesn’t work two weeks later when the voter card is mailed, it seems to me you never lived there.