One of Beijing’s busiest public toilets is fighting the scourge of toilet paper theft through the use technology – giving out loo roll only to patrons who use a face scanner.

The automated facial recognition dispenser comes as a response to elderly residents removing large amounts of toilet paper for use at home.

Now, those in need of paper must stand in front of a high-definition camera for three seconds, after removing hats and glasses, before a 60cm ration is released.

Those who come too often will be denied, and everyone must wait nine minutes before they can use the machine again.

But there have already been reports of software malfunctions, forcing users to wait over a minute in some cases, a difficult situation for those in desperate need of a toilet.

The camera and its software have also raised privacy concerns, with some users on social media uneasy about a record of their bathroom use.

“I thought the toilet was the last place I had a right to privacy, but they are watching me in there too,” wrote one use on Sina Weibo, a Chinese version of Twitter.

While London is notorious for the high number of CCTV cameras that dot the city’s streets, Beijing may be even more closely surveilled. The city’s police boast they have 100% of the city covered with more than 46,000 cameras and a team of 4,300 officers to watch the video feeds.

The city had to post attendants in the bathroom to explain how the machines work, the Legal Evening News reported, and the wait to use the bathroom next to the Temple of Heaven, one of Beijing’s busiest tourist destinations, has already become backed up.

In some cases the machines broke down completely, forcing bathroom staff to manually distribute toilet paper, the newspaper reported, and hopefully remember the faces of each person.

China has something of an obsession with its public toilets. The government recently allocated £233bn to fund a “toilet revolution”, renovating as many as 100,000 public bathrooms in the hopes of boosting tourism.

Some of those may be fitted with big-screen televisions, WiFi, ATMs and sofas, as the government plans to establish a rating system, grading toilets from A to AAA, the state-run China Daily reported last year.

And the southwestern city of Chongqing advertises the world’s largest public restroom, a multi-story building with outdoor and indoor toilets and a courtyard, as a tourist attraction.