This is not strictly a Linux-issue as I reproduce this issue under Windows 10 as well (but can not reproduce under Android or macOS), but I will be using Linux for any troubleshooting and I wasn't sure where else to post this.
I have a pair of Sony WH1000MX5 that acts like an expensive piece of garbage so far. I will eventually (usually within 2-10 minutes usually) hear crackling noises when using the headset via Bluetooth in high-fidelity mode on my Linux machine (and as mentioned above, this is reproduced on two other machines running Windows 10). The crackling noises are there regardless of whether active noise canceling is active or not. It is not constant, but it is enough to significantly reduce the listening experience, especially for tracks where not too much is going on, such as quiet piano pieces.
On my Linux machine, I can choose between three codecs: SBC, SBC-XQ and LDAC. It tends to be less pronounced using the LDAC codec over SBC (right now I've had a longer period with no issue). SBC-XQ also seems better. However, I have experienced it for all choices of codecs before. Also, under Windows (which I must use for work), this does not seem to be a choice at all. But I wonder if the problem lies here? I don't know much about Bluetooth codecs.
Ideally, as in addition to these issues, they are not very comfortable, I would like to return them and get a refund (should be possible under local laws), but I am having some issues with the retailer claiming they can't find anything wrong with them after two trips to a repair shop. The first time they factory reset it and updated the firmware, the second time they did nothing. I don't think local Sony support will be of much help, and the local laws relate to to the buyer/seller contract, so for the refund or repair they will anyway refer me to the retailer.
So I am trying to get a better understanding of the issue before pursuing this further, and if I fail to get a refund, I would like to fix the issue if possible. So if anyone is familiar with this and could help point me in the right directions to fix these issues, I would be very grateful.
The mx5 only support sbc (minimum to support) aac and LDAC. They dropped aptx to only use their own high latency (and not that much better) codec. The headphone has BT 5.3, but does not support LC3 (an extremely good, low latency codec integrated in base bluetooth).
If you want to check what codec is used in windows, or change, there is a tool : https://www.bluetoothgoodies.com/a2dp/
Not sure if it's free or free trial. But they also have a software allowing to check what is currently in use which is a free trial.