Sorry, I was writing that about Windows. There are no problems now; all programs detect the 5090.
I tried disconnecting the 580 and completely removing it from the Mac Pro, but I settled on this setup: 5090 + LG 5k (it's mostly unplugged, since I rarely play games) and 580 + Apple Thunderbolt 2.5k (my primary display, so it's easier to switch between Windows and Mac OS).
That's right, Mac OS X doesn't detect the 5090, and in sleep mode, a kernel panic occurs, causing the system to reboot. The Amphetamine utility prevents Mac OS X from sleeping).
I use MacOS less and less on this Mac Pro; Windows is always on (I have a second Mac Pro for MacOS).