Reset Xorg, xsession, dm to default

How to reset xorg?

I’ve tried:

$ dpkg-reconfigure x11-common

but got a warning:

update-rc.d: warning: start and stop actions are nolonger supported; falling back to defaults

I’ve tried to stop X (service lightdm stop), delete xorg.conf and run # X -configure, but got an error:

(EE) 
Fatal server error:
(EE) Server is already active for display 0
	If this server is no longer running, remove /tmp/.X0-lock
	and start again.
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE)

Now I can’t login into dm and getting login loop. Moreover, my display show incorrect colors -> https://ibb.co/csS3ab
https://ibb.co/kMwJ8w

By “reset”, what are you trying to do? Go back to a default configuration? Is there some aspect in particular which has changed and needs to revert (has something in particular triggered the loop)?

NOTE: Sometimes issues such as this are because disk space has filled up and temp files can’t be written. See “df -H” to see space.

There are enough space (11G available), I play with xorg.conf on another monitor and it gaves me wrong color and resolution (https://devtalk.nvidia.com/default/topic/1024946/jetson-tx2/nvidia-jetson-tx2-oculus-rift-dk2-nvidia-driver-doesn-t-get-screen-resolution/)
Now, I connected my jetson to normal monitor, where everything was ok and got color issue.

I try to reset xorg settings to restore configuration, and go back to defaults.

BTW, Jetson show in terminal strange warning after boot, if I switch to tty:

[timestep] tegra-i2c 3190000.i2c: rx dma timeout
[timestep] tegra-i2c 3190000.i2c: i2c transfer timed out addr: 0x50

After sometime (about 2-3 minutes) videooutput disappearing, HDMI signal is absent.

After one minute HDMI signal returned and show me logs:
hdmiL edid read failed
using fallback edid

hdmi: using fallback edidx50

And I can use tty’s. And sometime, signal disappearing again, but without any messages.

The EDID is a physical wire (i2c protocol). Are you using any kind of adapter with the video cable? Some do not support EDID.

I would next look very closely at the connectors and see if there are any bent or broken pins.

Check to see if the NVIDIA-specific driver files are still in place:

sha1sum -c /etc/nv_tegra_release

The sample rootfs package (with the L4T downloads) will unpack such that there will be a subdirectory “rootfs/etc/X11/”. You could recursively delete the Jetson’s X11 subdirectory content, and then put the sample rootfs version of the X11 directory content back into the Jetson (something to be very careful with!). This would reset the system settings, but you may have some init files in your home directory as well for whichever user is currently logged in.