You are not logged in.

#1 2015-12-06 11:27:28

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Xorg black screen with nvidia optimus

I just bought msi gs40 6qe. This laptop has skylake core i7 6700hq (which means integrated graphic HD 530) and discrete GTX 970. I'm struggling to start xorg. I wanna setup nvidia  driver with modesetting as it's written on wiki  Here's my xorg.conf As far as I understand modesetting should be provided by nvidia driver, but it's not there. Here're my xorg.log and dmesg

$lsmod |grep modesetting
#nothing
$pacman -Qs nvidia
libvdpau
nvidia
nvidia-libgl
nvidia-utils

What package should I install to get modesetting ?

I also tried intel driver but xorg can't find screens or it just writes "Waiting for connections" to output without even creating xorg.log.
I also tried nouveau with intel but it can't find screens too.
p.s. I'm running the latest archlinux with 4.2.5-1 custom kernel with this patch and no kernel params

Last edited by deathangle908 (2015-12-15 08:15:41)

Offline

#2 2015-12-06 17:54:56

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Xorg black screen with nvidia optimus

[   292.977] (II) LoadModule: "modesetting"
[   292.977] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   292.977] (II) Module modesetting: vendor="X.Org Foundation"

Modesetting is an X11 module ( provided by the xorg-server package ) not a kernel module and the xorg.log shows it loading

Offline

#3 2015-12-06 18:34:55

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

loqs wrote:

Modesetting is an X11 module ( provided by the xorg-server package ) not a kernel module and the xorg.log shows it loading

Hm, right, but xorg exits right after start with "Server terminated successfully" I expected xterm to start, shouldn't it? If I start sddm it just hangs out with black screen.

Last edited by deathangle908 (2015-12-06 18:48:13)

Offline

#4 2015-12-06 19:17:14

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Xorg black screen with nvidia optimus

deathangle908 wrote:

Hm, right, but xorg exits right after start with "Server terminated successfully" I expected xterm to start, shouldn't it? If I start sddm it just hangs out with black screen.

How are you starting X when you expect the xterm to appear?

"Server terminated successfully"

Was not in the xorg.log you linked was the log truncated or was this in a different instance of xorg.log?

Offline

#5 2015-12-08 15:30:45

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

Finally make it work with intel drivers. Nvidia is still in blackscreen with desktop manager and quits right after start with startx

loqs wrote:

How are you starting X when you expect the xterm to appear?

startx

I expect something to show because there's a default /etc/X11/xinit/xinitrc that should draw xclock and xterm.

loqs wrote:

Was not in the xorg.log you linked was the log truncated or was this in a different instance of xorg.log?

It's printed to syserr (to tty)

I just got confused "modesetting" is in xorg logs indeed.

When I strart laptop and type "startx" for the first 2 times it exist and tells me that there's no provider with name modesetting. On 3rd time and other it doesn't show it. However xinit show everytime that there's no provider with name modesetting. As far as I understand modesetting is fine. It's another thing, I just don't know where to start. no errors in xorg, no errors in dmesg... I couldn't imagine that optimus is so hard to setup when I was told not to by nvidia laptop for linux.

Last edited by deathangle908 (2015-12-08 15:32:15)

Offline

#6 2015-12-08 16:02:34

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Xorg black screen with nvidia optimus

deathangle908 wrote:

When I strart laptop and type "startx" for the first 2 times it exist and tells me that there's no provider with name modesetting. On 3rd time and other it doesn't show it. However xinit show everytime that there's no provider with name modesetting. As far as I understand modesetting is fine. It's another thing, I just don't know where to start. no errors in xorg, no errors in dmesg... I couldn't imagine that optimus is so hard to setup when I was told not to by nvidia laptop for linux.

Can you please post the console output from one of the failing runs of startx?
Also is anything being logged to ~/.xsession-errors?
Are xorg-twm,  xorg-xclock and xterm installed?

Offline

#7 2015-12-08 17:56:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Xorg black screen with nvidia optimus

That error probably comes from an xrandr command like "xrandr --setprovideroutputsource modesetting" .

sometimes using names in those commands fails,and you need to use the numeric id instead.
when you got X started succesfully, run "xrandr --listproviders" to find out the id, then replace modesetting with the correct id and try if that solves the problem.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2015-12-08 22:18:30

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

Lone_Wolf wrote:

then replace modesetting with the correct id and try if that solves the problem.

  • Well, starting X first and then setting provider from another tty changed everything. Now Screen goes totally black(no backlight), until I set provider from tty2, btw replacing it with ids listproviders has no affect  Here're tty output and xorg.log At least I got something....

  • Here's xorg.log If i set modprovider in ~/.xinitrc and startx. Xorgs terminates with 0 right after start

  • Here's xorg.log with sddm and modeset in sddm/Xsetup - Scren goes black without backlight

Offline

#9 2015-12-08 22:22:06

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

Hm, xinit doesn't tell anything about missing modesetting provider now, I have no idea what is changed....

loqs wrote:

Also is anything being logged to ~/.xsession-errors?

Nope, there's no such file ;(

loqs wrote:

Are xorg-twm,  xorg-xclock and xterm installed?

Yep

loqs wrote:

Can you please post the console output from one of the failing runs of startx?

Please checkout the response I've written above.

Last edited by deathangle908 (2015-12-08 22:25:08)

Offline

#10 2015-12-24 08:57:43

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

bump

Offline

#11 2015-12-24 11:39:23

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,846
Website

Re: Xorg black screen with nvidia optimus

deathangle908 wrote:

bump

Please don't do that.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#12 2016-01-01 14:25:15

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

There're mine configurations with the last archwiki update :

  • xorg.conf

  • As far as I understood modesetting is automatically loaded so I don't event need to put anything in  ~/.xinitrc

  • I got xorg.log

  • And dmesg

Still getting the black screen without backlight with this configuration. Maybe this could be related with:

[  194.091495] [drm:intel_dp_aux_ch [i915]] *ERROR* dp_aux_ch not done status 0xad40001f
[  194.771817] vgaarb: this pci device is not a vga device
[  204.176613] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to enable link training
[  204.816511] [drm:intel_dp_complete_link_train [i915]] *ERROR* failed to start channel equalization

Offline

#13 2016-01-04 13:22:36

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Xorg black screen with nvidia optimus

Do those messages appear before or after X is started ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2016-01-04 20:43:11

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

Lone_Wolf wrote:

Do those messages appear before or after X is started ?

After I type startx

Offline

#15 2016-01-05 13:29:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Xorg black screen with nvidia optimus

Did you add the xrandr commands to ~/.xinitrc as described in the wiki ?

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

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#16 2016-01-05 21:43:11

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

Lone_Wolf wrote:

Did you add the xrandr commands to ~/.xinitrc as described in the wiki ?

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

Sure, I tried:

  • to start xorg and then set provider from another tty

  • put lines to ~/.xinitrc and start xorg

  • inject lines to sddm/gdm conf or another dm according wiki and run dm

Every attempt just ends up with blackscreen.

Offline

#17 2016-01-06 03:33:45

rampop
Member
Registered: 2015-10-19
Posts: 3

Re: Xorg black screen with nvidia optimus

I've had the same issue since xorg-server 1.18 was released. I had to downgrade to 1.17 and IgnorePkg it as no suggestions yet have resulted in anything but a black screen.

Offline

#18 2016-01-07 20:24:25

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Xorg black screen with nvidia optimus

Is it this: https://bugs.archlinux.org/task/47151

This one is biting me. I had to go back to not using the nVidia card as the only card. I hate Optimus if the machine doesn't have the choice to shut off the Intel card.


Matt

"It is very difficult to educate the educated."

Offline

#19 2016-01-26 09:42:17

deathangle908
Member
From: Ukraine
Registered: 2013-10-16
Posts: 52
Website

Re: Xorg black screen with nvidia optimus

rampop wrote:

I had to downgrade to 1.17

So do I. But it didn't help,

Offline

#20 2016-01-28 17:35:13

tancrackers
Member
From: USA
Registered: 2012-04-11
Posts: 44

Re: Xorg black screen with nvidia optimus

Have you tried linux-lts with the paremeter:

i915.preliminary_hw_support=1

Also, linux-mainline helped me before, on kernel 4.4rc8
The new linux-mainline 4.5rc1 reinstroduced my problems, however.

NOTE: Linux-lts and skylake struggle with Plasma 5. Try another DE if you're a KDE user

Last edited by tancrackers (2016-01-28 17:35:43)


Block ads forever! http://adblockplus.org/en/

Offline

#21 2016-06-13 21:45:08

matthew_TKA
Member
From: Texas
Registered: 2016-06-02
Posts: 34
Website

Re: Xorg black screen with nvidia optimus

EDIT: Note that I am now able to use bbswitch in combination with the blacklist to allow dynamic switch of GPU.   More info on the forum post I link below.


I have the same laptop as the OP and was able to get two different configurations to MOSTLY work.

I first tried using Bumblebee following the wiki's guidelines.  I eventually found that installing bbswitch would break the system and cause X to hang on boot.

This was an ok solution BUT it would keep the discrete GPU on and waste loads of power.


I next tried to experiment with a bunch of different setups.  In the end I found that following the advice of the PRIME wiki page and Intel Graphics pages allowed me to (in a hacky way) disable the GPU when desired.  I have more info on this setup here.

I am still on the lookout for a better solution as this still has its problems.  (currently if I disable the GPU after X loads I can't shutdown gracefully.)

If someone comes up with a better approach for this system I would love to know more.

BTW.  I haven't tried it yet but apparently there is a new BIOS update for the system.  You can find it on the MSI website.

Last edited by matthew_TKA (2016-06-13 22:23:22)


MSI GS40 6QE PHANTOM
Website

Offline

Board footer

Powered by FluxBB