Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] no screens found and no opengl for eselect
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
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Wed Apr 15, 2020 12:52 pm    Post subject: [SOLVED] no screens found and no opengl for eselect Reply with quote

Hi
I have a hp pavilion with a nvidia GeForce GTX 1050.

I set the kernel options according to the gentoo handbooks for X and nvidia, repsectively.

My make.conf contains (amongst others) the USE entries 'X', 'opengl', 'nvidia' ,'glut'

I built the kernel, rebooted, and did
Code:
emerge --ask  --verbose x11-base/xorg-drivers x11-drivers/nvidia-drivers

This went through without errors.

I called 'nvidia-xconfig' to create an xorg.conf.

However, startx failed:
Code:
 ~ # startx


X.Org X Server 1.20.7
X Protocol Version 11, Revision 0
Build Operating System: Linux 5.4.28-gentoo-x86_64 x86_64 Gentoo
Current Operating System: Linux quetzal 5.4.28-gentoo-x86_64 #1 SMP Wed Apr 15 11:10:32 CEST 2020 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.28-gentoo-x86_64 root=UUID=a5023d91-b10e-411a-963e-1a4728447fc3 ro
Build Date: 13 April 2020  04:24:53PM

Current version of pixman: 0.38.4
        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: Wed Apr 15 11:37:24 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

In '/var/log/Xorg.0.log' i found this line:
Code:
[  1928.051] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)
Could this be the reason for startx's failure?


I then tried 'eselect opengl list', but eselect claims not to have this:
Code:
 ~ # eselect opengl list
!!! Error: Can't load module opengl
exiting


The nvidia module seems to be loaded:
Code:
 ~ # lsmod | grep nvidia
nvidia_drm             49152  0
nvidia_modeset       1085440  1 nvidia_drm
nvidia              20013056  1 nvidia_modeset
drm_kms_helper        217088  2 nvidia_drm,i915
drm                   552960  4 drm_kms_helper,nvidia_drm,i915
i2c_core               94208  10 i2c_designware_platform,videodev,i2c_hid,i2c_designware_core,drm_kms_helper,i2c_algo_bit,nvidia,i2c_i801,i915,drm


What do i need to do to put his in order?


Last edited by jody on Thu Apr 23, 2020 7:00 am; edited 1 time in total
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Wed Apr 15, 2020 2:16 pm    Post subject: Re: no screens found and no opengl for eselect Reply with quote

jody wrote:
In '/var/log/Xorg.0.log' i found this line:
Code:
[  1928.051] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)
Could this be the reason for startx's failure?

Is dbus running on your system? Did you enable the dbus USE flag?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Wed Apr 15, 2020 2:19 pm    Post subject: Re: no screens found and no opengl for eselect Reply with quote

jody wrote:
I then tried 'eselect opengl list', but eselect claims not to have this:
Code:
 ~ # eselect opengl list
!!! Error: Can't load module opengl
exiting

This is correct if you enabled,and by default is enabled, libglvnd use flag.
Now is through media-libs/libglvnd that you can change opngl context.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Wed Apr 15, 2020 4:13 pm    Post subject: Re: no screens found and no opengl for eselect Reply with quote

jody wrote:
Hi
I have a hp pavilion with a nvidia GeForce GTX 1050.

I set the kernel options according to the gentoo handbooks for X and nvidia, repsectively.

My make.conf contains (amongst others) the USE entries 'X', 'opengl', 'nvidia' ,'glut'


Have you only set nvidia to the USE or both USE and VIDEO_CARDS?. you have to set :

Code:


VIDEO_CARDS=" nvidia"


in make.conf to otherwise :

jody wrote:

I built the kernel, rebooted, and did
Code:
emerge --ask  --verbose x11-base/xorg-drivers x11-drivers/nvidia-drivers

This went through without errors.


x11-base/xorg-drivers wont have the enrty.

jody wrote:

I called 'nvidia-xconfig' to create an xorg.conf.

However, startx failed:
Code:
 ~ # startx


X.Org X Server 1.20.7
X Protocol Version 11, Revision 0
Build Operating System: Linux 5.4.28-gentoo-x86_64 x86_64 Gentoo
Current Operating System: Linux quetzal 5.4.28-gentoo-x86_64 #1 SMP Wed Apr 15 11:10:32 CEST 2020 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.28-gentoo-x86_64 root=UUID=a5023d91-b10e-411a-963e-1a4728447fc3 ro
Build Date: 13 April 2020  04:24:53PM

Current version of pixman: 0.38.4
        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: Wed Apr 15 11:37:24 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

In '/var/log/Xorg.0.log' i found this line:
Code:
[  1928.051] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)
Could this be the reason for startx's failure?


This can be because your screen is attached to the intel IGPU and you have an optimus system

regards


Last edited by hedmo on Wed Apr 22, 2020 6:17 am; edited 3 times in total
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Thu Apr 16, 2020 10:36 am    Post subject: Reply with quote

@hedmo: i have 'nvidia' in the use flags, and i have the entry 'VIDEO_CARDS="nvidia" in make.conf.
Is optimus system a problem for X and nvidia?

@fedeliallalinea: yes, eselect-opengl is indeed not installed, but libglvnd is. How does one use libglvnd?

@fturco: I have dbus in my USE variable in make.conf.
Indeed, dbus was not running. I started it now and did 'rc-update add dbus default'. but startx still failed (although without the dbus message).
In Xorg.0.log, after successful loading of modules glx, nvidia, fb, wfb,ramdac, there is:
Code:
[   541.589] (II) Loading sub module "glxserver_nvidia"
[   541.589] (II) LoadModule: "glxserver_nvidia"
[   541.589] (II) Loading /usr/lib64/xorg/modules/extensions/libglxserver_nvidia
.so
[   541.594] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[   541.594]    compiled for 1.6.99.901, module version = 1.0.0
[   541.594]    Module class: X.Org Server Extension
[   541.594] (II) NVIDIA GLX Module  440.64  Fri Feb 21 00:46:14 UTC 2020
[   541.594] (II) NVIDIA: The X server supports PRIME Render Offload.
[   541.862] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[   541.862] (--) NVIDIA(0):     DFP-0
[   541.862] (--) NVIDIA(0):     DFP-1
[   541.862] (--) NVIDIA(0):     DFP-2
[   541.863] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 1050 (GP107-A) at PCI:1:0:0 (GPU-0)
[   541.863] (--) NVIDIA(0): Memory: 3145728 kBytes
[   541.863] (--) NVIDIA(0): VideoBIOS: 86.07.6c.00.25
[   541.863] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[   541.863] (--) NVIDIA(GPU-0): DFP-0: disconnected
[   541.863] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[   541.863] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[   541.863] (--) NVIDIA(GPU-0):
[   541.863] (--) NVIDIA(GPU-0): DFP-1: disconnected
[   541.863] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[   541.863] (--) NVIDIA(GPU-0): DFP-1: 1440.0 MHz maximum pixel clock
[   541.863] (--) NVIDIA(GPU-0):
[   541.863] (--) NVIDIA(GPU-0): DFP-2: disconnected
[   541.863] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[   541.863] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[   541.863] (--) NVIDIA(GPU-0):
[   541.863] (EE) NVIDIA(0): Failed to assign any connected display devices to X screen 0.
[   541.863] (EE) NVIDIA(0):     Set AllowEmptyInitialConfiguration if you want the server
[   541.863] (EE) NVIDIA(0):     to start anyway
[   541.863] (EE) NVIDIA(0): Failing initialization of X screen
[   541.898] (II) UnloadModule: "nvidia"
[   541.898] (II) UnloadSubModule: "glxserver_nvidia"
[   541.898] (II) Unloading glxserver_nvidia
[   541.898] (II) UnloadSubModule: "wfb"
[   541.898] (II) UnloadSubModule: "fb"
[   541.898] (EE) Screen(s) found, but none have a usable configuration.


Then i have also blacklisted 'nouveau' and reemerged 'x11-drivers/nvidia-drivers', and ran 'nvidia-xconfi again.
Now startx doesn't say it can't find a screen, but there is no GUI, instead there is:
Code:
(==) Log file: "/var/log/Xorg.3.log", Time: Thu Apr 16 10:03:02 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error:   Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server
/etc/X11/xinit/xinitrc: line 58: twm: command not found
/etc/X11/xinit/xinitrc: line 59: xclock: command not found
(i emereged xterm and twm, bur i still get the same behaviour (no GUI, but xkbcomp error))

I also looked at "/etc/X11/xorg.conf" and "/usr/share/X11/xorg.conf.d", but there was no mention of 'XF86FullScreen'.
In the page https://bugs.archlinux.org/task/65730 it is mentioned that
Quote:
"The `xkeyboard-config` package introduced the new keysym `XF86FullScreen` in the recent `2.29` version ...However this symbol has not been yet added to the `libxkbcommon` package, more precisely to the file `/usr/include/xkbcommon/xkbcommon-keysyms.h`. This because the new symbol has not been added to the `xorgproto` package.

The error is temporarily fixed by reverting `xkeyboard-config` to `2.28` because this version does not have the new keysym. "


Problem is, when i do 'eix xkeyboard-config' the lowest available version *is* 2.29. How could i get a lower version of `xkeyboard-config`?
Or is there another way to solve this problem? ¨
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Thu Apr 16, 2020 11:20 am    Post subject: Reply with quote

jody wrote:
@fedeliallalinea: yes, eselect-opengl is indeed not installed, but libglvnd is. How does one use libglvnd?

I can switch, in my prime system, from intel to nvidia through libglvnd with this configuration:
Code:
# echo 'Section "ServerLayout"           
      Identifier "layout"
      Option "AllowNVIDIAGPUScreens"
EndSection' > /etc/X11/xorg.conf.d/30-nvidia-offload.conf

then restart X and for run a program with nvidia you can run
Code:
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Mon Apr 20, 2020 10:45 am    Post subject: Reply with quote

Would it be appropriate to start a new thread focusing on the "xkeyboard-config/XF86FullScreen" problem?
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Tue Apr 21, 2020 11:12 am    Post subject: Reply with quote

i have now removed the line
Code:
     key <I380>  {       [ XF86FullScreen         ]       };
from '/usr/share/X11/xkb/symbols/inet'.
After startx, the X still does not start properly (the console is still visible, with the normal start-up messages from X, but *no* error messages at all).
The logfile /var/log/Xorg.0.log likewise has no error entries, but there are some warnings:
Code:
 ~ # grep WW /var/log/Xorg.0.log
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   126.421] (WW) The directory "/usr/share/fonts/TTF/" does not exist.
[   126.421] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[   126.421] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[   126.422] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[   126.422] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[   126.422] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[   126.422] (WW) Disabling Keyboard0
[   126.422] (WW) Disabling Mouse0
[   126.746] (WW) NVIDIA(0): Unable to get display device for DPI computation.


On the other hand X is running as are twm, xterm and xclock, but not even a black screen is visible, only the console. Her an excerpt from 'ps ajxf' during this state:
Code:
   1  3077  3077  3077 tty1      3359 Ss       0   0:00 /bin/login --
 3077  3356  3356  3077 tty1      3359 S        0   0:00  \_ -bash
 3356  3359  3359  3077 tty1      3359 S+       0   0:00      \_ /bin/sh /usr/bin/startx
 3359  3376  3359  3077 tty1      3359 S+       0   0:00          \_ xinit /etc/X11/xinit/xinitrc -- /etc/X11/xinit/xser
 3376  3377  3377  3077 tty1      3359 S<l      0   0:00              \_ /usr/bin/X -nolisten tcp -keeptty :0 -auth /tmp
 3376  3384  3384  3077 tty1      3359 S        0   0:00              \_ xterm -geometry 80x66+0+0 -name login
 3384  3408  3384  3077 tty1      3359 S        0   0:00                  \_ twm
 3384  3409  3384  3077 tty1      3359 S        0   0:00                  \_ xclock -geometry 50x50-1+1
 3384  3410  3384  3077 tty1      3359 S        0   0:00                  \_ xterm -geometry 80x50+494+51
 3410  3414  3414  3414 pts/1     3414 Ss+      0   0:00                  |   \_ bash
 3384  3411  3384  3077 tty1      3359 S        0   0:00                  \_ xterm -geometry 80x20+494-0
 3411  3415  3415  3415 pts/0     3415 Ss+      0   0:00                  |   \_ bash
 3384  3421  3421  3421 pts/2     3421 Ss+      0   0:00                  \_ bash


So the questions are: without error messages, how can i find out what is wriong, and how can i get to have a 'visible' X.?
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Wed Apr 22, 2020 7:30 am    Post subject: Reply with quote

jody wrote:

The logfile /var/log/Xorg.0.log likewise has no error entries, but there are some warnings:
Code:
 ~ # grep WW /var/log/Xorg.0.log

[   126.746] (WW) NVIDIA(0): Unable to get display device for DPI computation.




jody did you check optimus ?

Quote:


Before starting X
Per NVIDIA's instructions, the following commands are required before starting X:

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

This is to say any Display Manager that starts X-Windows then asks the user to log in will result in a black screen unless the above xrandr commands are run before asking the user to log in.
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Wed Apr 22, 2020 9:04 am    Post subject: Reply with quote

Thanks for the link to the optimus wiki.

I rebuilt the kernel after checking the required options, reemerged x11-base/xorg-server and x11-drivers/nvidia-drivers and ran
Code:
 ~ # nvidia-xconfig --prime

Using X configuration file: "/etc/X11/xorg.conf".
X Configuration file set up for PRIME. Please run "xrandr --setprovideroutputsource modesetting NVIDIA-0" and "xrandr
--auto" to enable. See the README for more details.
Option "AllowEmptyInitialConfiguration" "True" added to Screen "Screen0".
Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'


But the xrandr command fails:
Code:
 ~ # xrandr --setprovideroutputsource modesetting NVIDIA-0
Can't open display

What could be the problem here?
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Wed Apr 22, 2020 3:55 pm    Post subject: Reply with quote

jody wrote:
T

But the xrandr command fails:
Code:
 ~ # xrandr --setprovideroutputsource modesetting NVIDIA-0
Can't open display

What could be the problem here?


jody

The xrandr commands has to be in a file. lets say you are running X via startx and you have chosen lxde as the DE then the /etc/X11/xinit/xinitrc file
will look like this:

Code:

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

exec startlxde

at the top

For me...i am using sddm and have to set the commands to the /usr/share/sddm/scripts/Xsetup file and protect it from overrides
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Thu Apr 23, 2020 7:00 am    Post subject: Reply with quote

hedmo

I put the two 'xrandr' lines at the top of /etc/X11/xinit/xinitrc, then called 'startx'
-> X started properly :D (with the twm windows manager showing terminals and a clock)
Now i can continue setting up my laptop.
Thanks a lot for your help!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Fri Apr 24, 2020 1:40 am    Post subject: Reply with quote

xrandr does not need to be in a file, but it does need to be run in a context where it can connect to the X server. That means your X server must be up, your $DISPLAY must be pointed to it, and your Xauthority data must allow xrandr to connect. Due to its intended use for starting X programs, xinitrc fulfills all those requirements.
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