Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XOrg refusing to start after a fresh build
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
qweb.ric
n00b
n00b


Joined: 15 Jan 2015
Posts: 7

PostPosted: Thu Jan 15, 2015 5:43 pm    Post subject: XOrg refusing to start after a fresh build Reply with quote

Hi,

I'm setting Gentoo up on a new laptop and while I'm not new to this, I am being careful and following the guides. I'm now at a point where XOrg + KDE should be ready to launch, but for the life of me I can't get them to.

The laptop has a Geforce 850M and I'd like to use the official drivers since, annoyingly, I've always found them to have superior 3D acceleration, particularly on newer cards.

acpid, consolekit, dbus, udev, and xdm are all started on boot and their status shows as running.

I opted to install xorg-x11 as opposed to xorg-server to avoid problems with missing fonts etc.

make.conf has nvidia listed both as a USE flag and in VIDEO_CARDS. I also have evdev and synaptics listed as INPUT_DEVICES. /etc/conf.d/xdm has DISPLAYMANAGER="kdm".

I've been over the kernel a good 5,000 - 6,000 times and it's internal DRI / framebuffer support etc are definitely disabled. I've even enabled MTRR cleanup in the kernel, as this system has 16GB memory and https://wiki.gentoo.org/wiki/NVidia/nvidia-drivers#Getting_2D_acceleration_to_work_on_machines_with_4GB_memory_or_more said to switch MTRR to discrete mode in BIOS, which I can't do as this system is UEFI and doesn't offer much in the way of regular BIOS options. Although /proc/mtrr still shows uncachable labels so I'm not sure whether this has helped at all.

With X installed, I then installed KDE via the kdebase-meta package, and a couple of the other -meta packages. Normally I'd go for kdebase-startkde and individual program names but ironically I figured if I just bring in the meta's I'll know I'm not missing anything important, and it'll all just work :roll:

Everything installed smoothly, OpenGL and OpenCL are both set to nvidia and as this is a newer card I've added vdpau to the USE flags and performed a world update.

Rebooting resulted in a black screen. switching ttl and attempting to startx resulted in "No screens found" so I ran /opt/bin/nvidia-xconfig to generate an xorg.conf (Had to be done as root because /etc/X11/xorg.conf wasn't writable to all, although the guide states user).

Another reboot, just to be sure, and again a black screen. Still no luck.

Adding BusID to the Device section of xorg.conf seems to have fixed the no screens output when I startx, but now I get the following output:

Code:

/etc/X11/xinit/xinitrc: line 102: twm: command not found
/etc/X11/xinit/xinitrc: line 103: xclock: command not found
/etc/X11/xinit/xinitrc: line 106: exec: xterm: command not found
/etc/X11/xinit/xinitrc: line 104: xterm: command not found
/etc/X11/xinit/xinitrc: line 105: xterm: command not found
xinit: connection to X server lost


Strange, since I'm trying to use kdm not twm+xterm! For the sake of testing, I did try installing xterm and twm + resetting DISPLAYMANAGER to xdm, but the same black screen occurred.

Additionally, kdm.log shows the following:

Code:

klauncher(2221) kdemain: No DBUS session-bus found. Check if you have started the DBUS server.
kdeinit4: Communication error with launcher. Exiting!
kdmgreet(2213)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed: "Not connected to D-Bus server"
kdmgreet(2213)/kdecore (K*TimeZone*): No time zone information obtained from ktimezoned


dbus is running though, according to --status, and I've tried switching rc_parallel to NO and rebooting. I'm guessing this isn't the immediate problem anyway.

Finally, I've tried masking the current nvidia-driver and reverting to earlier builds, and I've tried unmasking the latest unstable and upgrading to that. Whatever I do seems to dump me in a black screen instead of KDM.

Any help would be very much appreciated!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 15, 2015 7:56 pm    Post subject: Reply with quote

qweb.ric,

Welcome to Gentoo.
You have the right approach. Build on what you know works

Code:
/etc/X11/xinit/xinitrc: line 102: twm: command not found
/etc/X11/xinit/xinitrc: line 103: xclock: command not found
/etc/X11/xinit/xinitrc: line 106: exec: xterm: command not found
/etc/X11/xinit/xinitrc: line 104: xterm: command not found
/etc/X11/xinit/xinitrc: line 105: xterm: command not found
xinit: connection to X server lost
is actually quite promising. It looks like Xorg started and tried to run its default programs which were not installed.

Take xdm out of the default runlevel and kill it if its started.

Running startx as a test of xorg should get you the default twm with three xterms and xclock.
Once that works we can try to get KDE in place of twm
_________________
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
qweb.ric
n00b
n00b


Joined: 15 Jan 2015
Posts: 7

PostPosted: Thu Jan 15, 2015 9:21 pm    Post subject: Reply with quote

Hi Neddy,

I've removed xdm from RC, emerged xterm, xclock, and twm, and rebooted to be sure there's nothing running.

startx now gives no errors, obviously, but still just results in a blank screen. Even if I amend the DISPLAYMANAGER line of /etc/conf.d/xdm to load twm.

I'm now thinking if KDM/XOrg isn't the issue, then it must either be nvidia-drivers, which I find unlikely given I've tried numerous builds now, or the framebuffer. I've disabled the nvidia framebuffer from the kernel, as per the instructions though so it should be the nvidia-drivers framebuffer that's in use now... So either way I suppose it's the driver that's not working?
Back to top
View user's profile Send private message
davidm
Guru
Guru


Joined: 26 Apr 2009
Posts: 557
Location: US

PostPosted: Thu Jan 15, 2015 10:45 pm    Post subject: Reply with quote

Assuming the card is compatible with nouveau (I haven't checked and don't know) you might just want to go ahead and try installing with that and getting things operational. Then you can always change it later. It's not all that hard to change really although you will have to recompile some programs. Who knows you might find Nouveau works well for you. I have older hardware (Quadro FX 570) but it actually seems to perform better for normal desktop usage for me with Nouveau as opposed to the binary driver which seems sometimes a bit buggy in its support.
Back to top
View user's profile Send private message
qweb.ric
n00b
n00b


Joined: 15 Jan 2015
Posts: 7

PostPosted: Thu Jan 15, 2015 11:05 pm    Post subject: Reply with quote

Hi David,

I keep considering that, and for the sake of testing I really should do, but to be honest I just can't see nouveau working out for me. I chose the 850M because I need a heavy graphics unit (Photoshop inside Virtualbox inside KDE, usually with a couple of other VM's running in parallel as I do a lot of switching between the various operating systems for testing, all at 1080p. OK maybe I don't need KDE, but that's become the environment I'm comfortable working in). As much as I love open source, I'm just not confident that a backward engineered driver can use this card to it's full potential.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Fri Jan 16, 2015 12:14 am    Post subject: Reply with quote

make and model of the laptop?
suggest pastebin /var/log/Xorg.0.log, /usr/src/linux/.config, and outputs of dmesg and lspci -k
_________________
Defund the FCC.
Back to top
View user's profile Send private message
qweb.ric
n00b
n00b


Joined: 15 Jan 2015
Posts: 7

PostPosted: Fri Jan 16, 2015 10:52 am    Post subject: Reply with quote

Hi,

It's a custom built laptop but here's the related spec:

2.5GHz Intel i7 quad core (4710MQ)
16GB DDR3 memory
2GB GeForce GTX 850M

dmesg does show this interesting snippet:

Code:

vgaarb: this pci device is not a vga device
nvidia 0000:01:00.0: irq 31 for MSI/MSI-X


My xorg.conf is now just this:

Code:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection


Pastebins:
Xorg.0.log : http://pastebin.com/AwLLiSzt
lspci -k : http://pastebin.com/fFDTEgnA
kernel .config : http://pastebin.com/j1YYj9pX
dmesg : http://pastebin.com/SKC6yjPH
Back to top
View user's profile Send private message
qweb.ric
n00b
n00b


Joined: 15 Jan 2015
Posts: 7

PostPosted: Fri Jan 16, 2015 1:57 pm    Post subject: Reply with quote

Ahh, I now understand why this isn't working!

This system is using nVidia Optimus which seems to mean that the Geforce isn't actually connected to a screen, which explains those odd messages in dmesg and XOrg.conf... It also means neither nvidia-drivers or the open source drivers work out of the box - I actually stumbled on to this information while reading over the nouveau guide.

Frustratingly, I've now managed to totally kill this laptop while switching it to use the in-kernel nvidia framebuffer ready for nouveau so now I just have a black screen, even during boot, and I'm currently in the office with no live disk so I can't yet get back into it. Here are the options though, for anybody else experiencing this issue:

Use the nVidia card but xrandr the output over to the on-board chipset, which I fear defeats the purpose of Optimus entirely: https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops

Or use Bumblebee which seems to do the same thing but only when you tell it to, meaning the rest of the time you're using integrated graphics. This project seems to no longer be maintained though, and probably a headache to use: http://www.bumblebee-project.org

Until Optimus just works natively via nvidia-drivers or the kernel, I suppose I'm going to have to go the xrandr route.

I'll update this thread with the results.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jan 16, 2015 9:09 pm    Post subject: Reply with quote

qweb.ric,

The idea is that the Intel chip drives the screen refresh at all times.
Thats not very strenuous, its just constantly reading the pixel buffer to the screen. All video chips have that capability.

With the Optimus graphics solution. you get to choose which chip draws into the pixel buffer.
The Intel one is less capable and less power hungry, or the nVidia one, which gives you the nVidia performance you want.
Its drawing the image that is the hard work.
_________________
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
qweb.ric
n00b
n00b


Joined: 15 Jan 2015
Posts: 7

PostPosted: Sun Jan 18, 2015 2:21 pm    Post subject: Reply with quote

Hi,

The xrandr method actually does seem to work quite well. KDM was rendered at 640x480 and tiled across my 1920x1080 screen until I added a Virtual line to the xorg.conf, I had to also add modesetting as a graphic card in xorg.conf which the guide didn't mention, and I totally forgot to rebuild nvidia-drivers after a couple of kernel rebuilds, causing a good 4 hours of headache, but now that I'm in I'm impressed!

17,000 fps at 1920x1080 according to glxgears and running at about 42degC which seems reasonable. There doesn't seem to be any vsync option but I'm not so fussed about that.

Thanks for the help guys.
Back to top
View user's profile Send private message
wgjak47
n00b
n00b


Joined: 04 May 2014
Posts: 13

PostPosted: Sat Apr 18, 2015 2:21 pm    Post subject: Reply with quote

qweb.ric wrote:
Hi,

The xrandr method actually does seem to work quite well. KDM was rendered at 640x480 and tiled across my 1920x1080 screen until I added a Virtual line to the xorg.conf, I had to also add modesetting as a graphic card in xorg.conf which the guide didn't mention, and I totally forgot to rebuild nvidia-drivers after a couple of kernel rebuilds, causing a good 4 hours of headache, but now that I'm in I'm impressed!

17,000 fps at 1920x1080 according to glxgears and running at about 42degC which seems reasonable. There doesn't seem to be any vsync option but I'm not so fussed about that.

Thanks for the help guys.

I have the same problem about KDM, but I don't know how set Virtual line currently...
This is my xorg.conf.
Code:
Section "ServerLayout"
   Identifier "layout"
   Screen 0 "nvidia"
   Inactive "intel"
EndSection

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

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

Section "Device"
   Identifier "intel"
   Driver "modesetting"
EndSection

Section "Screen"
   Identifier "intel"
   Device "intel"
   SubSection "Display"
      Depth  24
      Virtual 1920 1080
   EndSubSection

EndSection


Can you show me your xorg.conf?
Thanks.
Back to top
View user's profile Send private message
qweb.ric
n00b
n00b


Joined: 15 Jan 2015
Posts: 7

PostPosted: Sat Apr 18, 2015 10:22 pm    Post subject: Reply with quote

You just need to move your Display subsection from the intel screen to the nvidia screen. You may also need to add a BusID to your intel device like you have with the nvidia device - I did.

My xorg.conf is as follows:

Code:

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

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

Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
    Option         "AllowEmptyInitialConfiguration"
    Option         "UseDisplayDevice" "none"
    SubSection "Display"
        Virtual 1920 1080
    EndSubSection
EndSection

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

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


Another thing to note - it seems with the newer Xorg 1.16 / 1.17 series (1.16 is in the stable branch), you need to use xorg's OpenGL implementation instead of nvidia's otherwise you just get a blinking cursor where KDM should be. Seems to be something to do with Xorg now having modesetting drivers built in but I've not looked into this much. There's a bug in the 1.15 builds that conflicts with Synaptics though, causing a really, really annoying graphics lock every couple of minutes (switching tty recovers from it) so it's worth using 1.16 and Xorg's OpenGL although my laptop fans have been at high speed a lot more often than with nvidia's implementation...

Code:
eselect opengl set xorg-x11


One other thing which somebody may be able to help with - I use Virtualbox to run a few Windows' VM's as test boxes, and for Photoshop, but I can't enable 3D acceleration, which Photoshop would prefer, because Virtualbox doesn't recognise that this is set up on the host. This has been the case for quite some time, long before I switched to xorg's OpenGL, yet glxinfo shows that direct rendering etc is all ok. I can only assume that Virtualbox can't see past the Intel part. Ideas?

Regards.
Back to top
View user's profile Send private message
wgjak47
n00b
n00b


Joined: 04 May 2014
Posts: 13

PostPosted: Mon Apr 20, 2015 7:48 am    Post subject: Reply with quote

Thanks, I have solved this problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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