Catalyzes the formation of 6,7-dimethyl-8-ribityllumazine by condensation of 5-amino-6-(D-ribitylamino)uracil with 3,4-dihydroxy-2-butanone 4-phosphate. This is the penultimate step in the biosynthesis of riboflavin. (2S)-2-hydroxy-3-oxobutyl phosphate + 5-amino-6-(D-ribitylamino)uracil = 6,7-dimethyl-8-(1-D-ribityl)lumazine + H(+) + 2 H2O + phosphate Activity is competitively inhibited by the bisubstrate-type compounds TS23, JC33 and JC72, with Ki values in the low nanomolar range. Cofactor biosynthesis; riboflavin biosynthesis; riboflavin from 2-hydroxy-3-oxobutyl phosphate and 5-amino-6-(D-ribitylamino)uracil: step 1/2. Forms an icosahedral capsid composed of 60 subunits, arranged as a dodecamer of pentamers. Belongs to the DMRL synthase family.