Apple, Microsoft, HP and other gadget makers are being forced to choose between sacrificing sales or profit.