Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Black screen, nvidia optimus, nvidia-drivers-361.28
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fhede
n00b
n00b


Joined: 15 Mar 2016
Posts: 43

PostPosted: Sat Mar 19, 2016 5:59 am    Post subject: Reply with quote

xerofzos wrote:
With downgraded packages, this works for me:

cat /etc/X11/xinit/xinitrc.d/00-nvidia-optimus.sh
Code:

#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


cat /usr/share/gdm/greeter/autostart/display_setup.desktop
Code:

[Desktop Entry]
Type=Application
Name=Display setup
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-AutoRestart=true


cat /etc/xorg/xorg.conf
Code:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    # Change BusID if necessary. Tips: (lspci | grep 3D) (Change 01:00.0 to 1:0:0)
    BusID "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "Yes"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    # Change BusID if necessary. Tips: (lspci | grep VGA) (Change 00:02.0 to 0:2:0)
    BusID "PCI:0:2:0"
    Option "AccelMethod"  "none"
EndSection

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


Can you share what you downgraded and to what thanks.
Back to top
View user's profile Send private message
xerofzos
n00b
n00b


Joined: 10 Feb 2016
Posts: 6

PostPosted: Sun Mar 20, 2016 1:01 am    Post subject: Reply with quote

I have same masks as in 3rd comment.
Back to top
View user's profile Send private message
fhede
n00b
n00b


Joined: 15 Mar 2016
Posts: 43

PostPosted: Sun Mar 20, 2016 3:59 pm    Post subject: Reply with quote

xerofzos wrote:
I have same masks as in 3rd comment.


Ok thanks. I still not get this to work. But i removed intel from make.conf and added i965 instead.
After that i got bumblebee to start. Not what i want. But i have a desktop anyway.
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Sun Mar 27, 2016 6:46 am    Post subject: Reply with quote

After last days drivers update (both intel & nvidia) I have such error on the screen after typing 'startx' from the console:
Quote:
xrandr: Configure crtc 2 failed
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: 21 (RRSetCrtcConfig)
Value in failed request: 0x0
Serial number of failed request: 45
Current serial number in output stream: 45
xinit: connection to X server lost



p.s. Do you remember when x11-drivers/xf86-video-modesetting was no longer necessary as it of part of probably xorg-server now?

p.s.2 fhede, downgrade with your settings did not help. I cannot start X either.

BTW - I cannot start pure X (without KDE) in any configuration now, I was trying with new xorg ald downgraded one, with eselect opengl nvidia, and eselect opengl xorg-x11. Just after typing 'startx' from console, looks like X starts and after 1/10 of sec I am back into text console. No error in logs (so whats wrong?):
http://pastebin.com/p3Y6EfDw


The only sollution for myself is to reinstall Gentoo, and if doesn't work, I will try another distro to see, if this bug is Gentoo related.
Back to top
View user's profile Send private message
Barbieken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2014
Posts: 82

PostPosted: Tue Mar 29, 2016 9:55 am    Post subject: Reply with quote

Have the same problems with xorg-server-1.18.2 and nvidia-drivers-364.12-r1. Blackscreen without blinking cursor instead of sddm login screen. "[ 8.398] (WW) NVIDIA(0): Unable to get display device for DPI computation." in the Xorg.0.log

It used to work with 1.18.1 (or .0, i don't remember) and one of older version of nvidia-drivers though.

If I remove nvidia.conf and change opengl to xorg-x11 I'm able to login to plasma and everything works without problems. But with nvidia/opengl only blackscreen istead of login screen.

nvidia.conf
Code:

Section "ServerLayout"
    Identifier "layout"
    Screen 1 "nvidia"
    Inactive "intel"
    Option "Xinerama" "0"
EndSection


Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "RegistryDwords" "EnableBrightnessControl=1"
    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"
EndSection

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

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Tue Mar 29, 2016 11:37 am    Post subject: Reply with quote

Barbieken wrote:
Have the same problems with xorg-server-1.18.2 and nvidia-drivers-364.12-r1. Blackscreen without blinking cursor instead of sddm login screen. "[ 8.398] (WW) NVIDIA(0): Unable to get display device for DPI computation." in the Xorg.0.log


The point is, in my case now, I have no errors in Xorg.0.log. I was trying all the servers 1.17.4, 1.18.0, 1.18.1, 1.18.2 - and all the same. I am trying to downgrade to 1.16.4-r5 now. Will let you know soon.
Back to top
View user's profile Send private message
Barbieken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2014
Posts: 82

PostPosted: Tue Mar 29, 2016 12:21 pm    Post subject: Reply with quote

Xywa wrote:
Barbieken wrote:
Have the same problems with xorg-server-1.18.2 and nvidia-drivers-364.12-r1. Blackscreen without blinking cursor instead of sddm login screen. "[ 8.398] (WW) NVIDIA(0): Unable to get display device for DPI computation." in the Xorg.0.log


The point is, in my case now, I have no errors in Xorg.0.log. I was trying all the servers 1.17.4, 1.18.0, 1.18.1, 1.18.2 - and all the same. I am trying to downgrade to 1.16.4-r5 now. Will let you know soon.


It's not an error though (EE). It's warning (WW)

Also just got a thought about xinerama. A while ago I disabled the xinerama flag globally because there was a bug in one of recent versions of xorg-server, which resulted in multiple problems with menus. So the new problem could be related to bugfix of this old problem, as as fas as i remember it is related to xinerama. I'll try to enable xinerama and rebuild the world later.
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Tue Mar 29, 2016 11:03 pm    Post subject: Reply with quote

I did rebuild system without xinerama, did not help.
I will try to rebuild all the system to see if it help.
Back to top
View user's profile Send private message
Barbieken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2014
Posts: 82

PostPosted: Wed Mar 30, 2016 8:45 am    Post subject: Reply with quote

Full rebuild with or without xinerama didn't work for me as well

NVIDIA relevant log data:
Code:

[     8.187] (II) Module glx: vendor="NVIDIA Corporation"
[     8.187] (II) NVIDIA GLX Module  364.12  Wed Mar 16 20:39:46 PDT 2016
[     8.195] (II) Module nvidia: vendor="NVIDIA Corporation"
[     8.197] (II) NVIDIA dlloader X Driver  364.12  Wed Mar 16 20:16:45 PDT 2016
[     8.197] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[     8.210] (II) NVIDIA(0): Creating default Display subsection in Screen section
[     8.210] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[     8.210] (==) NVIDIA(0): RGB weight 888
[     8.210] (==) NVIDIA(0): Default visual is TrueColor
[     8.210] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[     8.211] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration"
[     8.211] (**) NVIDIA(0): Option "RegistryDwords" "EnableBrightnessControl=1"
[     8.211] (**) NVIDIA(0): Enabling 2D acceleration
[     8.398] (II) NVIDIA(0): NVIDIA GPU GeForce GT 730M (GK208) at PCI:1:0:0 (GPU-0)
[     8.398] (--) NVIDIA(0): Memory: 1048576 kBytes
[     8.398] (--) NVIDIA(0): VideoBIOS: 80.28.2a.00.30
[     8.398] (II) NVIDIA(0): Detected PCI Express Link width: 8X
[     8.398] (II) NVIDIA(0): Validated MetaModes:
[     8.398] (II) NVIDIA(0):     "NULL"
[     8.398] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[     8.398] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[     8.398] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[     9.030] (II) NVIDIA: Using 3072.00 MB of virtual memory for indirect memory
[     9.031] (II) NVIDIA:     access.
[     9.055] (II) NVIDIA(0): Setting mode "NULL"
[     9.062] (==) NVIDIA(0): Disabling shared memory pixmaps
[     9.062] (==) NVIDIA(0): Backing store enabled
[     9.062] (==) NVIDIA(0): Silken mouse enabled
[     9.062] (==) NVIDIA(0): DPMS enabled
[     9.063] (II) NVIDIA(0): [DRI2] Setup complete
[     9.063] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
Back to top
View user's profile Send private message
Barbieken
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2014
Posts: 82

PostPosted: Wed Mar 30, 2016 10:24 am    Post subject: Reply with quote

All right I made nvidia+opengl work at last. GeForce 730M, Thinkpad T540p laptop.

x11-base/xorg-server-1.18.2
x11-drivers/nvidia-drivers-358.16-r5 #downgrade
x11-misc/sddm-0.13.0-r3
sys-kernel/gentoo-sources-4.4.1


nvidia.conf
Code:

Section "ServerLayout"
    Identifier "layout"
    Screen 1 "nvidia"
    Inactive "intel"
    Option "Xinerama" "0"
EndSection


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


Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

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

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


/usr/share/sddm/scripts/Xsetup
Code:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xrandr --dpi 144


xinerama flag off in the make.conf
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Wed Mar 30, 2016 10:47 am    Post subject: Reply with quote

Great news! I will try this config, but at the moment I am in the middle of rebuilding all the system. 744 out of 1274 files so far 8) 8) 8)
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Fri Apr 01, 2016 6:34 pm    Post subject: Reply with quote

Barbieken wrote:
x11-base/xorg-server-1.18.2
x11-drivers/nvidia-drivers-358.16-r5 #downgrade
x11-misc/sddm-0.13.0-r3
sys-kernel/gentoo-sources-4.4.1


Did not work either :(
No answer on xorg buglist either :(

I need ASAP Nvidia to do my job :( , could someone recommend me a distro with a fresh kde which works currently with nvidia Optimus? Kubutnu or Open Suse?
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Sat Apr 02, 2016 2:15 pm    Post subject: Reply with quote

Right, I wrote on Nvidia forum, maybe they will help.

But I would like to check something.

Nvidia says: A Linux kernel with CONFIG_DRM enabled and the appropriate driver interfaces present
http://us.download.nvidia.com/XFree86/Linux-x86_64/361.28/README/randr14.html

Where should I find those drm_gem_prime_export, drm_gem_prime_import... ?

Quote:
System Requirements

X.Org X server version 1.13 or higher.

A Linux kernel with CONFIG_DRM enabled and the appropriate driver interfaces present:

drm_gem_prime_export

drm_gem_prime_import

gem_prime_pin

gem_prime_get_sg_table

gem_prime_import_sg_table

gem_prime_vmap

gem_prime_vunmap

Version 1.4.0 of the xrandr command-line utility.
Back to top
View user's profile Send private message
fhede
n00b
n00b


Joined: 15 Mar 2016
Posts: 43

PostPosted: Sun Apr 03, 2016 11:33 am    Post subject: Reply with quote

I finally got it working.

I have the latest programs.

x11-base/xorg-server-1.18.2
x11-drivers/nvidia-drivers-364.12-r1
x11-misc/lightdm-lightdm-1.17.5
sys-kernel/gentoo-sources-4.5.0

I recompiled intel with uxa after i read this thread ( thanks for the tip Xywa) [url] https://forums.gentoo.org/viewtopic-t-1042216.html

I create two xorg.conf-files one for intel and one for nvidia and they look like this.

xorg.conf.intel

Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
Option "TearFree" "true"
EndSection

-------------------------------------------------------
xorg.conf.nvidia

/etc/X11/xorg.conf
Section "Module"
Load "modesetting"
EndSection

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

And i eselect opengl set xorg-x11.

I also have in grub.
GRUB_CMDLINE_LINUX="root=/dev/sda3 quiet nvidia_drm modeset=1"

glxgears show 60.425 FPS

[IMG]http://i1018.photobucket.com/albums/af301/fredda_01/optimus-gentoo/2016-04-03%2013.02.44.jpg[/IMG][/code][/url]
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Sun Apr 03, 2016 11:44 am    Post subject: Reply with quote

Quote:
I recompiled intel with uxa

Do you have uxa only for intel or globally?

Quote:
I create two xorg.conf-files one for intel and one for nvidia and they look like this.

Do I need 2 config files like you or can I put everything into xorg.conf?
Back to top
View user's profile Send private message
fhede
n00b
n00b


Joined: 15 Mar 2016
Posts: 43

PostPosted: Sun Apr 03, 2016 11:49 am    Post subject: Reply with quote

Xywa wrote:
Quote:
I recompiled intel with uxa

Do you have uxa only for intel or globally?

Quote:
I create two xorg.conf-files one for intel and one for nvidia and they look like this.

Do I need 2 config files like you or can I put everything into xorg.conf?


You can try one, that should work. But i have had so much trouble with this now and tried everything so i tested with two xorg.configs from this guide.

https://fitzcarraldoblog.wordpress.com/2015/07/01/switching-between-intel-and-nvidia-graphics-processors-on-a-laptop-with-nvidia-optimus-hardware-running-gentoo-linux/


I did like this in package.use

x11-drivers/xf86-video-intel uxa dri
Back to top
View user's profile Send private message
alexanius
n00b
n00b


Joined: 29 Jan 2017
Posts: 3
Location: Russian Federation

PostPosted: Sun Jan 29, 2017 3:23 pm    Post subject: Reply with quote

Hello. Same issue here.

xorg.conf
xorg.log
dmesg
.config
lspci
grub.cfg


After xorg starts I see only black screen with back lighting. I tried different configurations but still can't get what's wrong.

I'm confused with lines

Code:
[   29.780176] vgaarb: this pci device is not a vga device


from dmesg but Xorg.log shows no errors.

Can someone help, please?
Back to top
View user's profile Send private message
rhoyerboat
n00b
n00b


Joined: 03 Sep 2011
Posts: 5

PostPosted: Sat Feb 11, 2017 5:12 pm    Post subject: such glamorous darkness Reply with quote

FINALLY got my optimus working again for the first time since -- sheesh I can't even remember, same story, worked, upgrade, broke.

I had the black-no-blacklit screen problem, accompanied by the no space left on device problem with the /etc/X11/xorg.conf.d/20-nvidia.conf file from the Gentoo Optimus Wiki page.
Setting xrandr --listproviders > xrandrproviders and xrandr --listmonitors > xrandrmonitors in ~/.xinitrc would reveal both providers and 0 monitors.


(credit where do, big thanks go out to the guys on tis list) ... From this list post: https://bugs.freedesktop.org/show_bug.cgi?id=94577

Enabling te glamor USE flag in make.conf and doing an emerge --deep --newuse @world did the trick! Finally hybrid graphics again yaay I would be happier If I had slept better since I decided to work on this old problem of mine again ;)

TURNS OUT IT WAS IN THE WIKI HOLY COW - that light blue note was just completely invisible to me for some reason. There go a few days of my life for no good reason. Lol

My versions:
Code:
X.Org X Server 1.18.4 
Release Date: 2016-07-19


Code:

[  2584.317] (II) NVIDIA dlloader X Driver  375.26  Thu Dec  8 17:37:15 PST 2016


Code:

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [Quadro NVS 4200M] (rev a1)
Back to top
View user's profile Send private message
alexanius
n00b
n00b


Joined: 29 Jan 2017
Posts: 3
Location: Russian Federation

PostPosted: Sat Feb 25, 2017 12:40 am    Post subject: Reply with quote

Tried to enable glamor. Still get the black screen, but found some interesting things.

First. If I make startx from user, it starts! But xrandr says I have only two possible resolutions (640x480 by default):
Code:
640x480
320x240


I have the following in my .xinitrc:
Code:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xrandr --dpi 96
startkde


Second. If I strart xdm, I have blackscreen but in my log I get the following EE:
Code:
[  3835.729] (EE) modeset(G0): eglGetDisplay() failed
[  3835.729] (EE) modeset(G0): glamor initialization failed


I have the following lines in my /usr/share/sddm/scripts/Xsetup:

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


I tried to play with different values of
Code:
    Option         "AccelMethod" "none"

but that had no effets.

It seems I have some progress but I still can't get how to make it.
Back to top
View user's profile Send private message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Fri Jun 16, 2017 7:59 pm    Post subject: Reply with quote

I had the same issue, but for another reason.

In my case, I used a display manager with an Xsetup config file not under /etc (but under /usr). The display manager's update caused the (previously working) Xsetup file to be silently removed, which caused the xrandr commands not to be executed anymore. The result was the described black screen at login and the
Code:
eglGetDisplay() failed
glamor initialization failed

errors.

As a lesson, I'll now config-protect these Xsetup files. I also added a short note in the wiki.
Back to top
View user's profile Send private message
mbar
Veteran
Veteran


Joined: 19 Jan 2005
Posts: 1990
Location: Poland

PostPosted: Mon Jun 26, 2017 12:53 pm    Post subject: Reply with quote

Also enabling aggresive PCIe power management on Optimus systems can result in blank screen even if the rest of the configuration (xorg.conf, gdm/xdg autostarts) are OK.
"pcie_port_pm=off" kernel parameter can help.
Back to top
View user's profile Send private message
firasuke
n00b
n00b


Joined: 19 Sep 2016
Posts: 26
Location: Aleppo, Syria

PostPosted: Wed Aug 16, 2017 8:18 pm    Post subject: Try the instructions in the following article Reply with quote

I've written an article on how to configure bumblebee on gentoo linux on my website and I'm constantly updating it (hopefully will add it to the gentoo wiki once I confirm it's 100% working), you may want to check it out:

https://www.dotslashlinux.com/2017/06/04/setting-up-bumblebee-on-gentoo-linux/

A couple of users have found it helpful, give it a shot and tell me what went wrong :P

Good Luck
_________________
DOTSLASHLINUX is a GNU/Linux enthusiasts' hub, featuring configuration guides for the linux kernel and several software.
Back to top
View user's profile Send private message
alexanius
n00b
n00b


Joined: 29 Jan 2017
Posts: 3
Location: Russian Federation

PostPosted: Mon Sep 25, 2017 12:06 am    Post subject: Reply with quote

CPUFan wrote:
As a lesson, I'll now config-protect these Xsetup files. I also added a short note in the wiki.


Wonderful! Thanks! After I've configured Xorg and it worked for some time I decided to update the system and got black screen again. And it was exactly this issue. Now it works again. Also I think it may be helpful for someone if I post my working Xorg.conf here.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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