That's one main reason I usually tend to buy Dell laptops, as they employ guys like Mario Limoncello that commit to the kernel dev, and rarely have issues with them over the past 10+ years of using linux on them. Since they've begun releasing linux laptops, I tend to gravitate to those models, not so much getting them with ubuntu already, but getting them and putting my own OS on them is about as painless most times.
I would buy with linux, but I always work deals/coupons on refurbs and stacking 35-40% off coupons, so it ends up far cheaper to pay the m$ tax where I never see ubuntu refurbs.
I just got an xps15 which has been great, took some work to get the gpu switching going, but since it's been rock solid with ubuntu 17.04. A customer I'm consulting for currently has a guy running the xps13 with ubuntu as well that he says is solid, as was my last Latitude e7240. I find most times someone else has figured out quirks for linux on most dells.
I went with an HP at one point, and it was a basketcase to work with for linux, I'll never even consider them again.