Can't boot into X11 without a power supply on a laptop with NVIDIA GPU

I’m using KDE Spin, I edited “[General] DisplayServer=x11” in /etc/sddm.conf due to a keyboard layout issue.

Now I encountered another problem, I can’t boot into X11 session without plugin in power supply on my laptop. All I get after booting is a black screen with a mouse cursor, but I can still switch to another tty.
I tried to change the login session back to Wayland, then I can login, and I can also start some programs like vkcube using NVIDIA GPU, so it’s not that the GPU is not working I guess.

Here’s my hardware info
Model: Gigabyte AORUS 15P XD
CPU: i7-11800H
GPU: RTX 3070
Firmware Version: FE02

Here’s my boot log
Since it seems I can’t upload txt file here. I uploaded it to Google Drive.
bootlog

This really should not be required. The login screen where you enter the password should have a gear icon that allows one to select xorg as the DE for logging in.

You can’t upload a .txt file, but you can copy the text and paste it into your post (within limits) as preformatted text using the </> button on the toolbar.

This really should not be required. The login screen where you enter the password should have a gear icon that allows one to select xorg as the DE for logging in.

The problem is that I need it in order to have dvorak in the login screen.

You can’t upload a .txt file, but you can copy the text and paste it into your post (within limits) as preformatted text using the </> button on the toolbar.

Since the log is quite long, and I’m not sure which part I can ignore, I’m sure if it’s appropriate to paste the entire log in the post.

The gear icon changes the display server used for the session after logging in. The sddm.conf key mentioned changes the display server used for sddm itself (the login screen).

I’m not familiar with sddm but I don’t see anything that stands out immediately in the logs, other than some drives failing to mount (right before you switched to tty4).

Are you able to start sddm from tty?

systemctl start sddm

If not, check the status:

systemctl status sddm

other than some drives failing to mount

those are external drives, I have set nofail mount option in fstab, should be okay I think.

Are you able to start sddm from tty

SDDM was already running, but I do get graphic output after restarting it.

before restarting:

● sddm.service - Simple Desktop Display Manager
     Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Sun 2023-05-07 17:04:04 +08; 49s ago
       Docs: man:sddm(1)
             man:sddm.conf(5)
   Main PID: 1431 (sddm)
      Tasks: 32 (limit: 38060)
     Memory: 318.3M
        CPU: 741ms
     CGroup: /system.slice/sddm.service
             ├─1431 /usr/bin/sddm
             └─1439 /usr/libexec/Xorg -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_Tzbnxk -noreset -displayfd 15

May 07 17:04:04 asuka-pc systemd[1]: Started sddm.service - Simple Desktop Display Manager.
May 07 17:04:07 asuka-pc sddm-helper[1563]: pam_unix(sddm-greeter:session): session opened for user sddm(uid=984) by (uid=0)
May 07 17:04:07 asuka-pc sddm-helper[1563]: Starting X11 session: "" "/usr/bin/sddm-greeter --socket /tmp/sddm-:0-LKVwsw --theme /usr/share/sddm/themes/01-breeze-fedora"

after restarting

● sddm.service - Simple Desktop Display Manager
     Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Sun 2023-05-07 17:05:10 +08; 10s ago
       Docs: man:sddm(1)
             man:sddm.conf(5)
   Main PID: 1834 (sddm)
      Tasks: 32 (limit: 38060)
     Memory: 115.3M
        CPU: 461ms
     CGroup: /system.slice/sddm.service
             ├─1834 /usr/bin/sddm
             └─1838 /usr/libexec/Xorg -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_jcCqvd -noreset -displayfd 15

May 07 17:05:10 asuka-pc systemd[1]: Started sddm.service - Simple Desktop Display Manager.
May 07 17:05:11 asuka-pc sddm-helper[1872]: pam_unix(sddm-greeter:session): session opened for user sddm(uid=984) by (uid=0)
May 07 17:05:11 asuka-pc sddm-helper[1872]: Starting X11 session: "" "/usr/bin/sddm-greeter --socket /tmp/sddm-:0-NgHHQB --theme /usr/share/sddm/themes/01-breeze-fedora"

I can’t tell any difference.

Maybe something should be started before SDDM get started after SDDM for some reason?

Do you use Optimus? I found a note regarding sddm in the Quick Docs on Optimus (it’s at the end of step 8).

Yes, I do use Optimus.
I Just tried it, and it’s still the same.