Tag Archives: Cygwin

Cygwin/X causes NVIDIA Optimus to run all of the time

NVIDIA Optimus is a technology that is used in systems with both an integrated Intel GPU and a discrete NVIDIA GPU.  Speaking of modern systems, this is pretty much any system with an NVIDIA GPU, as all Sandy Bridge and Ivy Bridge CPUs from Intel contain an Intel GPU on the chip.  Naturally, the Intel GPU is less capable than the NVIDIA GPU, but it uses considerably less power and is completely adequate for all but the most demanding graphics tasks.  So, Optimus allows the Intel GPU to run most of the time, kicking in the NVIDIA GPU only when it is needed for games or graphically-intensive applications.  Since the NVIDIA GPU is able to be powered off most of the time, the system uses less power, less heat, and lasts longer on battery.

NVIDIA will automatically guess which apps should be used for which GPU based on profiles that are managed by NVIDIA and updated regularly.  However, you have the choice to override this behavior and decide on an app-by-app basis which GPU should be used.  I have my machine set up to use the integrated GPU for everything by default, and have a list of just a few apps that will kick in the NVIDIA GPU.

Cygwin/X, or XWin, is an X server that you can run on Windows that allows you to run X applications (locally, or remotely via SSH tunnel).

I was recently poking around and discovered that Cygwin/X causes Optimus to activate the NVIDIA GPU (regardless of what is set in the NVIDIA control panel).

cygxoptimus

Continue reading Cygwin/X causes NVIDIA Optimus to run all of the time

Cygwin/X XWin Server leaves an xterm window behind when starting

When you start up Cygwin’s X.Org X11 server via startxwin.exe, it likes to leave an xterm window open on your desktop.

I suppose this is kind of handy if you were manually starting Cygwin/X, it’s pretty annoying if you have it set to start up when you log in to Windows.  To keep this from happening, you just need to add an empty .startxwinrc file to your Cygwin home directory.  That is, start the Cygwin bash shell, and use this command:

touch .startxwinrc

That’s it!  No more xterm windows popping up.

Oh, if you’d rather have something besides xterm start up when you start Cygwin/X, you can just add a list of commands to .startxwinrc and it will execute them after starting the X.Org server.