not optimum mode message on samsung monitor when I close the lid
Normally if you look in the About this Mac, then look how is it identifying the monitor. What does it say about it.

Usually that information will tell you that something is wrong (mostly the cable).