I've posted on this topic before on the b5 A4 forum, but didn't get an answer. I'm now reposting it on the b5 Passat forum as that's where most of the posts on this problem seem to reside. I also have some new information.
The problem is a speedometer that intermittently dies, along with all related functions (odometer, cruise control, etc). The G22 speedometer speed sensor on the final drive is the problem. Each time I unplug and reconnect the lead from the connector on the tranny housing, it causes the speedo to start functioning again - for a limited time.
Best result I had was spraying both sides of the connector with anti-corrosion/cleaning fluid, then working the male side of the connector on and off repeatedly to help remove any corrosion that might be on the contacts. This caused the speedo to work like brand new for several days/hundreds of kilometres. Then she died like before.
It appears likely therefore that the problem lies with the connector itself, or possibly the wiring close to it. Each time I fiddle with the connector, it either reestablishes contact between two pins which are intermittently breaking contact OR causes a broken wire to reestablish contact somewhere close to the connector.
I had the clutch replaced recently, and it's possible the wiring to the G22 (or the connector itself) might have been damaged in the process of dropping the gearbox.
ATM it's looking more likely to be in the wiring rather than the connector as the latter has been treated as above.
How do you replace a section of wire without buying an entire loom? Can you just buy a new male connector, solder on a couple of leads and splice this into the existing wiring?