# System halts when returning to X (again)

## sdz

My system halts upon returning to X (ie: logout in X or after Alt-Shift-F1, Alt-F7).

Symptoms of halt:

- Black screen

- No cursor

- Unresponsive num, caps, and scroll lock

- Sound playing in tty immediately stops

- No indication of error in journalctl -b -1 OR in /var/log/Xorg.0.log.old

- Tried Alt-F1 and Alt-Shift-F1, but no effect.

```
Kernel parameters:

linux   /vmlinuz-4.9.16-gentoo root=/dev/sda3 ro init=/usr/lib/systemd/systemd 

Profile:

default/linux/amd64/13.0/desktop/gnome/systemd

Gnome Version:

gnome-base/gnome-3.20.0

gnome-base/gdm-3.20.1

Video driver:

x11-drivers/nvidia-drivers-375.26
```

I had this issue last year: System halts when returning to X.  Unfortunately, I did not post my solution (bad me!).  

After reinstalling Gentoo on a new HDD (same computer otherwise), the issue returned.  This time when I solve the issue, I will post my solution.

Any ideas on diagnosing or solving my issue?

----------

## eccerr0r

Sure your kernel does not have any conflicting KMS/DRM drivers (make sure you disable nouveau)?

Are you using EFI console or using legacy boot?

----------

## sdz

I did switch from legacy boot to EFI.  However, the changes to my kernel were minimal.

```
root ~ # zdiff /proc/config.gz oldConfig 

562,563c562

< CONFIG_EFI_STUB=y

< CONFIG_EFI_MIXED=y

---

> # CONFIG_EFI_STUB is not set

4210,4211c4209

< CONFIG_CRYPTO_USER_API=y

< CONFIG_CRYPTO_USER_API_HASH=y

---

> # CONFIG_CRYPTO_USER_API_HASH is not set

```

My grub.cfg only differs in references of msdos changing to gpt and the randomly generated partition names.  My system boots normally.  I just can't leave X without the system freezing.

As for KMS, DRM, and NOUVEAU, I have the following kernel options set:

```
root ~ # zgrep -i drm /proc/config.gz 

CONFIG_DRM=y

CONFIG_DRM_MIPI_DSI=y

CONFIG_DRM_DP_AUX_CHARDEV=y

CONFIG_DRM_KMS_HELPER=y

CONFIG_DRM_KMS_FB_HELPER=y

CONFIG_DRM_FBDEV_EMULATION=y

CONFIG_DRM_LOAD_EDID_FIRMWARE=y

CONFIG_DRM_TTM=y

# CONFIG_DRM_I2C_CH7006 is not set

# CONFIG_DRM_I2C_SIL164 is not set

# CONFIG_DRM_I2C_NXP_TDA998X is not set

# CONFIG_DRM_RADEON is not set

# CONFIG_DRM_AMDGPU is not set

# CONFIG_DRM_NOUVEAU is not set

CONFIG_DRM_I915=y

# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set

CONFIG_DRM_I915_USERPTR=y

# CONFIG_DRM_I915_GVT is not set

# CONFIG_DRM_VGEM is not set

CONFIG_DRM_VMWGFX=y

# CONFIG_DRM_VMWGFX_FBCON is not set

CONFIG_DRM_GMA500=y

# CONFIG_DRM_GMA600 is not set

# CONFIG_DRM_GMA3600 is not set

# CONFIG_DRM_UDL is not set

# CONFIG_DRM_AST is not set

# CONFIG_DRM_MGAG200 is not set

# CONFIG_DRM_CIRRUS_QEMU is not set

# CONFIG_DRM_QXL is not set

# CONFIG_DRM_BOCHS is not set

CONFIG_DRM_PANEL=y

CONFIG_DRM_BRIDGE=y

# CONFIG_DRM_ANALOGIX_ANX78XX is not set

# CONFIG_DRM_LEGACY is not set

root ~ # zgrep -i kms /proc/config.gz 

CONFIG_DRM_KMS_HELPER=y

CONFIG_DRM_KMS_FB_HELPER=y

root ~ # zgrep -i nouv /proc/config.gz 

# CONFIG_DRM_NOUVEAU is not set
```

I downgraded back to nvidia-drivers-375.26 and confirmed the USE flags were the same.  However again, X works.  Leaving X doesn't.

----------

