Cannot login after run `sudo startx -- -logverbose 6`

Hi I just want to file a bug report to nvidia and following this post

It ask me to run startx -- -logverbose 6, I did so and the screen freezed…

I then reboot my computer and popped up the login screen.

But after I typed in the password, it went black and return to the login screen.

It loops infinitly and I cannot login…

system info as follow:

[shore@shore-82wm llvm_learn]$ inxi -F
System:
  Host: shore-82wm Kernel: 6.6.25-1-MANJARO arch: x86_64 bits: 64
  Desktop: Xfce v: 4.18.1 Distro: Manjaro Linux
Machine:
  Type: Laptop System: LENOVO product: 82WM v: Legion R9000P ARX8
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76479 WIN
    serial: <superuser required> UEFI: LENOVO v: LPCN47WW date: 09/15/2023
Battery:
  ID-1: BAT0 charge: 80.8 Wh (95.1%) condition: 85.0/80.0 Wh (106.2%)
    volts: 15.8 min: 15.4
CPU:
  Info: 16-core model: AMD Ryzen 9 7945HX with Radeon Graphics bits: 64
    type: MT MCP cache: L2: 16 MiB
  Speed (MHz): avg: 1127 min/max: 400/5461 cores: 1: 3529 2: 400 3: 3266
    4: 400 5: 400 6: 3374 7: 400 8: 5373 9: 400 10: 400 11: 400 12: 400 13: 400
    14: 400 15: 3594 16: 4032 17: 400 18: 400 19: 400 20: 400 21: 400 22: 400
    23: 400 24: 400 25: 400 26: 400 27: 2907 28: 400 29: 400 30: 400 31: 400
    32: 400
Graphics:
  Device-1: NVIDIA AD107M [GeForce RTX 4060 Max-Q / Mobile] driver: nvidia
    v: 550.67
  Device-2: Syntek Integrated Camera driver: uvcvideo type: USB
  Display: x11 server: X.org v: 1.21.1.12 driver: X: loaded: nvidia
    gpu: nvidia resolution: 1: 2560x1440~60Hz 2: 2560x1600~60Hz
    3: 2560x1440~60Hz
  API: EGL v: 1.5 drivers: kms_swrast,nvidia,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.67
    renderer: NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2
Audio:
  Device-1: NVIDIA driver: snd_hda_intel
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: snd_rpl_pci_acp6x
  Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel
  API: ALSA v: k6.6.25-1-MANJARO status: kernel-api
  Server-1: PipeWire v: 1.0.3 status: active
Network:
  Device-1: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e
  IF: wlp4s0 state: up mac: a8:3b:76:73:83:77
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: enp7s0 state: down mac: fc:5c:ee:24:71:de
  IF-ID-1: docker0 state: down mac: 02:42:de:9f:67:95
Bluetooth:
  Device-1: Foxconn / Hon Hai Bluetooth Adapter driver: btusb type: USB
  Report: rfkill ID: hci0 state: up address: see --recommends
Drives:
  Local Storage: total: 2.75 TiB used: 249.42 GiB (8.9%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVL21T0HCLR-00BL2
    size: 953.87 GiB
  ID-2: /dev/nvme1n1 vendor: Seagate model: WDC WDS200T2B0C-00PXH0
    size: 1.82 TiB
Partition:
  ID-1: / size: 1.74 TiB used: 249.42 GiB (14.0%) fs: ext4 dev: /dev/nvme1n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 300 KiB (0.1%) fs: vfat
    dev: /dev/nvme1n1p1
Swap:
  ID-1: swap-1 type: partition size: 51.4 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme1n1p3
Sensors:
  System Temperatures: cpu: 66.9 C mobo: 46.0 C gpu: nvidia temp: 40 C
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 48 GiB available: 46.73 GiB used: 7.28 GiB (15.6%)
  Processes: 497 Uptime: 19m Shell: Bash inxi: 3.3.33

Hi @Shore,

Obviously something happened. Where I don’t know. But I suspect we can check the logs and find out why it’s not working. To do so, enter a chroot environment and from there inspect the logs:

How to chroot

  1. Ensure you’ve got a relatively new ISO or at least one with a still supported LTS kernel.

  2. Write/copy/dd the ISO to a USB thumb drive.

  3. When done, boot with the above mentioned USB thumb drive into the live environment.

  4. Once booted, open a terminal and enter the following command to enter the chroot environment:

manjaro-chroot -a
  1. If you have more than one Linux installation, select the correct one to use from the list provided.

When done, you should now be in the chroot environment.

But, be careful, as you’re now in an actual root environment on your computer, so any changes you make will persist after a restart.

Once successfully logged into the ch root environment, we need to find the logs. To do so, follow below inside the chroot environment:

Finding errors for boot

journalctl --priority=warning..err --no-pager --boot=-1

Where:

  • The --priority=warning..err argument limits the output to warnings and errors only;
  • and the --no-pager formats the output nicely for use here, on the forum;
  • the --boot=-1 argument limits the output to log messages from the previous boot. This can be adjusted to -2 for the boot before that, -3 to the boot before that, and so on and so forth.

Feel free to provide the logs if you cannot find the problem.

Hi thanks for the quick reply

I just found a post that let me login…

Well I simply deleted ~/.Xauthority and reboot

1 Like

BTW, I’m on my work now.

I will try to re-produce the issue when I have time and upload the log~~~

1 Like