When you connect dex cable, there is a message asking what you want to do mirroring or dex mode. If that message doesn't come up, pull down notification shade and there should be option to switch to dex mode
I found the solution. When you connect your HTMI, you must also provide power in parallel through your adapter. In addition, DeX doesn't work with LED cover, so remove it.
View solution in original post