nvidia-prime doesn't use dbus, not directly at least (it can use policykit on demand)
What I see from the backtrace is that ksmserver gets an _XIOError, which I assume ksmserver handles with its own Xio_ErrorHandler(). Returning from the error handler causes ksmserver to exit. If you want to get around this, you can either use xcb (instead of xlib), or do what they suggest here: http://lists.x.org/archives/xorg-devel/2010-July/011539.html
nvidia-prime doesn't use dbus, not directly at least (it can use policykit on demand)
What I see from the backtrace is that ksmserver gets an _XIOError, which I assume ksmserver handles with its own Xio_ErrorHandler(). Returning from the error handler causes ksmserver to exit. If you want to get around this, you can either use xcb (instead of xlib), or do what they suggest here: lists.x. org/archives/ xorg-devel/ 2010-July/ 011539. html
http://