Q:

how to debug failed logins?

I am using Ubuntu Linux and have two users configured for the machine. 
I can successfully login for one user, but the other user always fail. 
I deleted the .Xauthority file from the user where login is failing, but I still cannot login.
Now, I wanted to actually debug, what is going on? Is there any tip, where I should start looking first? There is no xorg directory in .local/share/. Could this be a problem?
It would be good to know if there is any journalctl or some other methods to see the log to debug the problem? 
X.Org X Server 1.19.6
Release Date: 2017-12-20
[  3165.009] X Protocol Version 11, Revision 0
[  3165.009] Build Operating System: Linux 4.4.0-168-generic x86_64 Ubuntu
[  3165.009] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-99-generic root=UUID=167e0a04-68bb-49c2-b3cc-126f49cd4692 ro quiet splash vt.handoff=1
[  3165.009] Build Date: 14 November 2019  06:20:00PM
[  3165.009] xorg-server 2:1.19.6-1ubuntu4.4 (For technical support please see http://www.ubuntu.com/support) 
[  3165.009] Current version of pixman: 0.34.0
[  3165.009]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  3165.009] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  3165.010] (==) Log file: "/home/xxxxx/.local/share/xorg/Xorg.1.log", Time: Sat May  2 00:58:36 2020
[  3165.010] (==) Using config file: "/etc/X11/xorg.conf"
[  3165.010] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  3165.010] (==) ServerLayout "Layout0"
[  3165.010] (**) |-->Screen "Screen0" (0)
[  3165.010] (**) |   |-->Monitor "Monitor0"
[  3165.010] (**) |   |-->Device "Device0"
[  3165.010] (**) |-->Input Device "Keyboard0"
[  3165.010] (**) |-->Input Device "Mouse0"
[  3165.010] (==) Automatically adding devices
[  3165.010] (==) Automatically enabling devices
[  3165.010] (==) Automatically adding GPU devices
[  3165.010] (==) Automatically binding GPU devices
[  3165.010] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  3165.010] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  3165.010]    Entry deleted from font path.
[  3165.010] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[  3165.010]    Entry deleted from font path.
[  3165.010] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[  3165.010]    Entry deleted from font path.
[  3165.010] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[  3165.010]    Entry deleted from font path.
[  3165.010] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[  3165.010]    Entry deleted from font path.
[  3165.010] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins
[  3165.010] (==) ModulePath set to "/usr/lib/xorg/modules"
[  3165.010] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  3165.010] (WW) Disabling Keyboard0
[  3165.010] (WW) Disabling Mouse0
[  3165.010] (II) Loader magic: 0x5610fba9e020
[  3165.010] (II) Module ABI versions:
[  3165.010]    X.Org ANSI C Emulation: 0.4
[  3165.010]    X.Org Video Driver: 23.0
[  3165.010]    X.Org XInput driver : 24.1
[  3165.010]    X.Org Server Extension : 10.0
[  3165.010] (++) using VT number 1

[  3165.011] (EE) systemd-logind: TakeControl failed: Only owner of session may take control
[  3165.011] (II) xfree86: Adding drm device (/dev/dri/card0)
[  3165.013] (--) PCI:*(0:0:2:0) 8086:3e9b:1025:125e rev 0, Mem @ 0xa2000000/16777216, 0xb0000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/131072
[  3165.013] (--) PCI: (0:1:0:0) 10de:1c8c:1025:1260 rev 161, Mem @ 0xa3000000/16777216, 0x90000000/268435456, 0xa0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[  3165.013] (II) LoadModule: "glx"
[  3165.013] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  3165.013] (II) Module glx: vendor="X.Org Foundation"
[  3165.013]    compiled for 1.19.6, module version = 1.0.0
[  3165.013]    ABI class: X.Org Server Extension, version 10.0
[  3165.013] (II) LoadModule: "nvidia"
[  3165.014] (WW) Warning, couldn't open module nvidia
[  3165.014] (II) UnloadModule: "nvidia"
[  3165.014] (II) Unloading nvidia
[  3165.014] (EE) Failed to load module "nvidia" (module does not exist, 0)
[  3165.014] (==) Matched modesetting as autoconfigured driver 0
[  3165.014] (==) Matched fbdev as autoconfigured driver 1
[  3165.014] (==) Matched vesa as autoconfigured driver 2
[  3165.014] (==) Assigned the driver to the xf86ConfigLayout
[  3165.014] (II) LoadModule: "modesetting"
[  3165.014] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  3165.014] (II) Module modesetting: vendor="X.Org Foundation"
[  3165.014]    compiled for 1.19.6, module version = 1.19.6
[  3165.014]    Module class: X.Org Video Driver
[  3165.014]    ABI class: X.Org Video Driver, version 23.0
[  3165.014] (II) LoadModule: "fbdev"
[  3165.014] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[  3165.014] (II) Module fbdev: vendor="X.Org Foundation"
[  3165.014]    compiled for 1.19.3, module version = 0.4.4
[  3165.014]    Module class: X.Org Video Driver
[  3165.014]    ABI class: X.Org Video Driver, version 23.0
[  3165.014] (II) LoadModule: "vesa"
[  3165.014] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[  3165.014] (II) Module vesa: vendor="X.Org Foundation"
[  3165.014]    compiled for 1.19.3, module version = 2.3.4
[  3165.014]    Module class: X.Org Video Driver
[  3165.014]    ABI class: X.Org Video Driver, version 23.0
[  3165.014] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  3165.014] (II) FBDEV: driver for framebuffer: fbdev
[  3165.014] (II) VESA: driver for VESA chipsets: vesa
[  3165.014] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[  3165.014] (EE) open /dev/dri/card0: Permission denied
[  3165.014] (WW) Falling back to old probe method for modesetting
[  3165.014] (EE) open /dev/dri/card0: Permission denied
[  3165.014] (II) Loading sub module "fbdevhw"
[  3165.014] (II) LoadModule: "fbdevhw"
[  3165.014] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  3165.014] (II) Module fbdevhw: vendor="X.Org Foundation"
[  3165.014]    compiled for 1.19.6, module version = 0.0.2
[  3165.014]    ABI class: X.Org Video Driver, version 23.0
[  3165.014] (EE) open /dev/fb0: Permission denied
[  3165.014] (WW) Falling back to old probe method for fbdev
[  3165.014] (II) Loading sub module "fbdevhw"
[  3165.014] (II) LoadModule: "fbdevhw"
[  3165.014] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  3165.014] (II) Module fbdevhw: vendor="X.Org Foundation"
[  3165.014]    compiled for 1.19.6, module version = 0.0.2
[  3165.014]    ABI class: X.Org Video Driver, version 23.0
[  3165.014] (EE) open /dev/fb0: Permission denied
[  3165.014] vesa: Ignoring device with a bound kernel driver
[  3165.014] (WW) Falling back to old probe method for vesa
[  3165.014] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  3165.014] (EE) Screen 0 deleted because of no matching config section.
[  3165.014] (II) UnloadModule: "modesetting"
[  3165.014] (EE) Screen 0 deleted because of no matching config section.
[  3165.014] (II) UnloadModule: "fbdev"
[  3165.014] (II) UnloadSubModule: "fbdevhw"
[  3165.014] (EE) Screen 0 deleted because of no matching config section.
[  3165.014] (II) UnloadModule: "vesa"
[  3165.014] (EE) Device(s) detected, but none match those in the config file.
[  3165.014] (EE) 
Fatal server error:
[  3165.014] (EE) no screens found(EE) 
[  3165.014] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[  3165.014] (EE) Please also check the log file at "/home/xxxx/.local/share/xorg/Xorg.1.log" for additional information.
[  3165.014] (EE) 
[  3165.056] (EE) Server terminated with error (1). Closing log file.

A:

I found the answer. The problem was logged in $HOME/.xsession-errors

