I could not start XInit and SDDM due to i3/KDE/Xorg bugs

Hello,

Attention, moderators, as for complete list of apps log, I am not allowed to put more than 2 links, you have to give me an authorisation to put the third link for somebody to view the complete list of apps, I can not post the endless log of complete list of apps as it is your rule. If you can not authorise, then I can not help you to find the issue.

Soon introduction

I am a new forum member, but not a newbie, because I have already been a user of Manjaro and Arch Linux since 2017. I have migrated from Arch Linux KDE to Endeavour OS i3 in late April. Since I am a new forum member, I decide to post this topic here on Newbie category.

Motivation

  • I use i3 as a daily primary window manager for my first account and KDE as a daily secondary desktop environment for my second account.
  • LightDM used to work. But as I am loyal to KDE, I have switched to SDDM, then Xinit and the display manager stopped working, what requires me always to type systemctl start sddm every time that I enter in tty, to start the display manager.
  • I have checked systemctl status sddm, seeing it was inactive and dead. I tried to force to activate and enable it, but it keeps inactive and dead.

Important observations:

  • I have searched several posts about startx, SDDM (inactive and dead, not starting), Xinit and Xorg in Arch Linux, Endeavour OS and Manjaro forums and subreddits of Reddit, and tried all their solutions, but unsuccessfully. I also tried with several Arch Wiki articles.
  • I have xf86-video-nouveau installed because of Sway, that I use at sometimes, because it does not support nvidia.

Logs Generation

  • I generated the logs inxi -Fxz, journalctl -p 3 -xb, systemd-analyze blame and lspci -vnn.
  • I generated the logs of systemctl status sddm.
  • I provide you the files pam-environment, .profile, .xinitrc, .xprofile and .zprofile.
  • I provide you the complete list of apps, including AURs.

Description

  • inxi -Fxz:

    System:    Kernel: 5.7.6-arch1-1 x86_64 bits: 64 compiler: gcc v: 10.1.0 Desktop: i3 4.18.1 Distro: EndeavourOS 
    Machine:   Type: Desktop Mobo: BIOSTAR model: X370GT7 serial: <filter> UEFI [Legacy]: American Megatrends v: 5.13 
               date: 08/07/2018 
    CPU:       Topology: 8-Core model: AMD Ryzen 7 2700X bits: 64 type: MT MCP arch: Zen+ rev: 2 L2 cache: 4096 KiB 
               flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 118208 
               Speed: 2082 MHz min/max: 2200/3700 MHz Core speeds (MHz): 1: 2322 2: 2330 3: 4160 4: 4167 5: 2087 6: 2087 7: 2087 
               8: 2087 9: 2086 10: 2086 11: 2086 12: 2087 13: 4171 14: 4163 15: 2086 16: 2087 
    Graphics:  Device-1: NVIDIA TU116 [GeForce GTX 1660] driver: nouveau v: kernel bus ID: 09:00.0 
               Display: x11 server: X.Org 1.20.8 driver: modesetting,nouveau unloaded: fbdev resolution: 2560x1080~60Hz 
               OpenGL: renderer: llvmpipe (LLVM 10.0.0 256 bits) v: 3.3 Mesa 20.1.2 direct render: Yes 
    Audio:     Device-1: NVIDIA TU116 High Definition Audio driver: snd_hda_intel v: kernel bus ID: 09:00.1 
               Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Biostar Microtech Intl Corp 
               driver: snd_hda_intel v: kernel bus ID: 0b:00.3 
               Sound Server: ALSA v: k5.7.6-arch1-1 
    Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Biostar Microtech Intl Corp driver: r8168 
               v: 8.048.03-NAPI port: f000 bus ID: 05:00.0 
               IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
    Drives:    Local Storage: total: 2.55 TiB used: 86.60 GiB (3.3%) 
               ID-1: /dev/sda vendor: Seagate model: ST2000DM008-2FR102 size: 1.82 TiB temp: 43 C 
               ID-2: /dev/sdb vendor: A-Data model: SU630 size: 447.13 GiB temp: 36 C 
               ID-3: /dev/sdc vendor: Samsung model: HD082GJ size: 74.53 GiB temp: 36 C 
               ID-4: /dev/sdd vendor: Kingston model: SA400S37240G size: 223.57 GiB temp: 34 C 
    Partition: ID-1: / size: 424.44 GiB used: 19.11 GiB (4.5%) fs: ext4 dev: /dev/sdb2 
               ID-2: /home size: 1.73 TiB used: 65.22 GiB (3.7%) fs: ext4 dev: /dev/sda2 
               ID-3: /opt size: 58.42 GiB used: 2.27 GiB (3.9%) fs: ext4 dev: /dev/sda1 
    Swap:      Alert: No Swap data was found. 
    Sensors:   System Temperatures: cpu: 64.1 C mobo: N/A gpu: nouveau temp: 54 C 
               Fan Speeds (RPM): N/A gpu: nouveau fan: 1546 
    Info:      Processes: 329 Uptime: 2h 29m Memory: 15.65 GiB used: 2.26 GiB (14.4%) Init: systemd Compilers: gcc: 10.1.0 
               clang: 10.0.0 Packages: 1639 Shell: fish v: 3.1.2 inxi: 3.1.04
    
  • lspci -vnn:

    View the lspci -vnn output log

  • system-analyze blame:

    43.481s updatedb.service                                                                         
    14.988s man-db.service                                                                           
     4.576s systemd-networkd-wait-online.service                                                     
     4.529s NetworkManager-wait-online.service                                                       
     1.176s systemd-logind.service                                                                   
      688ms lvm2-monitor.service                                                                     
      585ms systemd-random-seed.service                                                              
      468ms dev-sdb2.device                                                                          
      367ms tlp.service                                                                              
      336ms systemd-udevd.service                                                                    
      329ms systemd-fsck@dev-disk-by\x2duuid-6fb18eb1\x2d1882\x2d434a\x2da7e2\x2df849f3d78deb.service
      298ms systemd-networkd.service                                                                 
      289ms upower.service                                                                           
      255ms systemd-journald.service                                                                 
      246ms systemd-timesyncd.service                                                                
      220ms user@1001.service                                                                        
      207ms systemd-journal-flush.service                                                            
      143ms ldconfig.service                                                                         
      140ms udisks2.service                                                                          
      120ms org.cups.cupsd.service                                                                   
      117ms home.mount                                                                               
      115ms systemd-fsck@dev-disk-by\x2duuid-9d121068\x2dbb8d\x2d4e16\x2db29e\x2de842002ede2c.service
       82ms opt.mount                                                                                
       82ms user@1000.service                                                                        
       63ms polkit.service                                                                           
       58ms avahi-daemon.service                                                                     
       46ms systemd-udev-trigger.service                                                             
       40ms logrotate.service                                                                        
       36ms systemd-tmpfiles-setup.service                                                           
       31ms modprobe@drm.service                                                                     
       21ms colord.service                                                                           
       20ms systemd-tmpfiles-clean.service                                                           
       18ms systemd-sysusers.service                                                                 
       16ms NetworkManager.service                                                                   
       14ms systemd-binfmt.service                                                                   
       14ms systemd-modules-load.service                                                             
       13ms systemd-journal-catalog-update.service                                                   
       11ms systemd-tmpfiles-setup-dev.service                                                       
       10ms user-runtime-dir@1000.service                                                            
        8ms user-runtime-dir@1001.service                                                            
        8ms dev-hugepages.mount                                                                      
        8ms systemd-update-utmp.service                                                              
        8ms dev-mqueue.mount                                                                         
        7ms sys-kernel-debug.mount                                                                   
        7ms sys-kernel-tracing.mount                                                                 
        6ms kmod-static-nodes.service                                                                
        6ms systemd-sysctl.service                                                                   
        5ms systemd-remount-fs.service                                                               
        5ms systemd-update-done.service                                                              
        5ms systemd-user-sessions.service                                                            
        4ms rtkit-daemon.service                                                                     
        3ms usr-share-fonts.mount                                                                    
        3ms sys-fs-fuse-connections.mount                                                            
        2ms tmp.mount                                                                                
        2ms sys-kernel-config.mount                                                                  
        2ms proc-sys-fs-binfmt_misc.mount
    
  • journalctl -p 3 -xb:

    View journalctl -p 3 -xb output log

  • systemctl status sddm:

      ● sddm.service - Simple Desktop Display Manager
       Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; vendor preset: disabled)
       Active: active (running) since Tue 2020-06-30 16:55:36 -03; 2h 31min ago
         Docs: man:sddm(1)
               man:sddm.conf(5)
     Main PID: 6355 (sddm)
        Tasks: 35 (limit: 19133)
       Memory: 167.9M
       CGroup: /system.slice/sddm.service
               ├─ 6355 /usr/bin/sddm
               └─14111 /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{d8410743-be60-46b9-8540-a1ff52b8a7a3} -background none -noreset -displayfd 18>
    
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XKB_DEFAULT_MODEL=jp106 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XKB_DEFAULT_OPTIONS=grp:rctrl_toggle 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XMODIFIERS="@im=fcitx" 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: -r
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: -e 'keycode 118 = Multi_key' - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: Starting: "/usr/share/sddm/scripts/Xsession \"i3-with-shmlog\""
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm[6355]: Session started
      jun 30 17:22:41 gusbemacbe-x370gt7 sddm[6355]: Auth: sddm-helper exited successfully
      jun 30 17:22:41 gusbemacbe-x370gt7 sddm[6355]: Greeter stopped.
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XKB_DEFAULT_MODEL=jp106 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XKB_DEFAULT_OPTIONS=grp:rctrl_toggle 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XMODIFIERS="@im=fcitx" 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: -r
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: -e 'keycode 118 = Multi_key' - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: Starting: "/usr/share/sddm/scripts/Xsession \"i3-with-shmlog\""
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm[6355]: Session started
      jun 30 17:22:41 gusbemacbe-x370gt7 sddm[6355]: Auth: sddm-helper exited successfully
      jun 30 17:22:41 gusbemacbe-x370gt7 sddm[6355]: Greeter stopped.
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XKB_DEFAULT_MODEL=jp106 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XKB_DEFAULT_OPTIONS=grp:rctrl_toggle 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: XMODIFIERS="@im=fcitx" 
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: -r
                                                              - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: pam_env(sddm:session): Unrecognized Option: -e 'keycode 118 = Multi_key' - ignoring line
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm-helper[14249]: Starting: "/usr/share/sddm/scripts/Xsession \"i3-with-shmlog\""
      jun 30 17:22:40 gusbemacbe-x370gt7 sddm[6355]: Session started
      jun 30 17:22:41 gusbemacbe-x370gt7 sddm[6355]: Auth: sddm-helper exited successfully
      jun 30 17:22:41 gusbemacbe-x370gt7 sddm[6355]: Greeter stopped.
      ```
    
    
  • .pam-environment file, because of Xmodmap which was not started by Xinit or i3/KDE:

    # QT settings
    # Configurações do QT
    
    export QT_AUTO_SCREEN_SCALE_FACTOR=0
    
    if [ "$DESKTOP_SESSION" == "i3" ] || [ "$XDG_CURRENT_DESKTOP" == "i3" ] || 
    	 [ "$DESKTOP_SESSION" == "i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "i3-with-shmlog" ] || 
    	 [ "$DESKTOP_SESSION" == "/usr/share/xsessions/i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "/usr/share/xsessions/i3-with-shmlog" ];	then
    	export QT_QPA_PLATFORM=xcb
    else
    	export QT_QPA_PLATFORM=wayland-egl
    fi
    
    export QT_QPA_PLATFORMTHEME=qt5ct
    export QT_STYLE_OVERRIDE=kvantum
    
    # --- System variables     --- #
    # --- Variáveis ​​do sistema --- #
    export XDG_CACHE_HOME="$HOME/.cache"
    export XDG_CONFIG_HOME="$HOME/.config"
    export XDG_DATA_HOME="$HOME/.local/share"
    export XDG_USER_LOCAL="$HOME/.local"
    
    # ---  $HOME Clean-up   --- #
    # ---  Limpeza de $HOME --- #
    
    # Config
    # Ajuste
    export XINITRC="$HOME/.xinitrc"
    
    # Runtime
    # Tempo de execução
    export XAUTHORITY="$HOME/.Xauthority"
    
    # Keyboard settings
    # COnfigurações do teclado
    
    export GTK_IM_MODULE=fcitx 
    export QT_IM_MODULE=fcitx 
    export XKB_DEFAULT_LAYOUT=jp 
    export XKB_DEFAULT_MODEL=jp106 
    export XKB_DEFAULT_OPTIONS=grp:rctrl_toggle 
    export XMODIFIERS="@im=fcitx" 
    
    fcitx -r
    
    xmodmap -e 'keycode 118 = Multi_key'
    
  • .profile, if Xinit. i3 or KDE can not start the .pam-environment as I was uanble to enable Xmodmap:

    # QT settings
    # Configurações do QT
    
    export QT_AUTO_SCREEN_SCALE_FACTOR=0
    
    if [ "$DESKTOP_SESSION" == "i3" ] || [ "$XDG_CURRENT_DESKTOP" == "i3" ] || 
    	 [ "$DESKTOP_SESSION" == "i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "i3-with-shmlog" ] || 
    	 [ "$DESKTOP_SESSION" == "/usr/share/xsessions/i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "/usr/share/xsessions/i3-with-shmlog" ];	then
    	export QT_QPA_PLATFORM=xcb
    else
    	export QT_QPA_PLATFORM=wayland-egl
    fi
    
    export QT_QPA_PLATFORMTHEME=qt5ct
    export QT_STYLE_OVERRIDE=kvantum
    
    # --- System variables     --- #
    # --- Variáveis ​​do sistema --- #
    export XDG_CACHE_HOME="$HOME/.cache"
    export XDG_CONFIG_HOME="$HOME/.config"
    export XDG_DATA_HOME="$HOME/.local/share"
    export XDG_USER_LOCAL="$HOME/.local"
    
    # ---  $HOME Clean-up   --- #
    # ---  Limpeza de $HOME --- #
    
    # Config
    # Ajuste
    export XINITRC="$HOME/.xinitrc"
    
    # Runtime
    # Tempo de execução
    export XAUTHORITY="$HOME/.Xauthority"
    
    # Keyboard settings
    # Configurações do teclado
    
    export GTK_IM_MODULE=fcitx 
    export QT_IM_MODULE=fcitx 
    export XKB_DEFAULT_LAYOUT=jp 
    export XKB_DEFAULT_MODEL=jp106 
    export XKB_DEFAULT_OPTIONS=grp:rctrl_toggle 
    export XMODIFIERS="@im=fcitx" 
    
    fcitx -r
    
    xmodmap -e 'keycode 118 = Multi_key'
    
  • .xinitrc file:

    #!/bin/sh
    
    userresources=$HOME/.Xresources
    usermodmap=$HOME/.Xmodmap
    
    # merge in defaults and keymaps
    # mesclar padrões e mapas de teclas
    
    if [ -f "$userresources" ]; then
        xrdb -merge "$userresources"
    fi
    
    if [ -f "$usermodmap" ]; then
        xmodmap -e "$usermodmap"
    fi
    
    # start some nice programs
    # iniciar alguns programas legais
    
    if [ -d /etc/X11/xinit/xinitrc.d ] ; then
     for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
      [ -x "$f" ] && . "$f"
     done
     unset f
    fi
    
    twm &
    xclock -geometry 50x50-1+1 &
    xterm -geometry 80x50+494+51 &
    xterm -geometry 80x20+494-0 &
    exec xterm -geometry 80x66+0+0 -name login
    exec /bin/i3
    
  • .xprofile, if I was unable to start the files .pam-environment and .profile with i3 and KDE, sourcing Xmdomap:

    # QT settings
    # Configurações do QT
    
    export QT_AUTO_SCREEN_SCALE_FACTOR=0
    
    if [ "$DESKTOP_SESSION" == "i3" ] || [ "$XDG_CURRENT_DESKTOP" == "i3" ] || 
    	 [ "$DESKTOP_SESSION" == "i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "i3-with-shmlog" ] || 
    	 [ "$DESKTOP_SESSION" == "/usr/share/xsessions/i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "/usr/share/xsessions/i3-with-shmlog" ];	then
    	export QT_QPA_PLATFORM=xcb
    else
    	export QT_QPA_PLATFORM=wayland-egl
    fi
    
    export QT_QPA_PLATFORMTHEME=qt5ct
    export QT_STYLE_OVERRIDE=kvantum
    
    # --- System variables     --- #
    # --- Variáveis ​​do sistema --- #
    export XDG_CACHE_HOME="$HOME/.cache"
    export XDG_CONFIG_HOME="$HOME/.config"
    export XDG_DATA_HOME="$HOME/.local/share"
    export XDG_USER_LOCAL="$HOME/.local"
    
    # ---  $HOME Clean-up   --- #
    # ---  Limpeza de $HOME --- #
    
    # Config
    # Ajuste
    export XINITRC="$HOME/.xinitrc"
    
    # Runtime
    # Tempo de execução
    export XAUTHORITY="$HOME/.Xauthority"
    
    # Keyboard settings
    # Configurações do teclado
    
    export GTK_IM_MODULE=fcitx 
    export QT_IM_MODULE=fcitx 
    export XKB_DEFAULT_LAYOUT=jp 
    export XKB_DEFAULT_MODEL=jp106 
    export XKB_DEFAULT_OPTIONS=grp:rctrl_toggle 
    export XMODIFIERS="@im=fcitx" 
    
    fcitx -r
    
    xmodmap -e 'keycode 118 = Multi_key'
    
  • .zprofile because I use zsh:

    if cat /proc/cmdline | grep -q "video=eDP-1:d"; then 
    	[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && kodi
    else
    	[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && $HOME/.config/sway/scripts/run.sh > /dev/null 2>&1
    fi
    
    # QT settings
    # Configurações do QT
    
    export QT_AUTO_SCREEN_SCALE_FACTOR=0
    
    if [ "$DESKTOP_SESSION" == "i3" ] || [ "$XDG_CURRENT_DESKTOP" == "i3" ] || 
    	 [ "$DESKTOP_SESSION" == "i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "i3-with-shmlog" ] || 
    	 [ "$DESKTOP_SESSION" == "/usr/share/xsessions/i3-with-shmlog" ] || [ "$XDG_CURRENT_DESKTOP" == "/usr/share/xsessions/i3-with-shmlog" ];	then
    	export QT_QPA_PLATFORM=xcb
    else
    	export QT_QPA_PLATFORM=wayland-egl
    fi
    
    export QT_QPA_PLATFORMTHEME=qt5ct
    export QT_STYLE_OVERRIDE=kvantum
    
    # --- System variables     --- #
    # --- Variáveis ​​do sistema --- #
    export XDG_CACHE_HOME="$HOME/.cache"
    export XDG_CONFIG_HOME="$HOME/.config"
    export XDG_DATA_HOME="$HOME/.local/share"
    export XDG_USER_LOCAL="$HOME/.local"
    
    # ---  $HOME Clean-up   --- #
    # ---  Limpeza de $HOME --- #
    
    # Config
    # Ajuste
    export XINITRC="$HOME/.xinitrc"
    
    # Runtime
    # Tempo de execução
    # export TMUX_TMPDIR="${XDG_RUNTIME_DIR}"
    export XAUTHORITY="$HOME/.Xauthority"
    
    # Keyboard settings
    # Configurações do teclado
    
    export GTK_IM_MODULE=fcitx 
    export QT_IM_MODULE=fcitx 
    export XKB_DEFAULT_LAYOUT=jp 
    export XKB_DEFAULT_MODEL=jp106 
    export XKB_DEFAULT_OPTIONS=grp:rctrl_toggle 
    export XMODIFIERS="@im=fcitx" 
    
    fcitx -r
    
    xmodmap -e 'keycode 118 = Multi_key'
    
  • Complete list of apps, including the AURs: (I am not allowed to put more than 2 links)

That is one of those baffling statements that I read every now and then. If you want loyalty - get a dog. KDE is just a desktop; it doesn’t demand loyalty. May I respectfully suggest just using what works.