Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot startx after new install
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7094
Location: Saint Amant, Acadiana

PostPosted: Thu Dec 04, 2014 11:33 am    Post subject: Reply with quote

Google tells you may have Optimus.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Thu Dec 04, 2014 11:59 am    Post subject: Reply with quote

What should I do with this information? Does it change something in my kernel config? I have to leave for roughly 4-5 hours now. I will dive into this when back.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7094
Location: Saint Amant, Acadiana

PostPosted: Thu Dec 04, 2014 12:01 pm    Post subject: Reply with quote

Gentoo and Optimus.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Thu Dec 04, 2014 5:02 pm    Post subject: Reply with quote

I think I need reading for a while before understanding all this.
One of my concern is that I dont use any bootloader (just rEFInd) but perhaps I can still pass kernel cmd line parameters)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Dec 04, 2014 8:10 pm    Post subject: Reply with quote

augustin2,

Its not a boot loader problem.

Optimus is a graphics system that looks like two graphics cards but is in fact, only 1 1/2
The Intel card is the whole one. It can both draw in the pixel buffer and refresh the screen from the pixel buffer.
The nVidia card can only draw in the pixel buffer. It cannot refresh the screen.

If you do get the nVidia driver te run alone, you will only get a blank screen.
The tmo drivers need to cooperate if you want to use the nvidia at all. The Intel chip still has to do the screen refresh.
_________________
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
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 1775
Location: Here and Away Again

PostPosted: Fri Dec 05, 2014 8:04 am    Post subject: ><)))°€ Reply with quote

augustin2 wrote:
The recompilation of nvidia-drivers says that there are kernel misconfigurations but I dont understand what it is about (it is at the beginning of the output -line 53):

https://bpaste.net/show/cbb90f9e2e19

That's actually not stating the misconfiguration is there.

Code:
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (      \
echo >&2;                     \
echo >&2 "  ERROR: Kernel configuration is invalid.";      \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";   \
echo >&2 ;                     \
/bin/false)

This is a block of code that is being run, where the first line

Code:
test -e include/generated/autoconf.h -a -e include/config/auto.conf ||

runs test with -e and -a -e on the files, testing that both exist. If either one of them does not, then the part after || will be run, which would display the message via the echo command, and in the end, execute /bin/false to exit with a status code indicating failure.


Once upon a time, I remember being confused about that output myself, and I doubt we're the first, nor the last ones. ^^;
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Fri Dec 05, 2014 9:25 am    Post subject: Reply with quote

Thank you NeddySeagon.

It seems to me I understand your point but I am not very used to the graphic concepts and I feel a bit lost trying to follow guidance given in the various pages that deal with the subject. It would be kind of you to help me finding my way through.

If I understand I need the following kernel settings:
Quote:

Device Drivers --->
Input device support --->
<*> Event interface

Device Drivers --->
Graphics support --->
Support for frame buffer devices --->
## (Disable all drivers, including VGA, Intel, nVidia, and ATI)

## (Further down, enable basic console support. KMS uses this.)
Console display driver support --->
<*> Framebuffer Console Support


]DeviceDrivers --->
Graphics Support --->
<*> Intel 8xx/9xx/Gex/G4x/HD Graphics
[*] Enable modetting on intel by default

Device Drivers --->
Graphics support --->
Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
<M> or <> Nouveau (nVidia) cards


Then in /etc/portage/make.conf
Quote:

VIDEO_CARDS="nvidia"


My first goal is to have a gnome3 desktop running.

Thus my first question is: "Should I install the package nvidia-drivers or run the driver install script from nvidia?" The simpler the better to me.

The second question is: "if xrandr" is necessary what is the trouble with my configuring xorg that way:

https://bpaste.net/show/bdcca0667f63
when
Code:
lspci | grep NVIDIA
returns 01:00.0 3D Controller : NVIDIA ....

and when trying to apply the following command as explained in the nvidia guide (http://us.download.nvidia.com/XFree86/Linux-x86_64/331.38/README/randr14.html):

Code:
xrandr --setprovideroutputsource modesetting NVIDIA-0

I get a "can't open display message" ?


Last edited by augustin2 on Fri Dec 05, 2014 11:36 am; edited 2 times in total
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Fri Dec 05, 2014 9:50 am    Post subject: Reply with quote

Hi Chiitoo. Thank you for help.
I have trouble with what you suggest:

I must check for include/generated/autoconf.h and include/config/auto.conf . These are relative paths. What are the absolute ones?
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Fri Dec 05, 2014 3:37 pm    Post subject: Reply with quote

I think I made slight progress and may be the xserver starts (but with a black screen despite twm an xterm being installed).

May be the Xorg.0.log can bring some helpful information:

https://bpaste.net/show/e1cd804518a7

(Don't know if this matters but I changed BusId "PCI:01:00:0" into BusPCI "1@0:0:0" - it is not the only change I did)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Dec 05, 2014 9:48 pm    Post subject: Reply with quote

augustin2,

To expand on what I said earlier. To get an image on your screen, there are two key processes that need to be performed by the graphics system.
The image needs to be drawn into the pixel buffer. The pixel buffer needs to be constantly read out to the screen.
In its simplest form, you can think of the pixel buffer having one memeory location for each dot on the screen. So a pixel buffer for a HD screen contains 1920x1080 memory locations, one per screen dot, or pixel.

Now, your Xorg lof contains
Code:
[   902.718] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[   902.718] (WW) NVIDIA(0): Unable to get display device for DPI computation.

Thats because in your Optimus graphics system, the nVidia graphics cannot do "the pixel buffer needs to be constantly read out to the screen" part of the process. It has no connection to the screen at all.
Thas why the two lines above appear in your Xorg.0.log

Other than that, Xorg appears to have started and stopped normally.

You always need to use the Intel graphics to do "the pixel buffer needs to be constantly read out to the screen" part of the graphics process, even when the nVidia card is doing the drawing.
.
_________________
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
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 1775
Location: Here and Away Again

PostPosted: Sat Dec 06, 2014 3:23 am    Post subject: Reply with quote

augustin2 wrote:
Hi Chiitoo. Thank you for help.
I have trouble with what you suggest:

I must check for include/generated/autoconf.h and include/config/auto.conf . These are relative paths. What are the absolute ones?

You need not do anything about that, for it's the nvidia-drivers installation script that is doing it already for you, and since it finishes successfully, this is not actually an error message (well, yes it is, but it's not being printed because there was an error... confused even more yet!?).

Regardless, you can actually see the absolute path in the log. It's relative, because 'you' are already there:

Code:
make[1]: Entering directory '/usr/src/linux-3.16.5-gentoo'

You are not supposed to do anything: the “installer” is running the test, and it's not failing there. The code is simply printed there as it's being run.


I hope this clears that up (and that I've not misunderstood anything myself!).

If there's still something unclear about that, please, do say so!
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sat Dec 06, 2014 6:58 am    Post subject: Reply with quote

Chiitoo wrote:

I hope this clears that up (and that I've not misunderstood anything myself!).
If there's still something unclear about that, please, do say so!

Ok. It's clear now. Thanks.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sat Dec 06, 2014 7:15 am    Post subject: Reply with quote

NeddySeagoon wrote:


You always need to use the Intel graphics to do "the pixel buffer needs to be constantly read out to the screen" part of the graphics process, even when the nVidia card is doing the drawing.
.

Ok. I understood this.It is the reason why I added the

Quote:
DeviceDrivers --->
Graphics Support --->
<*> Intel 8xx/9xx/Gex/G4x/HD Graphics
[*] Enable modetting on intel by default


in the kernel's configuration.
Now it seems I am mot far from success. Is it just a matter of passing the screen resolution in the config? Obeying the instructions of this page (http://us.download.nvidia.com/XFree86/Linux-x86_64/331.38/README/randr14.html) I have this in the xorg.conf

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


I am not presently in front of the laptop but I remember getting a message like Cannot load module "modesetting" . Module doesn't exists.
And may be the fact that the command:
Code:
xrandr --setprovideroutputsource modesetting NVIDIA-0
can result from the same reason (incorrect resolution).
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sat Dec 06, 2014 10:12 am    Post subject: Reply with quote

The actual trouble I have to go forward is that xrandr doesn't returns me any information:

Each time I use it (xrandr or xrandr -q or xrandr --setprovideroutputsource modesetting NVIDIA-0 ) I get

Quote:
Cannot open display


I feel I should modify something in the xorg.conf but I don't know what.

Edit:
Googling here and there I discovered that running xrandr from the command line requires to indicate the DISPLAY

But when running
Code:
DISPLAY=:0 xrandr --setprovideroutputsource modesetting NVIDIA-0


prior to call starty (as advised by the documentation ) I get
Could not find provider with name modesetting.
I probably missed something in the kernel configuration: But what?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Dec 06, 2014 1:37 pm    Post subject: Reply with quote

augustin2,

I guess you have seen the wiki page?
_________________
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
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sat Dec 06, 2014 6:04 pm    Post subject: Reply with quote

Yes I did. But I have to check my kernel config carrefully because I did and undid a lot of things during my trials.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sat Dec 06, 2014 7:00 pm    Post subject: Reply with quote

I have now X starting and displaying the xterm windows and the clock but I cannot say what I exactly did but removing xorg.conf.
Here is the Xorg.0.log https://bpaste.net/show/fc5828306575. I don't know whether things are what they should be or not.
My make.conf contains VIDEO_CARDS=" nvidia intel"

Once X started xrandr returns something

It seems to me I am not in accordance with this page http://us.download.nvidia.com/XFree86/Linux-x86_64/331.38/README/randr14.html and I feel a bit unconfortable before installing gnome3.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Dec 06, 2014 7:49 pm    Post subject: Reply with quote

augustin2,

You aro now using the
Code:
[  1706.282] (II) NOUVEAU driver for NVIDIA chipset families :

but
Code:
[  1706.287] (EE) [drm] KMS not enabled
kernel support is not complete, together with
Code:
[  1706.287] (II) intel(0): Creating default Display subsection in Screen section
   "Default Screen Section" for depth/fbbpp 24/32
[  1706.287] (==) intel(0): Depth 24, (--) framebuffer bpp 32


That works because you have thu Intel driver loaded. I cannot tell from the log whicd chip is doind the drawing.

It looks like you still tave the OpenGL set to nvidia, because the log says
Code:
[  1706.291] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)


I suspect that you still have nvidia-drivers installed but nouveau loadsf first, which prevents the nvidia driver loading.
You need to remove the nouveau driver, rebuild the kernel with nouveau support off and the kernel option thot provides CONFIG_DRM on, reboot into your new kernel, be sure that the /usr/src/linux symbolic link poits to the new kernel, then finally emerge nvidia-drivers, so it builds againts the new kernel.
make menuconfig:

  │ Symbol: DRM [=y]                                                        │ 
  │ Type  : tristate                                                        │ 
  │ Prompt: Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) │ 
  │   Location:                                                             │ 
  │     -> Device Drivers                                                   │ 
  │       -> Graphics support                                               │ 
  │ (1)     -> Direct Rendering Manager   


You are correct about you assertion
Quote:
I am not in accordance with this page http://us.download.nvidia.com/XFree86/Linux-x86_64/331.38/README/randr14.html ...


You are close. Do not change any Intel settings in the kernel.
_________________
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
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sat Dec 06, 2014 8:08 pm    Post subject: Reply with quote

Thank you Neddy Seagon for your precious help.
I will have a look at all this tomorow. At the moment, after a 15 km walk in a very hilly wood this afternoon I get tired and I feel like a sleep.
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sun Dec 07, 2014 8:53 am    Post subject: Reply with quote

I would like to do what you suggest Neddy Seagon, but I am scotched. As I don't remember what is exactly my actual kernel config, I boot on the running kernel from UEFI using rEFInd then do the following:
Quote:
cd /usr/src/linu
rm .config
zcat /proc/config.gz > .config

Doing so I think I have the presently running kernel config in .config

After that I rebuild the kernel with

Code:
genkernel  --integrated-initramfs --menuconfig all

changing nothing (I also tried changing some unimportant stuff relating to the keyboard to see the effect)
After that I place the newly compiled kernel in the ESP as usual. When I try to boot on it, It doesn't boot.
Why on earth the same kernel config is no longer bootable. Is there some genkernel mechanism that takes anything else than .config as a starting base?
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Sun Dec 07, 2014 10:45 am    Post subject: Reply with quote

In fact I rediscovered that the starting config of genkernel is in /etc/kernels. It is not /usr/src/linux/.config.
Now I can make changes in my kernel.

So, coming back to Neddy Seagon 's advices.

I checked the configuration.
CONFIG_DRM =y
and nouveau disabled.

Nevertheless nouveau continues to show up and the Xorg.0.log remains with the same messages despite recompiling nvidia-drivers.

here is kernel config: https://bpaste.net/show/0ce09cd7560e
and here is Xorg.0.log : https://bpaste.net/show/65e5dd7efa46
Back to top
View user's profile Send private message
augustin2
Apprentice
Apprentice


Joined: 16 Mar 2012
Posts: 244
Location: France

PostPosted: Mon Dec 08, 2014 7:55 am    Post subject: Reply with quote

I think I get closer but I am still stuck.

I restored the xorg.conf as describe in the nvidia documentation http://us.download.nvidia.com/XFree86/Linux-x86_64/331.38/README/randr14.html
and put the 2 xrandr commands in ~/.initrc


nouveau no longer shows up because I have blacklisted it
"module modesetting doesn't exist" message disappeared . I emerged xf86-video-modesetting. I saw nowhere in the documentation I had to. Probably I missed it.

If I launch startx as a normal user I have a black screen for 2 os 3 seconds then x exits with the following last lines:

Quote:
reporting 3 3 21 158
have a master to look out for
adjust shatters 0 1920
need to create shared pixmap 1xinit: connection to X server lost

waiting for X server to shut down. (EE) Server terminated successfully (0). Closing log file


The only error message Xorg.0.conf tells me is :
Quote:
"Failed to initiate mode change".
Here are:

- the Xorg.0.log file https://bpaste.net/show/7f5f7bbc166e
- the kernel config https://bpaste.net/show/dcc12fb86ed8
- the dmesg output https://bpaste.net/show/b30002a1c039

I really cannot make out in what direction to go!
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
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