Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Black screen after executing startx command
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
angryMethane
n00b
n00b


Joined: 07 Oct 2018
Posts: 8

PostPosted: Tue Apr 23, 2019 3:39 pm    Post subject: Black screen after executing startx command Reply with quote

I use startx command to start i3wm.
GPU is GTX 850m. The version of nvidia-drivers is 418.56.

~/.xinitrc:
Code:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
xrdb ~/.Xresources
export $(dbus-launch)
feh --bg-fill ~/Pictures/background1.jpg
exec i3 -V >/tmp/i3-$(date +'%F-%k-%M-%S').log 2>&1


/etc/X11/xorg.conf:
Code:

Section "Device"
    Identifier "Device0"
    Driver     "nvidia"
    BusID     "PCI:1:0:0"
    Option    "RegistryDwords" "EnableBrightnessControl=1"
EndSection
Section "Files"
    ModulePath "/usr/lib64/xorg/modules"
    ModulePath "/usr/lib64/opengl/nvidia"
EndSection


USE flags of nvidia-drivers:
Code:

X compat driver gtk3 kms multilib tools uvm

The output of nvidia-smi command shows that /usr/libexec/Xorg is using GPU.

When I keystroke some shortcuts in i3wm, the log of i3wm displays corresponding operations.

----------------

log of i3wm:
Code:

04/23/2019 11:25:55 PM - i3 4.15.0.1 (03-13-2018) starting
04/23/2019 11:25:55 PM - Parsing configfile /home/xxxxx/.config/i3/config
04/23/2019 11:25:55 PM - deciding for version 4 due to this line: # i3 config file (v4)
04/23/2019 11:25:55 PM - [libi3] ../../i3-4.15.0.1/libi3/font.c Using Pango font SF Pro Display, size 10
Fontconfig error: Cannot scan config file "infinality/conf.d"
04/23/2019 11:25:55 PM - Used number 1 for workspace with name 1
04/23/2019 11:25:55 PM - This is not an in-place restart, copying root window contents to a pixmap
04/23/2019 11:25:55 PM - auto-starting compton -b -c --config ~/.config/i3/compton.conf
04/23/2019 11:25:55 PM - executing: compton -b -c --config ~/.config/i3/compton.conf
04/23/2019 11:25:55 PM - auto-starting dunst
04/23/2019 11:25:55 PM - executing: dunst
Get monitors reported 0 monitors, falling back to single monitor mode
04/23/2019 11:28:13 PM - WM_NAME changed to "glxgears"
04/23/2019 11:28:13 PM - Using legacy window title. Note that in order to get Unicode window titles in i3, the application has to set _NET_WM_NAME (UTF-8)
04/23/2019 11:28:13 PM - Checking window 0x00e00002 (class (null))
04/23/2019 11:28:13 PM - dock status does not match
04/23/2019 11:28:13 PM - Checking window 0x00e00002 (class (null))
04/23/2019 11:28:13 PM - dock status does not match
04/23/2019 11:28:13 PM - workspace visible? fs = 0x55b5b664a260, ws = 0x55b5b664a260
04/23/2019 11:28:13 PM - Checking window 0x00e00002 (class (null))
04/23/2019 11:28:13 PM - Checking window 0x00e00002 (class (null))
04/23/2019 11:28:13 PM - workspace visible? fs = 0x55b5b664a260, ws = 0x55b5b664a260
04/23/2019 11:28:13 PM - workspace visible? fs = 0x55b5b664a260, ws = 0x55b5b664a260
04/23/2019 11:28:13 PM - workspace visible? fs = 0x55b5b6646380, ws = 0x55b5b6646380
04/23/2019 11:28:37 PM - workspace visible? fs = 0x55b5b664a260, ws = 0x55b5b664a260
04/23/2019 11:28:37 PM - Not a managed window, ignoring UnmapNotify event
04/23/2019 11:28:37 PM - Not a managed window, ignoring UnmapNotify event
04/23/2019 11:28:37 PM - Not a managed window, ignoring UnmapNotify event
04/23/2019 11:28:37 PM - Not a managed window, ignoring UnmapNotify event
04/23/2019 11:28:37 PM - Not a managed window, ignoring UnmapNotify event


Xorg.0.log:
http://fars.ee/wSPb

[Moderator edit: Moved poster's self-response into main post, then deleted that self-response to return the thread to the unanswered list.

OP: Generally, if post length permits, you should edit extra information into your first post instead of replying to it. Some users run a canned search for threads with zero replies as a way of finding posts to answer. When you replied to yourself, you removed your thread from that list, even though you were not replying to announce that the thread was solved. Thus, they would no longer see your thread on the list of unanswered threads.
-Hu]
Back to top
View user's profile Send private message
Pearlseattle
Apprentice
Apprentice


Joined: 04 Oct 2007
Posts: 162
Location: Switzerland

PostPosted: Thu Apr 25, 2019 8:52 pm    Post subject: Reply with quote

Hi

Any historical informations about this? (e.g. did it use to work or is this a brand new setup never tried before)

What kind of device is this? (e.g. laptop or a desktop)

In the case of a desktop, how is it connected to the monitor? (e.g. HDMI, VGA, DisplayPort)

Could you pls. post the output of "lspci -k"?
E.g. if your nVidia is just a 3D accellerator accompanying an embedded (in the CPU) Intel GPU then you probably won't be able to use the nVidia GPU directly. (sorry if this is obvious to you, but it wasn't to me and I spent quite some time until I realized this)

Cheers

EDIT: maybe "uname -a" would be as well useful
Back to top
View user's profile Send private message
angryMethane
n00b
n00b


Joined: 07 Oct 2018
Posts: 8

PostPosted: Fri Apr 26, 2019 11:10 am    Post subject: Reply with quote

Thanks for your reply. My device is ASUS laptop which uses GTX 850m.
Output of "lspci -k":
Code:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller
        Kernel modules: ie31200_edac
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
        Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. 4th Gen Core Processor Integrated Graphics Controller
        Kernel driver in use: i915
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
        Subsystem: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
        Kernel driver in use: snd_hda_intel
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
        Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset Family USB xHCI
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
        Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset Family MEI Controller
        Kernel driver in use: mei_me
        Kernel modules: mei_me
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
        Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset High Definition Audio Controller
        Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
        Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
        Kernel driver in use: pcieport
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
        Kernel driver in use: pcieport
00:1f.0 ISA bridge: Intel Corporation HM86 Express LPC Controller (rev 05)
        Subsystem: ASUSTeK Computer Inc. HM86 Express LPC Controller
        Kernel driver in use: lpc_ich
        Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
        Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]
        Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
        Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset Family SMBus Controller
        Kernel driver in use: i801_smbus
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)
        Subsystem: ASUSTeK Computer Inc. GM107M [GeForce GTX 850M]
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia
03:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb)
        Subsystem: Intel Corporation Dual Band Wireless-AC 7260
        Kernel modules: iwlwifi
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
        Subsystem: ASUSTeK Computer Inc. RTL8411B PCI Express Card Reader
        Kernel driver in use: rtsx_pci
        Kernel modules: rtsx_pci
04:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
        Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
        Kernel driver in use: r8169


I'm now using kde with sddm. I installed plasma-desktop and sddm. It's the same with black screen.
Output of "systemctl status sddm":
Code:

Apr 26 18:56:50 localhost systemd[1]: Started Simple Desktop Display Manager.
Apr 26 18:56:50 localhost sddm[5084]: Initializing...
Apr 26 18:56:50 localhost sddm[5084]: Starting...
Apr 26 18:56:50 localhost sddm[5084]: Logind interface found
Apr 26 18:56:50 localhost sddm[5084]: Adding new display on vt 1 ...
Apr 26 18:56:50 localhost sddm[5084]: Loading theme configuration from ""
Apr 26 18:56:50 localhost sddm[5084]: Display server starting...
Apr 26 18:56:50 localhost sddm[5084]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{3084a0ab-3a25-4874-addf-fc3af63e7d37} -background none -noreset -displayfd 17 -seat seat0 vt1
Apr 26 18:56:51 localhost sddm[5084]: Setting default cursor
Apr 26 18:56:51 localhost sddm[5084]: Running display setup script  "/usr/share/sddm/scripts/Xsetup"
Apr 26 18:56:51 localhost sddm[5084]: Display server started.
Apr 26 18:56:51 localhost sddm[5084]: Socket server starting...
Apr 26 18:56:51 localhost sddm[5084]: Socket server started.
Apr 26 18:56:51 localhost sddm[5084]: Loading theme configuration from ""
Apr 26 18:56:51 localhost sddm[5084]: Greeter starting...
Apr 26 18:56:51 localhost sddm[5084]: Adding cookie to "/var/run/sddm/{3084a0ab-3a25-4874-addf-fc3af63e7d37}"
Apr 26 18:56:51 localhost sddm-helper[5115]: [PAM] Starting...
Apr 26 18:56:51 localhost sddm-helper[5115]: [PAM] Authenticating...
Apr 26 18:56:51 localhost sddm-helper[5115]: [PAM] returning.
Apr 26 18:56:51 localhost sddm-helper[5115]: pam_unix(sddm-greeter:session): session opened for user sddm by (uid=0)
Apr 26 18:56:51 localhost sddm[5084]: Greeter session started successfully
Apr 26 18:56:51 localhost sddm[5084]: Message received from greeter: Connect


I also add the following lines into "/usr/share/sddm/scripts/Xsetup":
Code:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Output of "uname -a":
Code:

Linux localhost.localdomain 4.19.27-gentoo-r1 #1 SMP Fri Apr 26 13:56:59 CST 2019 x86_64 Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz GenuineIntel GNU/Linux


Pearlseattle wrote:
Hi

Any historical informations about this? (e.g. did it use to work or is this a brand new setup never tried before)

What kind of device is this? (e.g. laptop or a desktop)

In the case of a desktop, how is it connected to the monitor? (e.g. HDMI, VGA, DisplayPort)

Could you pls. post the output of "lspci -k"?
E.g. if your nVidia is just a 3D accellerator accompanying an embedded (in the CPU) Intel GPU then you probably won't be able to use the nVidia GPU directly. (sorry if this is obvious to you, but it wasn't to me and I spent quite some time until I realized this)

Cheers

EDIT: maybe "uname -a" would be as well useful
Back to top
View user's profile Send private message
angryMethane
n00b
n00b


Joined: 07 Oct 2018
Posts: 8

PostPosted: Fri Apr 26, 2019 11:17 am    Post subject: Reply with quote

When I remove the "Device" section in "/etc/X11/xorg.conf" and then restart sddm, it was still black screen but a movable cursor.
The output of "systemctl status sddm" is:
Code:

Apr 26 19:11:53 localhost.localdomain sddm[5084]: Signal received: SIGTERM
Apr 26 19:11:53 localhost.localdomain systemd[1]: Stopping Simple Desktop Display Manager...
Apr 26 19:11:53 localhost.localdomain sddm[5084]: Greeter stopping...
Apr 26 19:11:53 localhost.localdomain sddm[5084]: Socket server stopping...
Apr 26 19:11:53 localhost.localdomain sddm[5084]: Socket server stopped.
Apr 26 19:11:53 localhost.localdomain sddm[5084]: Display server stopping...
Apr 26 19:11:53 localhost.localdomain sddm[5084]: Display server stopped.
Apr 26 19:11:53 localhost.localdomain sddm[5084]: Running display stop script  "/usr/share/sddm/scripts/Xstop"
Apr 26 19:11:53 localhost.localdomain sddm[5084]: Greeter stopping...
Apr 26 19:11:53 localhost.localdomain sddm[5084]: QProcess: Destroyed while process ("/usr/libexec/sddm-helper") is still running.
Apr 26 19:11:53 localhost.localdomain systemd[1]: sddm.service: Succeeded.
Apr 26 19:11:53 localhost.localdomain systemd[1]: Stopped Simple Desktop Display Manager.
Apr 26 19:11:53 localhost.localdomain systemd[1]: Started Simple Desktop Display Manager.
Apr 26 19:11:53 localhost.localdomain sddm[5720]: Initializing...
Apr 26 19:11:53 localhost.localdomain sddm[5720]: Starting...
Apr 26 19:11:53 localhost.localdomain sddm[5720]: Logind interface found
Apr 26 19:11:53 localhost.localdomain sddm[5720]: Adding new display on vt 1 ...
Apr 26 19:11:53 localhost.localdomain sddm[5720]: Loading theme configuration from ""
Apr 26 19:11:53 localhost.localdomain sddm[5720]: Display server starting...
Apr 26 19:11:53 localhost.localdomain sddm[5720]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{a9153021-d065-41cc-a651-fffcfda41f29} -background none -noreset -displayfd 17 -seat seat0 vt1
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Setting default cursor
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Running display setup script  "/usr/share/sddm/scripts/Xsetup"
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Display server started.
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Socket server starting...
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Socket server started.
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Loading theme configuration from ""
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Greeter starting...
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Adding cookie to "/var/run/sddm/{a9153021-d065-41cc-a651-fffcfda41f29}"
Apr 26 19:11:54 localhost.localdomain sddm-helper[5751]: [PAM] Starting...
Apr 26 19:11:54 localhost.localdomain sddm-helper[5751]: [PAM] Authenticating...
Apr 26 19:11:54 localhost.localdomain sddm-helper[5751]: pam_unix(sddm-greeter:session): session opened for user sddm by (uid=0)
Apr 26 19:11:54 localhost.localdomain sddm-helper[5751]: [PAM] returning.
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Greeter session started successfully
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Message received from greeter: Connect
Apr 26 19:11:54 localhost.localdomain sddm-helper[5751]: [PAM] Closing session
Apr 26 19:11:54 localhost.localdomain sddm-helper[5751]: pam_unix(sddm-greeter:session): session closed for user sddm
Apr 26 19:11:54 localhost.localdomain sddm-helper[5751]: [PAM] Ended.
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Auth: sddm-helper exited with 6
Apr 26 19:11:54 localhost.localdomain sddm[5720]: Greeter stopped.


Xorg.0.log: http://fars.ee/Q7ry
Back to top
View user's profile Send private message
Pearlseattle
Apprentice
Apprentice


Joined: 04 Oct 2007
Posts: 162
Location: Switzerland

PostPosted: Fri Apr 26, 2019 2:52 pm    Post subject: Reply with quote

Code:
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. 4th Gen Core Processor Integrated Graphics Controller
        Kernel driver in use: i915

01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)
        Subsystem: ASUSTeK Computer Inc. GM107M [GeForce GTX 850M]
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia


So, to me things look basically the same as in my case: you cannot use directly/only the nVidia GPU.
You have to set up your packages to use primarily the embedded Intel GPU and then set your system up to switch to nVidia when handling 3D.
Here you can find more informations: https://wiki.archlinux.org/index.php/hybrid_graphics
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Fri Apr 26, 2019 5:59 pm    Post subject: Reply with quote

angryMethane,

Is this a laptop with an Optimus graphics system?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum