[Optimus] KDE on Nvidia descrete card black screen

Hi, i’m facing a problem. I’ve installed the nvidia closed driver from RPMFusion, than i followed the guide provided here to set the Nvidia card as the primary GPU. After a reboot i cannot see the login screen, instead i see only a black screen. If i switch to a different tty and type startx, the xserver start normally on the nvidia GPU and everything seems fine. How i can resolve the initial black screen? It’s frustrating change every time to a different tty to get to the desktop.

I’m using the fedora 32 Kde spin, on a Lenovo Ideapad 100 15IBD with core i5 5200u and Nvidia GeForce 920M as descrete Gpu.

Any Idea?
Thank you in advance.

You might look at this post and see if it helps.

Hi, thank you for the reply. I’ve already read that post. If you notice the last comments in that post are mine :).

Try to press the keys Win + P (one time, if continues black again, repeat about 4-5 times) for changing the display output, maybe is using some external video output not connected to any display. If solved, once you enter the session, go to display settings, set and apply to use the correct display and save the settings. Maybe the options are aparently right, in that case modify something (resolution or anything), apply, then set them again (be sure to select the display output), and apply again for saving changes.

Hi I’ve tried but no luck. The screen is blank not just black, it’s like when the computer is turned off and some time toggle from blank to black, I can see the slight change in color. I’ve tried even to raise the brightness or toggle the back light without success.

Hi @simobonfo,

SDDM takes some time to load up so it will be some 30 seconds to 1 minute before you get to see the greeter with the discrete GPU. I would highly suggest you to wait for a bit before hitting the keys to reach the tty.

Hi @t0xic0der unfortunately after 10 minutes the screen is still in the same state. I’ve even write those two commands into /usr/share/sddm/scripts/Xsetup:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

This method is described in the Archwiki

Did you set the option about PrimaryGPU as YES first? These lines in the Xsetup would only come handy if SDDM actually knows that NVIDIA is the primary card.

Yes i have used the nvidia.conf file that i found in /usr/share/X11/xorg.conf.d/, modified with Option “PrimaryGPU” “yes” in both Outputclass and ServerLayout sections and placed in /etc/X11/xorg.conf.d/.

This is the full content of that file:

#This file is provided by xorg-x11-drv-nvidia
#Do not edit

Section "OutputClass"
        Identifier "nvidia"
        MatchDriver "nvidia-drm"
        Driver "nvidia"
        Option "AllowEmptyInitialConfiguration"
        Option "SLI" "Auto"
        Option "BaseMosaic" "on"
        Option "PrimaryGPU" "yes"
EndSection

Section "ServerLayout"
        Identifier "layout"
        Option "AllowNVIDIAGPUScreens"
        Option "PrimaryGPU" "yes"
EndSection

In theory it should work then. Can you try jumping into the interactive shell during boot Ctrl+Alt+F3 and then explicitly start the SDDM sudo systemctl start sddm.service? Let me know what you get.

Hi I’ve tried to start sddm as you suggested and I get literally nothing. I switched to a different tty, logged in via command line and run the command. After that nothing has append see photo

Well I’ll be damned. Enter xrandr and send the output. I think the X cannot detect the display.

Yes, the output of xrandr is Can't open display.

Oh boy. Check the status of SDDM service and journal output for it. As the greeter is the first thing that accesses X (it would have been a nightmare to actually speak it lol) it might have information as to how X can’t do so.

Quick
sudo systemctl status sddm.service

1 Like

I ran that command in a tty, if i run xrandr inside a terminal after startx i can get the display proprierties

I don’t need it from the terminal. I needed it from the tty because that is the display where the greeter is expected to eventually appear. You did the right thing.

Ok, those are the outputs of the commands:

First systemctl status sddm.service

● sddm.service - Simple Desktop Display Manager
     Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2020-05-09 14:16:44 CEST; 1min 8s ago
       Docs: man:sddm(1)
             man:sddm.conf(5)
   Main PID: 1302 (sddm)
      Tasks: 8 (limit: 9392)
     Memory: 134.2M
        CPU: 602ms
     CGroup: /system.slice/sddm.service
             ├─1302 /usr/bin/sddm
             └─1314 /usr/libexec/Xorg -dpi 0 -auth /var/run/sddm/{ad6f2204-0ac3-442b-a63d-6f29c9051076} -background none -noreset -displayfd 18 -seat seat0 vt1

mag 09 14:16:44 localhost.localdomain systemd[1]: Started Simple Desktop Display Manager.
mag 09 14:16:46 localhost.localdomain sddm-helper[1535]: pam_unix(sddm-greeter:session): session opened for user sddm by (uid=0)

For journalcl is there a way to upload a text file? i don’t want to comment with a full output, i think is too long

It seems normal to me @simobonfo. Strangely enough, the service is loaded and inactive. This is certainly not something I expected. If X server could not be detected by xrandr then even SDDM should not have detected it.

Totally at loss here and in the verge of recommending you Workstation. :laughing:

You mean install Fedora 32 workstation?

Yes. My guide works flawlessly there. I have never tried Fedora + KDE so could not quite find a reason to write on for it.