For a while, I have been using
/etc/inittab to start X. I have set autologin on one getty and X is started from that through
But, starting X through inittab has a limitation that if you try to kill X, it keeps respawning! It is a known limitation, but I never had the need to kill X and so I never ran into this problem, until today.
What happened was — that I tried playing a video using mplayer2, but it failed to play the file. Among its output was the following:
API mismatch: the client has the version 319.23, but this kernel module has the version 319.17. Please make sure that this kernel module and all NVIDIA driver components have the same version.
This was because I had updated my Arch Linux system a few hours earlier but had not restarted it. Turns out, that the nvidia package was updated too.
Now, since I didn't want to restart the system, I figured that I would stop the X server and remove the old nvidia module and then load the new module.
To do so, I switched to the tty from where X was started and tried killing X using Ctrl + C. This is when I finally encountered the above mentioned limitation. X simply kept respawning and failing to work because of the wrong module.
Using kill, htop etc. proved to be of no use either.
Finally, I decided to remove the nvidia module by logging in as root on another tty.
# rmmod nvidia
and voilà, X stopped respawning and started fine. I didn't even have to modprobe the new module!