As one of the main components of the Large High Altitude Air Shower Observatory(LHAASO) project, a one - square - kilometer ground array(KM2 A) is designed to study gamma ray astronomy and cosmic ray physics at energies above 20 TeV.Over 5,000 photomultiplier tubes(PMTs) are used to measure the lights yielded in the scintillation detectors by charged particles in air showers.High performances,including linearity, gain and its consistency among PMTs,etc,are strongly required for these PMTs.The geomagnetic field plays an important role in the above parameters.An experiment is setup to measure the effects of geomagnetic field on performances of a candidate PMT XP2012B.The results show clearly the differences of PMT gain,with a maximum of 10%,with different displacements of the PMT in the geomagnetic field.Displacements to eliminate the geomagnetic effects are suggested for the LHAASO project.