All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
We have already issued Fatwa 81439 clarifying the ruling on watching pornographic films, so please refer to it. We also clarified in Fatwa 82882 the means of convincing a person who is afflicted by this.
Indeed, you did well by advising your friend about that and you should continue advising him in a best manner and choose the suitable time for doing so, as Allaah may enable you to be a reason for his guidance.
However, if he repents and returns to Allaah, then this is what is required, but if he persists in his behaviour, we advise you to stay away from him and not live with him because it is a great evil to socialize with such a person.
Allaah Knows best.