View Full Version : [Solved] New motherboard - X does not start
callado
December 21st, 2009, 11:14
I have replaced my motherboard with an ASUS P5QPL-AM and I have only the integrated G41 express chipset X4500 video.
The previous one with GMA 3000 worked fine with X.
In FreeBSD 8.0 X crashes immediately to CLI, with the error message in Xorg.0.log that agpgart is not available. I included 'load_agp="YES"' in /boot/loader.conf, although my previous intel chip worked without this. But X still crashes with the same error message and I don't see /dev/agp*.
I have no xorg.conf, I have enabled hal and dbus in /etc/rc.conf.
I have also PCBSD 7.1.1 (based on FreeBSD 7.2) and X crashes the same way.
Under linux X works without problem.
vermaden
December 21st, 2009, 11:26
@callado
Report a BUG here with all possible details:
http://freebsd.org/send-pr.html
sixtydoses
December 21st, 2009, 11:28
I included 'load_agp="YES"' in /boot/loader.conf...
It should be agp_load="YES".
Do you have device agp in your kernel?
SirDice
December 21st, 2009, 11:38
device agp is in GENERIC.
sixtydoses
December 21st, 2009, 13:26
Just in case he's using custom kernel.
callado
December 21st, 2009, 20:56
Ok, there was 'agp_load="YES"' in /boot/loader.conf, I mistyped it.
I use GENERIC.
Anyway, if I enter 'kldload agp', I get 'kldload: can't load agp: File exists'
Now both PCBSD and FreeBSD work only with 'vesa' driver.
achix
December 22nd, 2009, 11:12
-configure could help you guess your new driver.
When swapping motherboards/graphic cards chances are that the previous /etc/X11/xorg.conf will NOT work out of the box for the new hardware.
callado
December 22nd, 2009, 15:21
-configure could help you guess your new driver.
When swapping motherboards/graphic cards chances are that the previous /etc/X11/xorg.conf will NOT work out of the box for the new hardware.
I had no xorg.conf at all, it is no longer required if hal is running. I also tried 'Xorg -configure' and copying '/root/xorg.conf.new' to '/etc/X11/xorg.conf', but it did not help. I need the same driver ('intel') as before. Now I use the xorg.conf to start X with 'vesa'.
adamk
December 22nd, 2009, 15:53
Please show us the full /var/log/Xorg.0.log file from when you tried using the "intel" driver.
Adam
achix
December 22nd, 2009, 16:21
I had no xorg.conf at all, it is no longer required if hal is running. I also tried 'Xorg -configure' and copying '/root/xorg.conf.new' to '/etc/X11/xorg.conf', but it did not help. I need the same driver ('intel') as before. Now I use the xorg.conf to start X with 'vesa'.
oops, i didn't know that, i just tried it today for the first time.
Thanx for pointing this out.
However, i still i read a lot of graphics "hardcore" stuff, referring to xorg.conf.
callado
December 22nd, 2009, 17:39
Please show us the full /var/log/Xorg.0.log file from when you tried using the "intel" driver.
Adam
I reported a bug, as vermaden recommended: Details (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/141853). Xorg log is included.
adamk
December 22nd, 2009, 17:46
Your Xorg log file shows that it's running as DISPLAY :1... Is there another X server already running on that machine as :0?
Adam
callado
December 22nd, 2009, 18:03
Your Xorg log file shows that it's running as DISPLAY :1... Is there another X server already running on that machine as :0?
Adam
No. In which line do you see that?
adamk
December 22nd, 2009, 18:17
(==) Log file: "/var/log/Xorg.1.log",
The log files are numbered based on their DISPLAY. So something is causing X to start as DISPLAY :1, which is very odd. It maybe completely unrelated to this crash, but that's certainly something to look into. What's the output of 'ps ax'? Does /var/log/Xorg.0.log exist?
Adam
callado
December 22nd, 2009, 18:44
(==) Log file: "/var/log/Xorg.1.log",
Adam
I think that it only means that it is a backup of a previous X log. Xorg.0.log is the latest, the previous one is moved to Xorg.0.log.old, the ones before that are moved to Xorg.1.log, Xorg.1.log.old, Xorg.2.log, Xorg.2.log.old, etc. In order to launch X, I needed the 'vesa' driver, so I provided an earlier log.
adamk
December 22nd, 2009, 18:59
That is not correct. The number in the log file specifies the the display. Xorg.0.log is the most recent log for display :0. Xorg.0.log.old is the next most recent. It does not keep older versions around.
EDIT: You can confirm this by looking at the -logfile option in the Xorg man page.
Adam
zeiz
December 22nd, 2009, 19:33
It is not required to load agp.ko module in /boot/loader.conf if you use GENERIC.
It may be quite useful to show here your /etc/X11/xorg.conf as it is at yours.
Eventually somebody who has same chip may post his/her working xorg.conf and then you just make "diff" :)
achix
December 22nd, 2009, 19:43
what happens if you
/boot/kernel/i915.ko
by hand?
is your xf86-video-intel package up to date?
also, as zeiz said, its a good idea to put aside hal and dbus for a while, try to use xorg.conf till you have your first xterm appearing, and then you go back to hal, step by step.
callado
December 22nd, 2009, 20:53
is your xf86-video-intel package up to date?
Yes, I have xf86-video-intel-2.7.1
My xorg.conf (X works with this one with 'vesa'):
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
EndSection
Section "Module"
Load "dbe"
Load "ddc"
Load "dri"
Load "dri2"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "freetype"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "Buttons" "6"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons"
EndSection
Section "Monitor"
Identifier "Monitor0"
Vendorname "LGE"
Modelname "LG FLATRON W2042S"
Horizsync 30.0-80.0
Vertrefresh 59.9-60.0
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Identifier "Card0"
Driver "vesa"
# VendorName "Intel Corporation"
# BoardName "4 Series Chipset Integrated Graphics Controller"
# BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection
achix
December 22nd, 2009, 21:20
your Xorg.0.log posted in the PR, complains about not being abled to load i915 kernel module:
[drm] failed to load kernel module "i915"
did you try the kldload above?
callado
December 22nd, 2009, 21:20
what happens if you
/boot/kernel/i915.ko
by hand?
It loads. But if I start X after that with 'intel', it still crashes.
zeiz
December 22nd, 2009, 22:13
Specification (http://www.all-monitors.com/compares/lg_flatron_w2042s_vs_lg_w2343s-pf) for your monitor is (some important):
Screen Resolution 1680x1050
Horizontal Frequency Bandwidth (H-Sync Rate) 30-83 Hz
Vertical Frequency Bandwidth (V-Sync Rate) 56-75 MHz
So sections "Monitor" and "Screen" (Subsection "Display") should rather look like this:
Section "Monitor"
Identifier "Monitor0"
VendorName "LGE"
ModelName "LG FLATRON W2042S"
HorizSync 30.0-83.0
VertRefresh 56.0-75.0
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1680x1050_60"
EndSubSection
EndSection
This already can help, try first with "vesa" then change to intel, lets see if we need more workaround :)
PS. Forgot to highlight: probably it was just a typo but anyway capital letters must be in place:
VendorName
ModelName
HorizSync
VertRefresh
achix
December 22nd, 2009, 22:17
It loads. But if I start X after that with 'intel', it still crashes.
We usually say "crash" to denote a kernel panic/crash.
Anyway, after loading i915.ko, is your Xorg log still the same?
What does it complain about now?
adamk
December 22nd, 2009, 22:26
I'm wondering if it's possible that the FreeBSD agpgart driver doesn't support your particular chipset. It would be odd, but not impossible. What's the full output of 'pciconf -vl'?
zeiz
December 22nd, 2009, 23:45
just in case: http://gitorious.org/~mlaier/freebsd/mlaiers-clone/commit/ca9391509dfc861db04ac8329569afb005e7be70
callado
December 23rd, 2009, 08:28
just in case: http://gitorious.org/~mlaier/freebsd/mlaiers-clone/commit/ca9391509dfc861db04ac8329569afb005e7be70
Yes, that seems to be the solution, because:
$ pciconf -l | grep vga
vgapci0@pci0:0:2:0: class=0x030000 card=0x836d1043 chip=0x2e328086 rev=0x03 hdr=0x00
And some lines in the patch:
555 {0x8086, 0x2E32, CHIP_I9XX|CHIP_I965, "Intel G41"}, \
648 (dev)->pci_device == 0x2E32)
657 (dev)->pci_device == 0x2E32 || \
So, I can add these lines to the headers sys/dev/drm/drm_pciids.h and sys/dev/drm/i915_drv.h. But how should I proceed after that? What should I recompile, modify, etc.?
vermaden
December 23rd, 2009, 08:41
@callado
Rebuild i915.ko module.
achix
December 23rd, 2009, 09:17
Which means,
# kldunload i915
/usr/src/sys/modules/drm/i915
# make install
# kldload i915
callado
December 23rd, 2009, 09:26
Rebuild i915.ko module.
Ok. Just to make sure, is this all?
As root:
modify headers according to the patch
cd /usr/src/sys/modules/drm/i915
make
and then reboot?
vermaden
December 23rd, 2009, 10:05
You do not need to reboot, just make commands that achix posted, it will unload current module, build the new one and load the new one.
Nest try Xorg with intel driver.
callado
December 23rd, 2009, 12:37
I have rebuilt /usr/src/sys/modules/drm/i915 and /usr/src/sys/modules/drm/drm with make and make install
X still does not start with 'intel':
drm0: <Intel G41> on vgapci0
error [drm:pid 1241: drm_load] *ERROR* Card isn't AGP or couldn't initialize AGP
I have found some reports like this (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2008-09/msg00772.html). So now I also added my device (0x2E328086) to agp_i810.c after line 177. What should I rebuild now?
vermaden
December 23rd, 2009, 13:21
# kldunload i915
# kldunload agp
# cd /usr/src/sys/modules/agp
# make install
# kldload i915
achix
December 23rd, 2009, 13:24
agp IIRC is compiled in his kernel, so he should do a full kernel rebuild.
callado
December 23rd, 2009, 13:54
agp IIRC is compiled in his kernel, so he should do a full kernel rebuild.
Rebuilding only agp did not help, still the same error.
For rebuilding the kernel, is this ok?
Add MODULES_OVERRIDE = agp to /etc/make.conf:
Then:
# cd /usr/src
# make buildkernel KERNCONF=GENERIC
# make installkernel KERNCONF=GENERIC
vermaden
December 23rd, 2009, 14:11
Yes I forgot that agp.ko by default is in kernel, as others suggested, you need to rebuild the kernel ... or build kernel without agp in, so you will have to rebuild only a module to check next changes.
callado
December 23rd, 2009, 14:35
So I have rebuilt the kernel. Now the problem is that I get the error message that linproc cannot be mounted from fstab
achix
December 23rd, 2009, 14:39
grep lin should give smth like
8 2 0xffffffff81026000 1c53f linux.ko
9 1 0xffffffff81022000 3a28 linprocfs.ko
whats your case?
callado
December 23rd, 2009, 14:59
The good news is that X now works with 'intel'. The bad news is that linux kernel modules are not loaded and the net does not work (ale0). Should I copy modules from /boot/kernel.old to /boot/kernel except for the modified agp? Now I have only agp.ko, agp.ko.symbols, kernel, kernel.symbols and linker.hints in in /boot/kernel/
zeiz
December 23rd, 2009, 16:37
It makes sense to backup new agp.ko and then try to copy modules from /boot/kernel.old except old agp.ko.
Sorry, I'm too late and had no chance to prevent you from modifying make.conf that way: it builds only the modules following MODULES_OVERRIDE, now you know yourself :).
Personally I have custom config file instead of GENERIC and this line in make.conf:
MODULES_OVERRIDE= acpi linux linprocfs sound/sound /sound/driver/emu10k1 msdosfs ntfs zfs opensolaris zlib
but I wouldn't customize as much, I'd rather stay with GENERIC this time without modifying make.conf.
BTW you don't need to mention KERNCONF=GENERIC since it builds and installs GENERIC by default.
callado
December 23rd, 2009, 18:39
Thank you gentlemen! The problem has been solved with your help. Merry Christmas!
zeiz
December 23rd, 2009, 21:04
Pleasure. Same to you!
vermaden
December 23rd, 2009, 21:16
@callado
You are welcome mate, same to You ;)
grenyer
January 1st, 2010, 02:07
you are the best.
Gracias brother.
SterlingCamden
April 12th, 2010, 00:28
This is excellent. Any chance of finding a similar cure for a series 55 or 57 chip (Intel i3)?
SterlingCamden
April 12th, 2010, 00:51
My pciconf reports the chip=0x00468086
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
0