Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2011 03:55:20 +0100
From:      Frank Shute <frank@shute.org.uk>
To:        Polytropon <freebsd@edvax.de>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: System lockups in X with nVidia GeForce 7600 GS (G73) and Gtk+
Message-ID:  <20110814025520.GA75595@orange.esperance-linux.co.uk>
In-Reply-To: <20110814032206.49ad7062.freebsd@edvax.de>
References:  <20110814032206.49ad7062.freebsd@edvax.de>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

--DocE+STaALJfprDB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Aug 14, 2011 at 03:22:06AM +0200, Polytropon wrote:
>
> I'm using FreeBSD/amd64 on an Intel Core 2 4300 (1.8GHz)
> on a VIA-equipped mainboard. The whole machine is a quite
> cheap one from a discounter (mainly food).
>=20
> OS is 8.2-STABLE (July 2011). I have xorg-7.5.1 installed=20
> with xorg-server-1.7.7_1,1, using xf86-video-nv-2.1.18
> configured in xorg.conf. The GPU I'm using is a nVidia
> GeForce 7600 (G73) which is being supported by the "nv"
> driver (as well as by "nouveau", see later on) according
> to the documentation.

My setup is about the same but with a GeForce 7300. I use nv without
problems.

>=20
> When in X and _only_ in conjunction with programs using
> the Gtk2 (Gtk+) toolkit, I encounter _total_ system
> lockups (freezes): no disk activity, no console I/O,
> nothing. It even happens during drawing operations.
> A hard reset is required, which means power-cycling
> as the cheap PC doesn't have a RESET button. A fsck
> is required on next booting.
>=20
> I could trigger this problem with Sylpheed, Claws
> Mail and Firefox.
>=20
> I am only able to do email because I downgraded
> Sylpheed from 3.1.1_1 to 1.0.6_9 which does use
> the classic Gtk (which I find more accessible
> anyway). This old version that _works_ is about
> to be removed from the ports tree!!!
>=20
> The machine has successfully been compiling the system,
> X and OpenOffice, so I may assume that it's not
> defective RAM or broken CPU. The hard disk is new.
>=20
> When the system does not lock up, frame rates for
> 3D (tested with "glxgears" and xlock -mode fire")
> is _very_ bad - much worse than on my old P4 with
> ATI graphics.
>=20
> I read that the "nv" driver does not support 3D, so
> I tried to install the "nouveau" driver.
>=20
> I did install xf86-video-nouveau-0.0.10.20090728_3
> from ports and replaced "nv" by "nouveau" in xorg.conf.
> Result:
>=20
> (EE) [drm] drmOpen failed.
> (EE) NOUVEAU(0): [drm] error opening the drm
> Segmentation fault: 11 at address 0x0
> Fatal server error:
> Caught signal 11 (Segmentation fault: 11). Server aborting
>=20
> There is no /dev/dri available.
>=20
> /usr/ports/x11-drivers/xf86-video-nouveau/pkg-message:
>     # cd /usr/src/sys
>     # fetch http://people.freebsd.org/~rnoland/drm-nouveau-062309.patch
>     # patch -sp0 -i drm-nouveau-062309.patch
>     # cd modules/drm
>     # make depend all install
>=20
> I've done this, installed & rebooted, same result.
>=20
> % startx
> drmOpenDevice: node name is /dev/dri/card0
> Failed to change owner or group for file
> 	/dev/dri! 2: No such file or directory
> Failed to change owner or group for file
> 	/dev/dri/card0! 2: No such file or directory
> [drm] failed to load kernel module "nouveau"
>=20
> (EE) [drm] drmOpen failed.
> (EE) NOUVEAU(0): [drm] error opening the drm
> Segmentation fault: 11 at address 0x0
> Fatal server error:
> Caught signal 11 (Segmentation fault: 11). Server aborting
>=20
> The kernel loggs the following messages:
>=20
> link_elf_obj: symbol DRM_MEM_TTM undefined
> linker_load_file: Unsupported file type
>=20
> I tried some searching and found "We can haz Nouveau
> on FreeBSD!" of March 2009. According to this instruction:
>=20
> http://romain.blogreen.org/blog/2009/03/we-can-haz-nouveau-on-freebsd/
>=20
> It complains about xorg-server must be >=3D 1.8, but
> only 1.7.7 is in latest ports (right now). This is
> step 4 on the list. Note that it's "./autogen.sh",
> not "./autogen" as in the article.
>=20
> The steps explained are:
>=20
> 1. Uninstall any nvidia driver
> # pkg_delete nvidia-driver-\*
> # vi /boot/loader.conf # Remove the line 'nvidia_load=3D"YES"'
>=20
> 2. Patch your kernel (Update your system if you are not running 8.0-CURRE=
NT or a recent 7.1-STABLE / 7.2-PRERELEASE):
> # cd /usr/src/sys
> # fetch http://people.freebsd.org/~rnoland/drm-nouveau-032109.patch
> # mkdir modules/drm/nouveau
> # patch > drm-nouveau-032109.patch
> # cd /usr/src && make kernel
> # reboot
>=20
> 3. Install libdrm from git:
> % git clone git://anongit.freedesktop.org/git/mesa/drm
> % cd drm
> % ./autogen --enable-nouveau-experimental-api
> % gmake
> % sudo gmake install
>=20
> 4. Install xf86-video-nouveau from git:
> % git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau
> % cd xf86-video-nouveau
> % ./autogen
> % gmake
> % sudo gmake install
>=20
> 5. Update /usr/local/etc/X11/xorg.conf.
>=20
> As I said, I have problems doing so because of
>=20
> nouveau_dri2.c:374: warning: implicit declaration of function 'DRI2BlockC=
lient'
> nouveau_dri2.c: In function 'nouveau_dri2_init':
> nouveau_dri2.c:445: error: 'DRI2InfoRec' has no member named 'ScheduleSwa=
p'
> nouveau_dri2.c:446: error: 'DRI2InfoRec' has no member named 'ScheduleWai=
tMSC'
> nouveau_dri2.c:447: error: 'DRI2InfoRec' has no member named 'GetMSC'
> gmake[2]: *** [nouveau_dri2.lo] Error 1
> gmake[2]: Leaving directory `/usr/src/sys/drm/xf86-video-nouveau/src'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/usr/src/sys/drm/xf86-video-nouveau'
> gmake: *** [all] Error 2
>=20
> and so on.
>=20
>=20
>=20
> So my questions are:
>=20
> Has anyone got the "nouveau" driver working, and if,
> how precisely has he done so?

Yes. I got it working once by following the package instructions but
on a subsequent system upgrade it stopped working and all my efforts
to get it working again have been unsuccessful.

>=20
> Is there an explaination of the lockups (always only
> in relation to Gtk+ triggering it)? Does it indicate
> a defective driver or a defective hardware? What do
> you think?

It doesn't seem to make sense. Have you got something missing/added to
xorg.conf that's causing it?

My xorg.conf:

Section "ServerLayout"
	Identifier     "X.org Configured"
	Option	 "AutoAddDevices" "off"
        Option "DontZap" "off"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
#	RgbPath      "/usr/local/share/X11/rgb"
	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/URW/"
	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/"
	FontPath     "/usr/local/lib/X11/fonts/bitstream-vera/"
	FontPath     "/usr/local/lib/X11/fonts/webfonts/"
	FontPath     "/usr/local/lib/X11/fonts/local/"
EndSection

#Section "Module"
#	Load  "extmod"
#	Load  "record"
#	Load  "dbe"
#	Load  "glx"
#	Load  "GLcore"
#	Load  "xtrap"
#	Load  "dri"
#	Load  "freetype"
##	Load  "type1"
#EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option "CoreKeyboard"
	Option "XkbRules"  "xorg"
#	Option "XkbLayout"  "qwerty"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "gb"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option      "CorePointer"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
#	Option      "Emulate3Buttons" "false"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "IVM"
        ModelName    "PLE480/481"
 ### Comment all HorizSync and VertRefresh values to use DDC:
        HorizSync    24.0 - 83.0
        VertRefresh  55.0 - 76.0
        Option      "DPMS"
#	Modeline "1280x1024"   108.00   1280 1336 1448 1688   1024 1025 1028 1066=
 +hsync +vsync
	Modeline "1920x1200"   193.25   1920 2068 2268 2592   1200 1203 1209 1245 =
-hsync +vsync
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
	Identifier  "Card0"
	#Driver      "nouveau"
	#Driver      "nvidia"
	Driver      "nv"
	VendorName  "nVidia Corporation"
	BoardName   "NV44 [GeForce 6200 TurboCache(TM)]"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultColorDepth 24
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

BTW, I don't use HAL.

>=20
> I have _never_ encountered such kind of problems yet,
> so I'm almost out of ideas. Sadly I can't check with
> my (wonderfully working) ATI card because this one
> is AGP, but the mainboard only has PCIe.
>=20
> Any ideas and instructions, as well as diagnosis-guessing
> is very welcome. :-)
>=20

I don't have any ideas but I wish the nouveau driver port would get
some love and attention.

Downloading and applying patches etc. should be automatic shouldn't
it? It seems rather "brittle" too.


Regards,

--=20

 Frank

 Contact info: http://www.shute.org.uk/misc/contact.html



--DocE+STaALJfprDB
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iEYEARECAAYFAk5HORcACgkQHduKvUAgeK75qQCgjyNdwlBGgLSOw22vMKeaWcrg
1gUAoJSBscATm+IboOxgThAQU70XHIHD
=bZ5R
-----END PGP SIGNATURE-----

--DocE+STaALJfprDB--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20110814025520.GA75595>