Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NVIDIA Optimus - MSI GE72 - X11 - black screen with modeset
View unanswered posts
View posts from last 24 hours

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


Joined: 19 Dec 2016
Posts: 5

PostPosted: Mon Dec 19, 2016 9:57 pm    Post subject: NVIDIA Optimus - MSI GE72 - X11 - black screen with modeset Reply with quote

Hello anyone,
I've got problem with my new laptop MSI GE72 6QD Apache Pro.
No matter how I try, I can't get NVIDIA GeForce GTX 960M to work with modesetting. The only thing I get is a black screen.
The solution with Bumblebee, VirtualGL and PRIMUS is working, but the functionality is not complete, moreover, my ntb encounters random freezes.

Here is my lspci output:
Code:
00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
00:1c.3 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #4 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
02:00.0 Network controller: Intel Corporation Wireless 3165 (rev 81)
03:00.0 Ethernet controller: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller (rev 10)
04:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller


The solution on NVIDIA/Optimus results in black screen after starting X.

I was searching for more solutions, and this is the last xorg.conf I used. I also only got to black screen.
Code:
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
    EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
    Option "AccelMethod" "none"
    EndSection

Section "Screen"
    Identifier "intel"
        Device "intel"
       EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
   
    Option "AllowEmptyInitialConfiguration" "true"
    Option "ModeDebug" "True"
    Option "ConnectedMonitor" "eDP-1-0"
    Option "CustomEDID" "eDP-1-0:/lib64/firmware/edid/LG.bin"
    Option "UseEDID" "True"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    # Uncomment this line if your computer has no display devices connected to
    # the NVIDIA GPU.  Leave it commented if you have display devices
    # connected to the NVIDIA GPU that you would like to use.
    Option "UseDisplayDevice" "none"
    Option "AllowEmptyInitialConfiguration" "true"
    Subsection "Display"
    Depth 24
    Modes "1920x1080_60"
    Option "MetaModes" "1920x1080_60 +0+0"
    Option "DPI" "96x96"
    EndSubSection
EndSection


I also set up xrandr with .xinitrc

Code:

exec xrandr --setprovideroutputsource modesetting NVIDIA-0
exec xrandr --auto]
exec startxfce4


Here is my Xorg.0.log
Here is my dmesg

Here are kernel boot parameters.
Code:
options "ro root=/dev/md0 domdadm add_efi_mmap quiet pci=noaer nvidia_drm.modeset=1 nvidia_modeset.modeset=1 nvidia.modeset=1 intel_agp i915.modeset=1 i915.preliminary_hw_support=1 i915.enable_guc_loading=1"


I would like to ask you for help with this problem.
I'm sorry if I forgot to post something important.

Thank you,
JSSJ
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Dec 21, 2016 7:24 am    Post subject: Reply with quote

Quote:
my ntb encounters random freezes.


Please be more specific.
When does it happens?

Quote:
Subsection "Display"
Depth 24
Modes "1920x1080_60"
Option "MetaModes" "1920x1080_60 +0+0"
Option "DPI" "96x96"
EndSubSection


That's very bad in my eyes. That paragraph is usally not needed. When you want to set it, you should set every possible mode according to the EDID.

When you check your EDID and your xorg.log you will see that devices support many ranges.

You only provided one selectable resolution with the position where to place it in the virtual x-server. This may cause issues.

A bare minimum is usually the best for the x-server in recent years.

--

You may try to use nvidia-settings and try to adapt settings / set things on demands for external output devices.

--

Check output of xrandr.
Check your EDID.

update your bios. recompile your DSDT (Usually it has errors)

Personal opinion. Buy those notebooks which do not use intel gpus in any fashion! They do exists, even today. Even hybrids are bad. You get much worse hdmi standard on the output because the intel gpu is basically crap and only supports 1.2. My very old nvidia gpu supports hdmi 2.0 with 3d on external connector, because the intel gpu in the notebook cpu is not in use and not wired to the LVDS.
--

Quote:
Option "CustomEDID" "eDP-1-0:/lib64/firmware/edid/LG.bin"


Why do you have a need to load a custom EDID? Is the hardware defective?

--

Quote:
options "ro root=/dev/md0 domdadm add_efi_mmap quiet pci=noaer nvidia_drm.modeset=1 nvidia_modeset.modeset=1 nvidia.modeset=1 intel_agp i915.modeset=1 i915.preliminary_hw_support=1 i915.enable_guc_loading=1"


When you want to debug things, start without quiet option, without all those kernel options, without custom EDID and a minimalistic xorg.conf. Those makes things only worse. Use something like openrc + eudev + nvidia-drivers + lxdm to start your x-session.

also check what the gentoo wiki suggests for the hybrid notebook gpus.

--

Disclaimer: Advises / Hints / Personal opinion is stated above!
Back to top
View user's profile Send private message
JSSJ
n00b
n00b


Joined: 19 Dec 2016
Posts: 5

PostPosted: Wed Dec 21, 2016 12:41 pm    Post subject: Reply with quote

My ntb encounters freezes when using bumblebee and bbswitch, it doesn't have nothing in common with modesetting.

I know that minimal, and "clean" solution is the best, but as I posted the simple from Gentoo Wiki doesn't work.

The xorg.conf that I posted is assembled from various solutions I found on the net, as well as the kernel boot options.

I think that subsection you mentioned is only optional, as well as the specification of EDID, but I can't omit any of possible solution in searching of right one. I just want to show what I have already tried.

My old notebook didn't have any of hybrid, optimus solution. NVIDIA was conected directly to output, because of 3D display, so I didn't have to solve such problems, I am facing now.

Thank you for advice with ACPI, I will try to repair it.

I forgot to post xrandr output:

Code:
 DISPLAY=":0" xrandr --setprovideroutputsource modesetting NVIDIA-0

X Error of failed request:  BadValue (integer parameter out of range for operation)
Major opcode of failed request:  139 (RANDR)
Minor opcode of failed request:  35 (RRSetProviderOutputSource)
Value in failed request:  0x1f4
Serial number of failed request:  16
Current serial number in output stream:  17


Code:

DISPLAY=":0" xrandr
 Screen 0: minimum 8 x 8, current 8 x 8, maximum 16384 x 16384
 


Code:

 startx
 xauth:  file /root/.serverauth.4949 does not exist
 
 
 X.Org X Server 1.18.4
 Release Date: 2016-07-19
 X Protocol Version 11, Revision 0
 Build Operating System: Linux 4.9.0-gentoo x86_64 Gentoo
 Current Operating System: Linux gentoo 4.9.0-gentoo #9 SMP PREEMPT Fri Dec 16 20:56:38 Local time zone must be set-- x86_64
 Kernel command line: \kernel-genkernel-x86_64-4.9.0-gentoo ro root=/dev/md0 domdadm add_efi_mmap quiet pci=noaer nvidia_drm.modeset=1 nvidia_modeset.modeset=1 nvidia.modeset=1 intel_agp i915.modeset=1 i915.preliminary_hw_support=1 i915.enable_guc_loading=1 initrd=\initramfs-genkernel-x86_64-4.9.0-gentoo
 Build Date: 17 December 2016  06:33:16PM
 
 Current version of pixman: 0.34.0
         Before reporting problems, check http://wiki.x.org
                 to make sure that you have the latest version.
                 Markers: (--) probed, (**) from config file, (==) default setting,
                         (++) from command line, (!!) notice, (II) informational,
                                 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
                                 (==) Log file: "/var/log/Xorg.0.log", Time: Sat Dec 17 18:51:12 2016
                                 (==) Using config file: "/etc/X11/xorg.conf"
                                 (==) Using config directory: "/etc/X11/xorg.conf.d"
                                 (==) Using system config directory "/usr/share/X11/xorg.conf.d"
                                 X Error of failed request:  BadValue (integer parameter out of range for operation)
                                  Major opcode of failed request:  139 (RANDR)
                                  Minor opcode of failed request:  35 (RRSetProviderOutputSource)
                                  Value in failed request:  0x1f4
                                  Serial number of failed request:  16
                                  Current serial number in output stream:  17
                                           
Back to top
View user's profile Send private message
fhede
n00b
n00b


Joined: 15 Mar 2016
Posts: 43

PostPosted: Wed Dec 21, 2016 5:55 pm    Post subject: Reply with quote

You have in xinitrc exec xrandr --auto] is that a typo ] or is that ok to have.
Never seen that before.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Dec 21, 2016 9:26 pm    Post subject: Reply with quote

Code:
roman@ASUS-G75VW ~ $ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
VGA-0 disconnected primary (normal left inverted right x axis y axis)
LVDS-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080     60.01*+  40.01 
DP-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)


No idea why your xrandr output gives an error. You may start there first.

OFC this is a notebook where the gpu is hardwired to the LVDS (internal display). With an ASUS bios bug. ("Uefi is crap")

a Bit off topic: msi Gamer notebook with 950m Gpu with 2 or 4gb vram. and intel gpu. does not work even in windows 10 flawless regarding gpu switching and gpu acceleration. It is more a design flaw of those notebooks. Does not work flawless with uplay windows, windows steam, xbox windows game platform and forza game. I would not expect a flawless "responsive" desctop in linux when the "newest" recent hardware with gamer notebook with decent hardware does not work in "windows 10".

--

Asus gamer rog notebook with uefi and several bugs in the BIOS, broken DSDT, broken special keys, hardwired nvidia gpu to lvds

Code:
ASUS-G75VW roman # cat /etc/X11/xorg.conf.d/20opengl.conf
Section "Files"
   ModulePath "/usr/lib32/xorg/modules"
   ModulePath "/usr/lib64/opengl/nvidia"
   ModulePath "/usr/lib64/xorg/modules"
EndSection
ASUS-G75VW roman # cat /etc/X11/xorg.conf.d/nvidia.conf
Section "Device"
         Identifier  "nvidia"
         Driver      "nvidia"
         Option "Coolbits" "28"
         Option "NoLogo" "True"
EndSection

# This is a trailing line, it is needed so that End Section is not the last line


Minimalistic files which are needed wiht binary drivers from nvidia + self made kernel.

Hints:
You may adapt above + add section for the intel gpu.
You may build your own kernel, because genkernel may has issues, wrong kernel settings. Genkernel may be a source for your issues.

You may try linx mint and check if the hardware works there flawless. If so duplicate those settings. Could be a faster way when it works.
Back to top
View user's profile Send private message
JSSJ
n00b
n00b


Joined: 19 Dec 2016
Posts: 5

PostPosted: Fri Dec 23, 2016 1:47 pm    Post subject: Reply with quote

So finally, I found where the problem is.
It must be the xrandr or software bug (or in configs somewhere else), because I managed to start modeset X on debian (only on testing).
The basic configuration is just enough to start X server there.

(And yes, there is a typo in .xinitrc, but only here)

I have kernel configured by myself.

I found, that ACPI tables are corrupted, there were several errors and hundereds of warnings, which I can't simply repair. One table even refuse to load, but it isn't the cause of the problem.

I don't know why NVIDIA just can't add an powersave option to the graphic card :D. Now there is only performance and auto, which is on the highest clock level nearly every time. I think that it would be enough, but maybe to "simplify" :D the devices they came up with Optimus.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sun Dec 25, 2016 6:12 pm    Post subject: Reply with quote

a bit off topic.

Quote:
One table even refuse to load, but it isn't the cause of the problem.


It is

on my asus g75vw, with several bugs in acpi / DSDT (basically the same stuff), it caused missing hotkeys and other features (bug).

you can start clean up a bit, but other stuff are just hacks to get it working

and patience. i reported bugs.kernel.org. helped discussed, tried myself, so 80 percent i fixed myself and reported back. took 3/4 year to get it fixed. i own that hardware around 15 months by now i suppose.

so i recommned => bugs.kernel.org
provide what they need
read lots of bug reports and get it fixed yourself or try to help
so others will have a working linux


the bios / uefi stuff is a third party firmware, so when it gets fixed on your hardware, it helps other notebooks and hardware with linux too. not only your platform (specific notebook).

Please make a bug.report so kernel developers may fix it
Back to top
View user's profile Send private message
JSSJ
n00b
n00b


Joined: 19 Dec 2016
Posts: 5

PostPosted: Mon Dec 26, 2016 4:44 pm    Post subject: ~solved Reply with quote

Hello.
The solution was pretty easy at the end. The clean installation of gentoo.
I don't know where the problem was, but maybe later I can face the problem once again, while configuring the other things.

Thank you very much for advice and help.
Back to top
View user's profile Send private message
timofonic
n00b
n00b


Joined: 13 Sep 2005
Posts: 16

PostPosted: Thu Jan 12, 2017 10:54 am    Post subject: Re: ~solved Reply with quote

JSSJ wrote:
Hello.
The solution was pretty easy at the end. The clean installation of gentoo.
I don't know where the problem was, but maybe later I can face the problem once again, while configuring the other things.

Thank you very much for advice and help.


Hello.

Are you using the same Xorg.conf? I have issues configuring Xorg with Optimus under a MSI GE62-2QD Apache Pro (Intel Core i7 2.7GHz + NVidia GTX960M).

I used your xorg.conf and have the same black screen issue.
I commented the EDID part because I cant extract the EDID of my monitor. How did you do it?

We have somewhat similar hardware, maybe it can work here.

Kind regards.
Back to top
View user's profile Send private message
JSSJ
n00b
n00b


Joined: 19 Dec 2016
Posts: 5

PostPosted: Fri Jan 13, 2017 6:46 pm    Post subject: Reply with quote

Hello, now I'm using this xorg.conf.

Code:
Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    # Uncomment this line if your computer has no display devices connected to
    # the NVIDIA GPU.  Leave it commented if you have display devices
    # connected to the NVIDIA GPU that you would like to use.
    Option "UseDisplayDevice" "none"
    Option "AllowEmptyInitialConfiguration" "true"
    Subsection "Display"
    Depth 24
    Modes "1920x1080_60"
    Option "MetaModes" "1920x1080_60 +0+0"
    Option "DPI" "96x96"
    EndSubSection
EndSection


And this .xinitrc in my home dir.

Code:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
exec startkde


Currenty I don't use any display manager so I start KDE with startx. Maybe your problem is the same, there in the xrandr. Try other distro to check it out, I recommend debian testing for ~x86.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Jan 21, 2017 3:31 pm    Post subject: Re: ~solved Reply with quote

timofonic wrote:
I have issues configuring Xorg with Optimus


Have you checked gentoo wiki articles about optimius / bumblebee(I think that was the other component).

read_edid (or readedid whats the command is) xrandr also puts out EDID usually
Windows software components too. binary live-cd should work also
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