Serial1 on mega not working when power by adapter

Hi all -
I got 2 arduino, one nano and one Mega, talking to each other by serial. It's working fine when my laptop is usb-connected to my Mega. But when I unplug the USB cable and power the Mega with a DC adapter 12V, the serial does not seems to work.

can you measure if the voltages on the board are the same (powered by USB vs powered by adapter)

do other parts (leds) work as expected?

I will check that. It's not constant. Sometimes it works, other times it did not. I will make more tests and get back to you!

Are the Gnds between the boards connected when powered by 12V?

Yes they are. At first it was not, but I got a lot of garbage.