My opinion is that it's most environmentally friendly to buy a good laptop, but use it mostly as a desktop.
Manufacturing electronics creates surprisingly much emissions. There's a Finnish calculator to calculate your environmental footprint (called climate diet), and it seems to use a factor of about 0.87 kilograms of CO2 for every euro spent in electronics.
For a computer costing 1000 EUR, and having a lifetime of 4 years, the yearly manufacturing emissions are 217 kg CO2.
The lifetime of a laptop is mostly defined by:
- Lifetime of its battery and fan, if the laptop is so cheap it isn't economically viable to repair a broken battery or fan -- if you buy a good laptop with long expected lifetime, you are more likely to pay to have it repaired
- Lifetime of its keyboard, this isn't usually feasible to repair since there are so many keys that might need repair
- The amount of time the CPU, storage space and amount of RAM stay competitive
So, by buying a laptop with powerful CPU, enough space for SO-DIMM memory including future expansion and enough possibilities for installing big storage (preferably at least one M.2 SSD slot and one SATA 2.5" HDD/SSD slot), you can use the laptop about as long as you would use a desktop. It's true that laptop CPU cannot be upgraded, but even with a desktop upgrading a CPU often means upgrading the motherboard, which also means upgrading the RAM since maybe the old motherboard used DDR3 and the new uses DDR4. So, I don't really think that laptops would automatically have a lower lifetime than desktops, assuming the keyboard doesn't degrade, and assuming you are willing to pay for battery and fan repairs.
What you can achieve by using the laptop as a desktop is maximizing the lifetime of its keyboard. You also make it more ergonomical since displays can be set at proper height and you have a big keyboard and a real mouse.
The benefits of not buying a desktop and using a laptop instead are many:
- You don't need to purchase a separate UPS for power outages, and remember, every euro spent in electronics creates 0.87 kilograms of CO2, so that's clear savings. Also the built-in "UPS" of a laptop has far longer storage duration than most lead-acid battery based UPSes.
- If you ever need a laptop, with a desktop computer you would have to buy a separate laptop computer (and every euro spent in electronics creates 0.87 kg CO2), whereas if your desktop is a laptop, you just unhook it and use it elsewhere
- Laptops consume far less power. A desktop may use 100 watts excluding the display, which would be between 292 and 877 kWh per year (depending on whether you keep it always on or put it to sleep mode during night and use only 8 hours per day). At 0.4 kg/kWh emissions of natural gas generation, that's 117 - 351 kg CO2 per year. However, a laptop would use maybe 10 watts, that's then 12 - 35 kg CO2 emissions per year. Even in the relatively clean electricity grid of Finland (0.1 kg/kWh), desktop could create as much as 88 kg CO2 per year (if you don't use the sleep mode), whereas a laptop would create tenth of that. Although it's true that in clean grids electricity use doesn't matter that much (because manufacturing the computer in China created so much more emissions than using the computer in a clean grid), it's still some clear savings.
- Laptops are better during extended power outages like what they have in Ukraine now. They use so little power it may be realistic to use a laptop from a power station that is charged by solar panels. And during winter if solar energy is unavailable, it's possible to run a generator for a very short time, rapidly charging a power station, and then use the laptop from a power station for a duration of a week, that was charged with only 0.5 liters of gasoline. A desktop would need ten times the amount of gasoline if charging the same power station with gasoline.
Of course, an external display costing 250 EUR (one-time 218 kg CO2) and using 30 watts (35 kg CO2 per year at 0.4 kg/kWh and 8 hours per day) will have some emissions drawbacks. However, if with the use of an external display you can extend the lifetime of your laptop keyboard from 2 years to 6 years (or actually the laptop keyboard would last forever then due to non-use but the rest of the laptop might have a lifetime of 6 years), you save 290 kg CO2 per year. If the display has a lifetime of 6 years too, that's yearly CO2 footprint of 36 kg from manufacturing plus 35 kg from usage, which is 71 kg per year total. Even though the external display created some emissions in manufacturing and consumes more power, the fact that it allows you to use an external keyboard more than offsets all created emissions. (Well yes, theoretically someone could hook an external keyboard to a laptop while still using the built-in display, but that's just weird).
My estimate that a laptop keyboard degrades in 2 years to the point it's no longer usable is based on experience using a laptop without external monitor as my main computer for a period of a year. The keyboard showed so much degradation that I could maybe expect a second year out of it, but not more. (After that year of using a laptop as a laptop, I bought a display and used it as a desktop from that point on.)