Small mainline leaks can be a really tough problem to deal with. A master valve will cure the symptoms for a while. The master valve should be the same size as the other valves unless you run more than one valve at a time. It is installed at the connection point of the irrigation system to the water supply. You will need a irrigation controller that has a master valve circuit on it (sometimes called a “pump start circuit”, the two are the same thing.) You wire the master valve to the master valve circuit on the controller using two wires, just like any other valve. It will then open whenever any other valve on the system opens to irrigate. When the irrigation is complete, the master valve will close which will relieve the pressure on the mainline, stopping the leak.
However this does not cure the leak, which will continue to get worse as the water erodes the pipe around the leak and the hole gets larger. Also, master vales come with their own unique problems. With a master valve the leak may (depending on it’s size and location) drain the water out of the mainline after each irrigation, which will cause new problems. The system will spit air each time it starts up and make lots of noise. This also weakens the pipe over time due to the stress of refilling with water at the start of each irrigation. The sprinklers will also not run efficiently for the first minute or so as the air is expelled. Next, dirt may be sucked into the mainline through the leak hole when the system depressurizes. The dirt can then get into the valves and sprinklers causing them to fail. Finally, pressurizing and depressurizing the mainline causes it to wear out earlier than normal. (Think of inflating a balloon and releasing the air over and over. It wears out the plastic and then the balloon pops. Same with your mainline.) How much impact this has is a matter of debate in the irrigation industry, the difference might be that your mainline only lasts 15 years rather than 20. Again, it varies depending on your system, the higher your water pressure the more likely damage will occur.
Finding a leak can be very difficult, there is no easy way that I know of. The only way I know of to find a leak is to visually inspect for it. This is hard with buried pipe. First inspect for leaks around the obvious places like the threaded connections to the valves. Threaded joints are by far the most common locations for leaks. Clean and thoroughly dry any water off of the connections with a towel, wait a few minutes, then wipe the connection with a paper towel and see if the paper gets wet, indicating a small leak.
You may be able to hear the leak if it is fairly large, but a slow drip will not make enough noise. You can make a “stethoscope” to listen with using a cardboard tube like the ones used as used for wrapping paper.
Also you can look for mud or soft wet dirt around the leak. Try probing the ground with a long screwdriver, looking for soil that is wetter than other areas. Then start digging. You may have to just wait until it gets bad enough to become visible.