I've been having A/C problems with my car the past 2 years and the symptoms sound exactly like those described in this thread. I took it to an A/C guy last summer and he checked over everything, replaced a relay and re-gassed the system. It kind of improved the cooling a bit but it was never as cold as it should be most of the time, just sometimes it would be really cold. Coming into summer again it is really lacking.
I have ordered the compressor control valve off AliExpress after getting under the car to read the correct part numbers off the compressor. Once it arrives I will have to get the gas pumped back out to install it and then re-filled.
I will report back if it fixes the problem.
My car is a 2011 XC60 D5 with a Sanden Compressor PXC16 part No. P31315453