my first account was on lemmy.ml because it was one of the top options on one of the apps I used. it stopped working with jerboa which why I switched to lemmy.world...
I know a little about the academic system. it's not an easy market to succeed in. but if you do it's a wonderful life. you're free to work on problems you find interesting, without worrying about whether or not they are profitable.
sounds like you genuinely love doing research in math, given that you put in a lot of time and voluntarily turned down a cushy job.
my suggestion is to put your nose to the grindstone and pass your quals. it's not easy and not everyone makes it... but it sounds like the path to the career you want is this way.
honestly the distro doesn't matter so much as long as the hardware i supported. run a minimal desktop, disable CPU hogs and file indexing etc.
I used fvwm on Debian for many years on old computers. worked great. now I have kde/plasma on arch. my 10 year old laptop handles it fine...