This is something that has been bothering me for a long time. I use the same SSID for both my 2.4GHz and 5GHz networks, so that clients can roam from one network to another. However, in this setup, the client decides what network it think will work best. And unfortunately, most clients just suck at making this decision.
Usually my clients end up connecting to the 2.4GHz network, unless they are in the same room as the AP. There's a simple explanation for this: the 2.4GHz network usually has a stronger signal strength, simply because the lower frequency penetrates walls easier.
A higher signal strength doesn't necessarily mean you will have a better connection however. With newer standards like 11AC, you can get a much better connection with a signal strength that is much lower than the 2.4GHz network.
So we need a smart algorithm that doesn't just look at signal strength or signal-to-noise ratio.
In wpa_supplicant, this is implemented in the wpa_scan_result_compar function. It was recently changed, so the situation should improve for most Linux clients in the future. If this is currently a problem for you, consider asking your distribution to backport these wpa_supplicant commits: 1420414 and b4d56ef.
Now you're probably asking yourself: why doesn't this guy just use a different SSID for the different frequencies. There's a few reasons. It does not allow roaming, it requires configuring both SSIDs in all your devices if you want to be able to connect when you're out of range of the 5GHz network, and you would need to prefer the 5GHz networks in your clients. This simple feature is unfortunately not even supported in many stock Android firmwares. Why this is not supported is beyond me, but I won't be going into that subject.
Another option would be to lock the client to a BSSID. This is fine, if you only use 1 AP, but it would also break roaming in a multi-AP setup. And some clients don't support this either.
So on my laptop, I patched wpa_supplicant, and I'm happy with its current behaviour. On my Android devices, I usually don't require a lot of bandwidth, so it's not a problem most of the the time, although they could also benefit from not using the crowded 2.4GHz band, be it to avoid interference with other networks or technologies (Bluetooth, Zigbee, ...)
Anyway, the idea for this post came from a very simple workaround that I implemented to for my Xbox One to connect to the 5GHz network. This thing is so braindead, that even in the same room with the AP, it insists on connecting to the 2.4GHz network. And damn, it is slow when it does so. (No, it's not the AP, I have been stress-testing the AP with a client using a really old Atheros 11N chipset, and it was able to do ~80Mbps most of the time). I noticed this when downloading the Ghost Recon Wildlands public beta. It was downloading at a miserable ~10Mbps, with a 200Mbps Internet connection. So I kicked the Xbox from the 2.4GHz network, causing it to roam to the 5GHz network, and the speed went up to ~30Mbps. Still quite slow, but a major improvement nonetheless.
And then I came up with this very simple solution to force the Xbox to use the 5GHz network: MAC filtering. This useless feature suddenly became useful. I added the MAC address of the Xbox One to the MAC filter of the 2.4GHz networks on both my APs, set it to blacklist mode, et voila. The Xbox now always connects to the 5GHz. network.
Then the full version of the game was released, I got annoyed with the still horribly slow download speed, plugged in a UTP, and saw the game come in at ~90Mbps. So if possible, use a wired connection. If not, you can probably benefit from forcing some devices to 5GHz.