Switchable graphics problem - Failed to start Light Display Manager

I’m using Manjaro i3 on a Legion laptop with switchable graphics (AMD/nVidia) and X fails to start on most boots but very rarely works fine. When it fails I just get an empty prompt (black screen with a terminal cursor) but I can still switch to another TTY and manually start X.

I also know this is a graphics problem because if I switch from switchable graphics to discrete graphics on the BIOS menu the system always boots normally.

Any help would be really appreciated.

This is the output of journalctl -p 4 for a failed boot:

Jun 02 11:27:42 machinename kernel: TSC synchronization [CPU#0 -> CPU#1]:
Jun 02 11:27:42 machinename kernel: Measured 148897358540 cycles TSC warp between CPUs, turning off TSC clock.
Jun 02 11:27:42 machinename kernel:   #2  #3  #4  #5  #6  #7  #8  #9 #10 #11
Jun 02 11:27:42 machinename kernel: pci 0000:00:00.2: can't derive routing for PCI INT A
Jun 02 11:27:42 machinename kernel: pci 0000:00:00.2: PCI INT A: not connected
Jun 02 11:27:42 machinename kernel: Unstable clock detected, switching default tracing clock to "global"
                                  If you want to keep using the local clock, then add:
                                    "trace_clock=local"
                                  on the kernel command line
Jun 02 11:27:42 machinename kernel: i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
Jun 02 11:27:42 machinename kernel: acpi PNP0C14:01: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:00)
Jun 02 11:27:42 machinename kernel: acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:00)
Jun 02 11:27:42 machinename kernel: iwlwifi 0000:04:00.0: api flags index 2 larger than supported by driver
Jun 02 11:27:42 machinename kernel: ACPI Warning: \_SB.PCI0.GPP0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20210730/nsarguments-61)
Jun 02 11:27:43 machinename kernel: thermal thermal_zone0: failed to read out thermal zone (-61)
Jun 02 11:27:43 machinename kernel: ATPX version 1, functions 0x00000001
Jun 02 11:27:43 machinename kernel: ATPX Hybrid Graphics
Jun 02 11:27:43 machinename kernel: amdgpu 0000:05:00.0: amdgpu: PSP runtime database doesn't exist
Jun 02 11:27:43 machinename systemd[1]: lightdm.service: Failed with result 'exit-code'.
Jun 02 11:27:43 machinename systemd[1]: lightdm.service: Failed with result 'exit-code'.
Jun 02 11:27:43 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:43 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:43 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:43 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:43 machinename systemd[1]: lightdm.service: Failed with result 'exit-code'.
Jun 02 11:27:44 machinename systemd[1]: lightdm.service: Failed with result 'exit-code'.
Jun 02 11:27:44 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:44 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:44 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:44 machinename kernel: ACPI: \: failed to evaluate _DSM (0x1001)
Jun 02 11:27:44 machinename systemd[1]: lightdm.service: Failed with result 'exit-code'.
Jun 02 11:27:44 machinename kernel: amdgpu: SRAT table not found
Jun 02 11:27:44 machinename kernel: nvidia-gpu 0000:01:00.3: i2c timeout error e0000000
Jun 02 11:27:44 machinename kernel: ucsi_ccg 1-0008: i2c_transfer failed -110
Jun 02 11:27:44 machinename kernel: ucsi_ccg 1-0008: ucsi_ccg_init failed - -110
Jun 02 11:27:44 machinename kernel: ucsi_ccg: probe of 1-0008 failed with error -110
Jun 02 11:27:44 machinename systemd[1]: lightdm.service: Start request repeated too quickly.
Jun 02 11:27:44 machinename systemd[1]: lightdm.service: Failed with result 'exit-code'.
Jun 02 11:27:44 machinename systemd[1]: Failed to start Light Display Manager.
Jun 02 11:27:48 machinename kernel: kauditd_printk_skb: 71 callbacks suppressed
Jun 02 11:27:48 machinename avahi-daemon[451]: Host name conflict, retrying with machinename-2
Jun 02 11:27:49 machinename avahi-daemon[451]: Host name conflict, retrying with machinename-3
Jun 02 11:28:12 machinename kernel: kauditd_printk_skb: 10 callbacks suppressed

These are my machine’s specs (from the inxi command):

System:
  Kernel: 5.15.41-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    Desktop: i3 v: 4.20.1 info: i3bar vt: 7 dm: LightDM v: 1.30.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82B1 v: Lenovo Legion 5 15ARH05H
    serial: <superuser required> Chassis: type: 10 v: Lenovo Legion 5 15ARH05H
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40700 WIN
    serial: <superuser required> UEFI: LENOVO v: FSCN14WW date: 08/26/2020
Battery:
  ID-1: BAT0 charge: 25.0 Wh (45.0%) condition: 55.6/60.0 Wh (92.7%)
    volts: 15.2 min: 15.4 model: SMP L19M4PC0 type: Li-poly serial: <filter>
    status: discharging cycles: 58
Memory:
  RAM: total: 7.2 GiB used: 1.16 GiB (16.1%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: 6-core model: AMD Ryzen 5 4600H with Radeon Graphics bits: 64
    type: MT MCP smt: enabled arch: Zen 2 rev: 1 cache: L1: 384 KiB L2: 3 MiB
    L3: 8 MiB
  Speed (MHz): avg: 1439 high: 1580 min/max: 1400/3000 boost: enabled
    cores: 1: 1566 2: 1397 3: 1397 4: 1396 5: 1397 6: 1397 7: 1397 8: 1526
    9: 1580 10: 1397 11: 1432 12: 1397 bogomips: 71893
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid
    f16c flushbyasid fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibrs
    ibs irperf lahf_lm lbrv lm mba mca mce misalignsse mmx mmxext monitor
    movbe msr mtrr mwaitx nonstop_tsc nopl npt nrip_save nx osvw
    overflow_recov pae pat pausefilter pclmulqdq pdpe1gb perfctr_core
    perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse pse36 rapl rdpid
    rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni skinit smap smca
    smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor svm svm_lock
    syscall tce topoext tsc tsc_scale umip v_spec_ctrl v_vmsave_vmload vgif
    vmcb_clean vme vmmcall wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr
    xsaveopt xsaves
Graphics:
  Device-1: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel pcie:
    speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: none bus-ID: 05:00.0
    chip-ID: 1002:1636 class-ID: 0300
  Device-2: Syntek Integrated Camera type: USB driver: uvcvideo
    bus-ID: 3-3:2 chip-ID: 174f:244c class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.3 compositor: Picom v: git-7e568
    driver: X: loaded: amdgpu unloaded: modesetting alternate: fbdev,vesa
    gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 mapped: eDP model: BOE Display 0x08e8 res: 1920x1080
    hz: 120 dpi: 142 size: 344x194mm (13.54x7.64") diag: 395mm (15.5") modes:
    max: 1920x1080 min: 640x480
  Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
    pcie: speed: 16 GT/s lanes: 16 bus-ID: 05:00.5 chip-ID: 1022:15e2
    class-ID: 0480
  Device-2: AMD Family 17h/19h HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 05:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.41-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie:
    speed: 5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp4s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 5-3:3 chip-ID: 8087:0029 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 476.94 GiB used: 23.96 GiB (5.0%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZALQ512HALU-000L2
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: AL2QFXV7 temp: 27.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / size: 232.8 GiB used: 23.93 GiB (10.3%) fs: ext4
    dev: /dev/nvme0n1p5 label: N/A uuid: 1c8dea05-11d0-40ed-a6df-3dd99f8ec94e
  ID-2: /boot/efi size: 256 MiB used: 32.9 MiB (12.9%) fs: vfat
    dev: /dev/nvme0n1p1 label: SYSTEM_DRV uuid: A0A4-06E4
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p2 size: 16 MiB fs: <superuser required> label: N/A
    uuid: N/A
  ID-2: /dev/nvme0n1p3 size: 238.1 GiB fs: ntfs label: Windows-SSD
    uuid: BC14A4CE14A48CC8
  ID-3: /dev/nvme0n1p4 size: 1000 MiB fs: ntfs label: WINRE_DRV
    uuid: CE04A5F104A5DD29
USB:
  Hub-1: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-3:2 info: Syntek Integrated Camera type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 174f:244c class-ID: 0e02 serial: <filter>
  Hub-2: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 5-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 5-1:2 info: Genesys Logic Hub ports: 2 rev: 2.1 speed: 480 Mb/s
    chip-ID: 05e3:0610 class-ID: 0900
  Device-1: 5-3:3 info: Intel AX200 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0029
    class-ID: e001
  Device-2: 5-4:4 info: Integrated Express ITE Device(8910) type: Keyboard
    driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s
    power: 100mA chip-ID: 048d:c100 class-ID: 0301
  Hub-5: 6-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-6: 6-1:2 info: Genesys Logic GL3523 Hub ports: 2 rev: 3.2
    speed: 5 Gb/s chip-ID: 05e3:0620 class-ID: 0900
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 36.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 244 Uptime: 36m wakeups: 1 Init: systemd v: 250 Compilers:
  gcc: 12.1.0 clang: 13.0.1 Packages: pacman: 1167 Shell: Bash v: 5.1.16
  running-in: urxvtd inxi: 3.3.16

provide also:
mhwd -l && mhwd -li

Thanks for taking the time to help.

Here is the output for mhwd -l && mhwd -li:

> 0000:03:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0300:10de:1f15) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-prime            2021.12.18               false            PCI
video-hybrid-amd-nvidia-470xx-prime            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:05:00.0 (0300:1002:1636) Display controller ATI Technologies Inc:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-prime            2021.12.18               false            PCI
video-hybrid-amd-nvidia-470xx-prime            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


[ivoid@Ivolandia ~]$  mhwd -l && mhwd -li
> 0000:03:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0300:10de:1f15) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-prime            2021.12.18               false            PCI
video-hybrid-amd-nvidia-470xx-prime            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:05:00.0 (0300:1002:1636) Display controller ATI Technologies Inc:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-prime            2021.12.18               false            PCI
video-hybrid-amd-nvidia-470xx-prime            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

you dont even have installed nvidia/hybrid drivers… is there a reason for it?

Sorry if it was a noobish mistake, I assumed that the correct drivers would be automatically detected but apparently that’s not the case, I should have checked this earlier. Given that when switching to discrete graphics it seemed to work I assumed that was the case, the correct drivers were being selected and installed.

I’ve installed the hybrid graphics driver (video-hybrid-amd-nvidia-prime) and it now works correctly at every boot, thanks for the help.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.