China's Lenovo Group Ltd. (LNVGY) surprised markets Friday, Aug. 18, reporting its first quarterly loss in two years as rising component costs and falling sales combined to cut into profits at its personal computer unit.

Lenovo lost $72 million over the three months to the end of June, down from a profit of $173 million for the same period last year, as a supply squeeze on memory chips pushed costs higher cut into margins at all of its major operations. Analysts had expected a small profit.

Lenovo's Hong Kong-listed stock fell 3.6% to trade at HK$4.55, its lowest mark in more than five years.

Supply constraints and increased component left gross margins at 13.6%, a 1.7 percentage point dip year-on-year, and pushed operating margins into negative territory at 0.1%. That situation is unlikely to significantly change over the rest of the year and could drive costs higher still, forcing the company to consider raising prices, said executives.

Memory price rises are likely to continue to increase, though at a slower rate, "at least until the end of the year," Lenovo's chief financial officer Gianfranco Lanci warned on an earnings call.

A price hike by Lenovo could weigh on sales volumes, particularly of personal computers, where the Chinese group is already suffering a sharp dip. Unit sales of Lenovo PCs fell 6% in the quarter, outpacing a market wide 2% fall in PC sales, while revenues were flat at $7 billion.

Lenovo had been the world's largest shipper of PCs, due largely to its dominant position in China, but has lost that mantle to HP Inc. (HPQ) - Get Report , which has capitalized on strong lap top sales to beat sales forecasts for four consecutive quarters.

Lenovo, which saw laptop sales dip in the second quarter, is in danger of falling to No. 3 in global home PC behind Dell Inc. (DELL) - Get Report , which has posted a market leading 21.3% increase in laptop sales over the second quarter, according to technology market research firm TrendForce.

HP will report its third quarter earnings on Aug. 23.

The dip in computer sales, and prospects of price hikes, are particularly worrying for Lenovo as PC's are its only profitable unit. The business posted a pre-tax income of $291 million for the quarter, down from $370 million a year earlier. Lenovo's Mobile phone operation, which sells phones under the Moto brand, lost $173 million over the quarter, while its data center business lost $144 million.

More of What's Trending on TheStreet: