Eva already wrote: we were 12 passengers and 9 conductors on the train which crossed the border that night.
When we boarded the train in Nanning there were some other wagons which were full, but they were heading just to the station before the Chinese border.
On night trains often they request the passports at beginning. It was no exception. But after few minutes the conductor comes with the passports in hand: “whats your countries?”. Not first time in China we get this question. “Putayia”, I say. “Germany”, says Eva (her passport says “Deutschland”).
Arrived to ther border station two police officers come inside to give the “departure cards” which we already had and a few minutes later come to check the passports and take them away. They new the countries. After, we are requested to leave the train with all the luggage. On the building of the station, first the thermometer test, then the luggage x-ray. After the conductors came, do only the x-ray check and inform us that our wagon have a problem with the air conditioned and we will move to another one. Back to the train and soon the police returns with the passports. Now we “just” have to way 1-hour so the train leaves on the schedule.
Hour and half after we arrive to the Vietnamese border station. Requested to go out, we see a nice old yellow building besides the train going to Beijing that night. It is 23:30 (0:30 chinese time). Inside the building first counter on the left two persons distributing two pieces of paper. One for immigration and customs, other for health check. After filling them, we are pointed to the second counter, where 4 officers receive one form and the passport. They ask Eva which country she is from. I find bizarre they did not ask me. I found way the day after. Then they point to the other side of the station, where in a third counter we should give the other paper. This guy, almost sleeping, receives the health check and shows that we should pay 2000dong or 1yuen (20euro cents). Fortunately we saved some chinese money. After some minutes the officers call our names and return the passports.
There was still a fourth counter, to buy train tickets, where someone was sleeping. Back to the train and it was our turn to sleep (while the train stayed still for 30 minutes before leaving).
Why the Vietnamese officers knew Portugal? In Hanoi at the hotel the clerk told me there was a football player in some portuguese team.