Hewlett-Packard has posted a quarterly loss of $8.9bn after a gigantic writeoff of value of its services division, as it struggles to cope with falling revenues in other core areas including PCs and printing.

Its chief executive, Meg Whitman, warned that "we are still in the early stages of a turnaround" as she told analysts that it will be a long slog to return the Silicon Valley pioneer to growth. Its stock value shrank by 5% in after-hours trading.

HP had indicated earlier in August that it would take an $8bn (£5bn) charge against the shrinking value of the services firm Electronic Data Systems it bought in 2008 for $13bn. But total revenues fell by 3.6% to $8.7bn, and operating income by 6% to $3bn. The biggest drops came in the Personal Systems Group, the world's largest PC business, where revenues fell by 10% and income by 28%, and the enterprise servers and storage group, where revenues fell by 5% and income by 20%. The printing business, also the world's largest, saw revenues fall, though profits improved slightly.

HP's woes reflect those of Dell, the world's third-largest PC maker, which earlier this week reported dramatically slowing revenues and profits, and blamed a slowdown in consumer and enterprise spending – a trend it does not expect to improve in the next quarter.

Whitman, the third chief executive in two years, and who took over 11 months ago in a boardroom coup that ejected Leo Apotheker, who had suggested abandoning the PC business because it was too unprofitable, has been driving reorganisations, cost-cutting and job cuts to try to get the 73-year-old company back to growth and to recapture the innovation for which it became famous. The stock has lost more than half its value in the past two years.

Whitman acknowledged "the very serious executive issues" facing HP as it tries to catch up to its rivals and cope with a weakening economy, particularly in Europe, where uncertainty caused by the eurozone crisis has delayed corporate spending.

The writeoff was magnified by costs from redundancies for the first of 27,000 jobs that the company aims to cut between now and October 2014.

To cope with the upheaval, HP has been expanding into technology consulting, computer software, data storage and high-end servers made for companies and government agencies. All those specialities are more profitable than the fiercely competitive PC market, where margins declined faster than sales. Whitman suggested that a combination of the growing preference for tablets and smartphones, along with expectation of new machines running Microsoft's Windows 8 due in October, was to blame.

If HP's slump worsens, management warned it may have to register additional charges in the current quarter to account for trouble in other acquisitions. Without citing specifics, executives pointed to the company's software operations as one area that could be lumped with a major accounting charge. That division includes Autonomy, the UK business analysis service that HP bought for $11bn last year, but which three months ago saw senior British staff including its founder, Mike Lynch, depart amid complaints about bureaucracy at the US firm strangling Autonomy's corporate culture.