I have never had more problems with a bike than I had with my 79 XS650. I hear the earlier bikes are somewhat more reliable, but the carbs on the 79 were early vacuum slide carbs and they were just awful. I was a lot younger then and didn't know so much about bikes or the Internet, so I was in way over my head with that beast. Now I know WHY I was having the problems I was having, and I could fix them... but be warned, the cost of owning a vintage XS is pretty high, because of all the stuff you have to do to make it reliable.
First off, the entire electric system is garbage. The metal in the wires had a high quantity of aluminum in the alloy, and it corrodes like you would not believe. So rewiring connections to the coils and headlight, and replacing the battery cables and starter cable is extremely important. Also, change the battery ground - its mounted to a thin piece of sheet metal that tends to rust out... and this will make all sorts of problems.
You'll also need to replace the coil and wires. The XS coil is extremely weak, and even with the above mods it may not have enough juice to start the bike when the battery is under load by the starter. (mine would only start on the kick starter).
The later bikes have mag wheels and the 1980 is the first one that comes stock with electronic ignition... but it's honestly a better idea to get an older bike that still had direct-slide carbs. The mag wheels and electronic ignition don't make up for how absolutely terrible the CV carbs were. The earlier bikes can be retrofitted with a dyna ignition, and the spoked wheels are lighter and retain that vintage look anyhow.
The swingarm bushings are made out of bakelite (a brittle plastic), and they were lucky to last 10k miles in the 70's. After 30+ years of sitting around, that stuff gets really brittle. Replace them with aftermarket bronze bushings. My bike had a nasty wobble around 70-75mph... and that was probably the cause.
The front forks need a brace BADLY. You can stand in front of the bike with the front wheel between your knees, grab the handlebars, and TWIST THE FORKS quite easily. Takes almost no effort. This is with all the pinch bolts tight and the fender mounted correctly.... the fender is made out of some kind of paper product I think... there can't be any metal there, because it bends and twists and provides ZERO bracing for the forks.
Brakes on the 79 were okay.. not great, but okay. The rear disk was a nice touch. Earlier bikes will have drum in the rear, and the earliest will have drum in the front too.
Front steering bearings need to be replaced too. Don't skimp there, go with tapered roller bearings.
If you have CV carbs, replace them. In fact, using a non-Yamaha carb is the way to go. You can buy a brand new pair of direct slide carbs off of eBay for $300 that are pre-jetted to work on the XS. That's the way I'd go if I really, really wanted to own one.
Or you could just buy a new Triumph Bonneville and have the vintage twin look with actual reliability....
Charles.