Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
The dead can hear your dua when you visit the graveyards.
Answering your question, the General Iftaa’ Department in Jordan, states the following:
In principle, the dead hear the living since it has been rigorously authenticated that Prophet Muhammad (peace and blessings be upon him) ordered the bodies of the idolaters slain in the Battle of Badr to be buried. He then approached them and called them one by one and said, “Have you found what your Lord promised to be true for we have found what our Lord promised us to be true.” `Umar asked him, “O messenger of God! Why do you speak to lifeless bodies?” The Prophet (peace and blessings be upon him) replied, “By the One Who has sent me with the truth! You do not hear my words better than they do except that they cannot respond.” (Al-Bukhari and Muslim)
However, not all the deceased are in the same situation because Allah the Almighty says, “Before them is a Partition till the Day they are raised up.”(Al-Mu`minun 22:100) Moreover, supplication reaches the deceased.
Almighty Allah knows best.
Source: AlIftaa.Jo