What is /etc/p2p.conf and how do I set it up?

I am trying to use gnome-network-displays to connect to my SmartTV(UE32M5502) which supports Miracast. I keep finding stuff about this /etc/p2p.conf file which I do not have and I would like some details to know how to configure it or where to find more information about it. Feel free to ask me anything related to my trip towards casting my laptop to my TV.

Where? In what context?

Well … no package provides that file, and it isnt a system default.
Usually when we need something that doesnt exist … we create it.
But I still dont understand why you think you need it.

I am not sure if it’s totally related but I need it to be able to stream using miracast to my smart tv. P2P is also called wifi direct afaik right? I see that linux overall does not really like miracast, but I want to somehow make it work.
I must also specify that I have a RTL8821CE wireless network card and I am using Tomas Pinho’s driver for it.

Miraclecast kind of works if your Wifi hardware and driver plays along.

It can be installed form the AUR

https://aur.archlinux.org/packages/miraclecast-git/

Unfortunately you can’t easily use your Wifi Hardware for anything else while using it. If you need internet access use a Ethernet cable or a second wifi adapter.