Regrettably, in my own experience, it's rarely worth the effort to wrestle with wireless displays. Unless you either have 'highly' compatible devices (i.e. Samsung phone to Samsung TV), it's often rife with bad performance, bizarre behavior, and sudden drops.
My personal favorite quirk is a Fire stick that almost always exits mirroring before I can even begin streaming to it. It usually works on the second attempt, but it's so consistent that I've wondered if there's just something else out there "triggering" it when it sees the signal.
The smart stuff Samsung TVs try to do can be absolutely maddening. At some point about 6 (maybe 12) months ago, Samsung pushed an update to my TV that broke its ability to display HDMI output from a Linux machine. Like, literally just take standard HDMI output from a Linux machine and display it. This is especially enraging to me because 95% of what I used that TV for is as a display for my steam deck! Well, not anymore. I can't even use it with my laptop because it has the same problem. So now the TV just sits there and collects dust and reminds me never to buy a Samsung TV again. It's a real shame too, because other than the software, it's a great TV. I would buy a Samsung dumb TV in a heartbeat.
The (discontinued) microsoft 4k wireless display adapter works pretty well for me in combination with Windows. much more responsive than chromecast or airplay.
I plugged these in the every display in our building because they are so much more reliable than anything else. They worked so well that they all found new homes within a few months :(
I used a system at a recent hotel stay that used a randomly-generated code on the hotel TV's and a website you would visit on your device that would associate the TV with the phone. Worked pretty well. The site is cast2.tv and I haven't been able to find out more details about how the backend works or how much they charge hotels for the service.
The hotels I've stayed out with this functionality all had an Aruba Wireless system with a hospitality model AP on a 1-gang wall box somewhere near the floor or strapped to the back of the TV.
Aruba wireless (like many enterprise wireless vendors) has a mDNS proxying and filtering system which is essential for places like college campuses. Airplay and Miracast (infrastructure mode) both use mDNS for service discovery. In Aruba the system is called Airgroup. When seeing a new MAC address the wireless controllers queries the RADIUS server. The RADIUS server can return a configuration for that new MAC address which tells the controller what other devices can interact with this new device using mDNS.
I always assumed this vendor adds and removes Airgroup configuration to allow the phone and the TV to see mdns from each other while preventing this from other nearby devices on the same VLAN or SSID. This trick might be enough but also pushing a DACL to the wireless controller to properly packet filter all network traffic from unapproved devices would strengthen the solution.
I saw in the docs that NetworkManager & wpa_supplicant should be turned off before using it. Is there a way to use it without it taking over my nework card ? I think its possible because its the case of my Android phone.
Regrettably, in my own experience, it's rarely worth the effort to wrestle with wireless displays. Unless you either have 'highly' compatible devices (i.e. Samsung phone to Samsung TV), it's often rife with bad performance, bizarre behavior, and sudden drops.
My personal favorite quirk is a Fire stick that almost always exits mirroring before I can even begin streaming to it. It usually works on the second attempt, but it's so consistent that I've wondered if there's just something else out there "triggering" it when it sees the signal.