Can Dead Hear Us When We Pray for Them in the Graveyard?

While visiting a graveyard, which prayers should we recite and can dead hear our duas?

There are some duas that recommended in the hadiths to read while visiting graveyards

Our Prophet Muhammad (pbuh) recommended us to greet the dead by turning our faces to the graves and to recite this salam when we enter the graveyard:
“May the Peace (of Allah) be upon you, O people of this land (the graveyard), who are among the Believers! Insha Allah, we too shall (soon) be joining you. We ask Allah protection for you and for ourselves." (Muslim, Ibn-i Majah)
The narration from Hazrat Aisha has a bit different expression carrying the same meaning. In this narration, it is stated that Prophet Muhammad (pbuh) came by the Madinah graveyard and said the following by turning his face to their side:
السلام على أهل الديار من المؤمنين والمسلمين ويرحم الله المستقدمين منا والمستأخرين وإنا إن شاء الله بكم للاحقون”
“Peace be upon the inhabitants of the graves, believers and Muslims. May Allaah have mercy upon those who have gone ahead of us and those who come later on, and verily we will, insha’Allaah, join you.” (Thirmizi, Janaaiz 58-59 narrated by Ibn-i Abbas)

The deceased can hear and take the salutation of the visitor in the graveyard, besides he can recognize him

If a person gives salam to a graveyard while passing by it that he used to know,, the deceased takes his salute and recognize him, as well. If he salutes a grave that he doesn’t know, the deceased takes his salute. (Ihya-u Ulumid Din)
Narrated Anas:
"When a human being is laid in his grave and his companions return and he even hears their foot steps, two angels come to him and make him sit and ask him: What did you use to say about this man, Muhammad ? He will say: I testify that he is Allah's slave and His Apostle. Then it will be said to him, 'Look at your place in the Hell-Fire. Allah has given you a place in Paradise instead of it.' " The Prophet added, "The dead person will see both his places. But a non-believer or a hypocrite will say to the angels, 'I do not know, but I used to say what the people used to say! It will be said to him, 'Neither did you know nor did you take the guidance (by reciting the Quran).'” (Book23, Hadith 422) Bukhari)