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. Is able to use the non-natural R enantiomer of 3,4-dihydroxy-2-butanone 4-phosphate as a substrate, but with less efficiency than the natural S enantiomer. Cannot use unphosphorylated 3,4-dihydroxy-2-butanone, 3,4-dihydroxy-2-butanone 3-phosphate or diacetyl as substrates. (2S)-2-hydroxy-3-oxobutyl phosphate + 5-amino-6-(D-ribitylamino)uracil = 6,7-dimethyl-8-(1-D-ribityl)lumazine + H(+) + 2 H2O + phosphate kcat is 0.056 sec(-1). Optimum pH is 6.5-8.0. 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. Can interact with riboflavin synthase, forming a lumazine synthase/riboflavin synthase complex, also designated as 'heavy riboflavin synthase complex', which consists of a trimer of riboflavin synthase enclosed within the icosahedral structure composed of 60 subunits of 6,7-dimethyl-8-ribityllumazine synthase. Belongs to the DMRL synthase family.