Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Boot screen hangs but system is online
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
avitase
n00b
n00b


Joined: 26 Apr 2015
Posts: 37

PostPosted: Fri Aug 04, 2017 12:27 pm    Post subject: Boot screen hangs but system is online Reply with quote

I tried to install gentoo on my new PC, followed the tutorial up to step 'Finalizing' and compiled my own kernel (no genkernel). Unfortunately, booting does not work as expected. The screen freezes at some early stage, whereas the messages in /etc/var/kern.log continue and do not show any errors. The stop occurs before activating any network device but, nevertheless, I am able to ssh in my user account that I created and use the system without any (obvious) issues. I think this is a quiet obvious hint, that it is only the monitors that freezes. The PC inhabits the rather new GeForce GT 1030 and I decided to switch to the proprietary NVIDIA driver; the monitor is plugin via display port (just in case this information helps.)

Besides the freezing there is no clear error, such that it is hard for me to figure out the underlying problem. Can someone help me?

I already continued with the Xorg/Guide, hoping that emerging the nvidia driver will fix the issue, but it didn't.

Below you find the complete kern.log from a (single) booting process, the monitor freezed at line 456, i.e.
Code:
Aug  4 13:15:30 amber kernel: [    0.577561] software IO TLB [mem 0xc4350000-0xc8350000] (64MB) mapped at [ffff8800c4350000-ffff8800c834ffff


Complete log:
https://nopaste.xyz/?4f688e1cc6efdd5c#5vgT8HPbA5G/8AZD68HJ7Ld29znFwKqF7FyCUUtrv+Q=
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Aug 04, 2017 6:17 pm    Post subject: Reply with quote

avitase,

The nvidia binary blob does not provide any framebuffer console.
What happens is that the kernel switches away from the console used by grub.
Depending on what gets switched, the console can go blank or appear to freeze.
Booting continues normally, you just can't see it.

If Xorg is installed and working, it would run and the screen image would be correct.

How this is fixed depends if you are using UEFI Mode on Legacy/BIOS mode.
Please posh your
Code:
lspci -nn
and put your kernel .config onto a pastebin site.

-- edit --
Code:
Aug  4 13:15:30 amber kernel: [    0.638150] [drm] Cannot find any crtc or sizes - going 1024x768
Aug  4 13:15:30 amber kernel: [    0.639417] Console: switching to colour frame buffer device 128x48
Aug  4 13:15:30 amber kernel: [    0.640481] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device


The console switched to inteldrmfb frame buffer device but there is no display connected there.

Do you have two graphics cards or an Optimus graphics system?
_________________
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
avitase
n00b
n00b


Joined: 26 Apr 2015
Posts: 37

PostPosted: Sat Aug 05, 2017 10:43 am    Post subject: Reply with quote

Thanks a lot for your help.

I am running my mainboard in legacy mode. I don't have an Optimus graphics system but anyhow an Intel CPU (with GPU) and a NVIDIA graphic card. The monitor was connected with the NVIDIA card. If possible I want to activate both GPUs and switch between both by changing the cable.

Code:
# lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-V [8086:153b]
00:1a.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 [8086:8cad]
00:1b.0 Audio device [0403]: Intel Corporation 9 Series Chipset Family HD Audio Controller [8086:8ca0]
00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
00:1c.3 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 [8086:8c96] (rev d0)
00:1d.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 [8086:8ca6]
00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family Z97 LPC Controller [8086:8cc4]
00:1f.2 SATA controller [0106]: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] [8086:8c82]
00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP108 [10de:1d01] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fb8] (rev a1)
03:00.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev 41)


This is my current kernel .config:
https://pastebin.com/05LJs516

In the meantime I tried to activate my Intel GPU but again I had some problems. Since I assume this new problem to be unrelated to this one, I created a new topic. I am afraid, that I have to solve this new problem first. Sorry for this kind split posting:(
https://forums.gentoo.org/viewtopic-t-1067232.html
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 05, 2017 11:20 am    Post subject: Reply with quote

avitase,

You need to choose in the BIOS which card will be the console.
The boot loader messages will appear there.

Do you need the nvidia-drivers binary blob driver?
It doesn't play nicely with the in kernel DRM drivers.

Xorg won't like to start on a video card with no display connected.
It can be made to but you need to tell it the video configuration to use. How you do that in driver specific.
You can't use CONFIG_FB_EFI=y as you are not using UEFI mode.

Why do you want to switch graphics cards by moving the cable over?
What problem are you trying to solve, there may be a different solution?
_________________
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
avitase
n00b
n00b


Joined: 26 Apr 2015
Posts: 37

PostPosted: Sat Aug 05, 2017 11:40 am    Post subject: Reply with quote

Thanks again.

I will have a look into the bios and search for this option. I am afraid that I have to use the binary blob because my card is not yet supported in the open driver. Maybe I will switch later.

It seems reasonable for xorg to not start on disconnected cards, sorry for this confusion. I just want the system to have both graphic units available, such that I don't have to recompile anything when switching for instance from the NVIDIA card to the intel card by changing the cables (and of course restarting the system such that xorg can then start on the other device.) I guess this is no problem when mentioning both devices in the /etc/portage/make.conf?
There is no underlying reason why I want to do that. It would just be nice to have the intel GPU as a fallback.

Thanks for the tip with the FB_EFI; I don't know why this option was set. It have disbaled it now.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 05, 2017 12:23 pm    Post subject: Reply with quote

avitase,

The quick and dirty solution is to build two different kernels with two different .config files.
The kernel will want two different xorg.conf files too.
The xorg.conf files can be switched during boot, as one kernel will load the nvida kernel module and the other will not.
You can detect that with a startup script and copy the correct xorg.conf into place with a startup script.

I recall an approach that uses a single kernel and uses blacklists to set things up correctly.
That forces the use of kernel modules for the Intel driver, which has the down side that the framebuffer console starts later in the boot process.

You will still need to go into the BIOS to switch cards, since the boot loader messages will only appear on the card selected in the BIOS.
_________________
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
avitase
n00b
n00b


Joined: 26 Apr 2015
Posts: 37

PostPosted: Sat Aug 05, 2017 2:30 pm    Post subject: Reply with quote

Ok. I like the latter approach. Could you elaborate this a bit more? (alternatively RTFMs with corresponding links are welcome, too;)

What do I have to activate in the kernel and what part do I have to set on blacklist? I guess the price of a framebuffer console that starts late during boot is fine with me (are there any drawbacks, besides of non visible log messages?)

EDIT: thanks to your help I was now able to get the intel driver working. Obviously, I didn't install x11-drivers/xf86-video-intel and needed to switch graphic cards in my bios. Now the intel graphics works as expected.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 05, 2017 3:08 pm    Post subject: Reply with quote

avitase,

First of all, make the intel card work alone. Remove the nvidia-drivers binary blob so it can't interfere.
Set up the kernel for intel, put intel into VIDEO_CARDS, if its not there already.
Rebuild mesa if needed and get the xf86-video-intel driver, if its not already installed.

This should justwork, with no additions to Xorg configuration.
You will get a right handed mouse and a USA keymap, which is good enough to get you going.

When this works, make a copy of your kernel tree, thats whatever /usr/src/linux points at.
The original tree will be for intel, the copy will be for nvidia.
Code:
ls /usr/src/ -l
total 24
lrwxrwxrwx  1 root root   19 Jul 26 14:04 linux -> linux-4.12.3-gentoo
linux-4.12.3-gentoo
linux-4.12.3-gentoo-nvidia

We want to change linux-4.12.3-gentoo-nvidia to set up for the nVidia drivers but first, go into linux-4.12.3-gentoo-nvidia/Makefile
and at the top,
Code:
VERSION = 4
PATCHLEVEL = 12
SUBLEVEL = 3
EXTRAVERSION = -gentoo
NAME = Fearless Coyote
change the EXTRAVERSION to say, -gentoo-nvidia
This ensures the installed modules are kept separate.

Update the /usr/src/linux symlink to point to your -gentoo-nvidia kernel.
Run
Code:
make clean
to get rid of the old binaries.
Set this kernel up to use the nVidia binary blob.
Install it to /boot in the normal way beside your Intel kernel.
Fix your boot loader to offer you a choice at boot time.

Go into the BIOS and choose the nVidia card.
Boot the nVidia kernel.
Install and set up nvidia-drivers and make it work.
When you do this you will create a stub Xorg.conf with about 3 lines in it.

At this stage, you have two kernels, a default setup for Xorg, that words with Intel and a xorg.conf that is only needed for nVidia.
The nvidia-drivers kernel module is only build against the -nvidia kernel, so it can't load when you boot the original (intel) kernel.

To switch backwards and forwards, you select the video card in the BIOS, choose the kernel and switch the xorg.conf in and out.
Switching the xorg.conf in and out can be automated, depending on nvidia appearing in lsmod or not.

Step 1 Make Intel work alone.
Step 2 Make nVidia work alone
Step 3 Switch between them.
_________________
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
avitase
n00b
n00b


Joined: 26 Apr 2015
Posts: 37

PostPosted: Sat Aug 05, 2017 3:21 pm    Post subject: Reply with quote

Thanks a lot for this in-depth howto. Just two more questions:

(1) At which stage do I have to append the VIDEO_CARDS variable with the respective NVIDIA keyword?

(2) What are the changes that I have to apply to my kernel config. The wiki entry https://wiki.gentoo.org/wiki/NVidia/nvidia-drivers is full of things that I have to disable, but says nothing about what has to be enabled.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 05, 2017 4:41 pm    Post subject: Reply with quote

avitase,

The hard ones first :)

You need to keep the nvidia-drivers kernel module out of your intel kernel. You do that by managing the /usr/src/linux symlink.
Don't allow nvidia-drivers to build with /usr/src/linux -> pointing to the intel kernel.
It does not matter which kernel is running. That's why we changed EXTRAVERSION

Preparing the kernel for nvidia-drivers is about disabling things.
If you want a framebuffer consoles, the VESA Framebuffer may work.

One extra complication, part of the switching process will be to run
Code:
eselect opengl
nvidia-drivers provides its own opengl implementation.
That's changing a few symlinks, so can be in your switchover script.
_________________
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
avitase
n00b
n00b


Joined: 26 Apr 2015
Posts: 37

PostPosted: Sat Aug 05, 2017 4:58 pm    Post subject: Reply with quote

Ok. Let me put it in another way: What modules do I have to activate for the intel graphics to work, that have to be deactivated for the nvidia card? At the moment it looks for me, that the intel graphics works with all modules disabled that also have to be disabled for nvidia? Currently I have activated

Code:
Intel 8xx/9xx/G3x/G4x/HD Graphics

and
Code:
Always enable userptr support


Is this a problem? Is there some other module that I have to activate for nvidia?

This is my current .config that works fine with the intel chip https://pastebin.com/zvMDQNDA. What are the necessary changes for the nvidia chip?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 05, 2017 6:03 pm    Post subject: Reply with quote

avitase,

These options, required for your Intel card must be off.
Code:
# CONFIG_DRM_NOUVEAU is not set
CONFIG_DRM_I915=y
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
CONFIG_DRM_I915_USERPTR=y


It worth enabling # CONFIG_FB_VESA is not set to try to get a framebuffer console with nvidia-drivers, since its an Xorg only thing.
Make the changes with menuconfig.

Warning: its very easy to end up with black text on a black background for your console.
That's hard to read :)
_________________
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
avitase
n00b
n00b


Joined: 26 Apr 2015
Posts: 37

PostPosted: Sat Aug 05, 2017 6:31 pm    Post subject: Reply with quote

Great! Everything works! Thanks a lot.
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