Friday, July 20, 2012

Fix X11 Freeze

Sometimes it happens that my UBUNTU Box freezes. Especially after extensive usage of the media. Here are two methods to handle this issue:

1- Going to a different virtual console.

Alt+Ctr+F1 (or F2, .... , F6)

After logging, you can restart the X server using:
$sudo service lightdm restart




P.S: This assumes that your display manager is lightdm (True for ubuntu 12.04). You can check your agent using /etc/X11/default-display-manager


2- If you cannot change to another virtual console, b/c the X server took control of the keyboard. You can try taking the control away from the X server using Sysrq.

Alt+SysRq+r

then try Ctr+Alt+F1.  You can also try Alt+SysRq+k, which kills all programs on the current console.

Finding The Display Manager in UBUNTU

Ubuntu has many display managers. In order to see which one is currently used check the file:

/etc/X11/default-display-manager