They heard that Cowling, his partner, and young baby had been living in a block of five flats in Edgeware, when Locke moved in last June.
Cowling's household, and other residents in the block, complained that Locke listened to music at high volumes, with the first noise complaint coming on July 9.
And from then, to the day Cowling died, there had been a total of 21 noise complaints, although noise control did often not register excessive noise coming from Locke's flat, Crown prosecutor William Taffs told the court.
"Tensions had been high for a while," Taffs said.
A few weeks before the fatal incident, Cowling had gone to Locke's house and the pair had argued over "loud music", the court heard.
On September 5 last year, Cowling and his family got home about 4pm-5pm and alleged that Locke was already playing music.
They decided to give him to 10pm before calling noise control.
Noise control would be called four times that evening, the court heard, but Taffs claimed that Locke had a practice of turning the music down when noise control came to visit to avoid getting into trouble. Once they left, he'd turn it up again, the Crown claims.
That night, a fed-up Cowling accessed the fuse box which serviced the whole block of flats and cut the power to Locke's house three times.
The first time happened at 7.57pm. Power was restored shortly after 9pm by a network operator from local power company Orion.
The court heard that while the power was off, Locke went to the fuse box and messaged his mother, observing that the fuse hadn't blown.
Cowling again turned the power off at 1.33am. It was restored about 10 minutes later.
And again at 2.25am, Cowling cut the power.
This time, the Crown allege, Locke responded by taking a knife from his kitchen and went to Cowling's property.
The Crown said while it's not clear what unfolded, they say that Locke stabbed Cowling in the chest, causing a 10-12cm fatal wound that injured his heart and lung.
Cowling's partner woke to the sound of broken glass and came down to find Cowling on the laundry floor with Locke on top of him applying pressure to wounds with an old towel or jersey.
She asked Locke to leave, the Crown said, but he refused and was allegedly acting aggressively.
Locke phoned 111 and he was arrested at the scene, with a knife found on the path outside.
It's alleged that Locke made "a series of unprompted comments" to first responders, including that Cowling had been the guy turning his power off all night and also that Cowling "didn't deserve to die".
Defence counsel Kirsten Gray, in her opening address said: "Simply put, the defence do not accept that Mr Locke is guilty of murder. It's not accepted that Mr Locke intended to kill Mr Cowling and it's not accepted that this was a reckless murder."
She told the jury that while it won't be in dispute that Locke stabbed Cowling, and that the injury led to his death, that "doesn't necessarily make it murder".
The Crown, Gray said, has to prove Locke's state of mind or his intention at the time of the incident to the standard of beyond reasonable doubt.
The trial, before Justice Cameron Mander, is scheduled to take two weeks.