Solved X does not start - DRM modules?

Hi,

I upgraded to 9.3-RELEASE-p13 using freebsd-update(8). I then removed all ports, emptied /usr/local (the old library version were creating a mess of problems) and re-installed most packages.

I can't start X11 now, when I run startx, it does not start and I see this on the console and in the Xorg.log:

Code:
[  89.201] (EE) Failed to load module "fbdevhw" (invalid module, 0)
[  89.201] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  89.201] (II) RADEON(0): Creating default Display subsection in Screen section
  "Builtin Default ati Screen 0" for depth/fbbpp 24/32
[  89.201] (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
[  89.201] (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[  89.201] (==) RADEON(0): Default visual is TrueColor
[  89.201] (==) RADEON(0): RGB weight 888
[  89.201] (II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
[  89.201] (--) RADEON(0): Chipset: "ATI Radeon IGP330M/340M/350M (U2) 4337" (ChipID = 0x4337)
[  89.581] (EE) RADEON(0): [drm] Failed to open DRM device for pci:0000:01:05.0: No such file or directory
[  89.581] (EE) RADEON(0): Kernel modesetting setup failed
[  89.581] (II) UnloadModule: "radeon"
[  89.581] (EE) Screen(s) found, but none have a usable configuration.
[  89.581] (EE)
Fatal server error:
[  89.581] (EE) no screens found(EE)
[  89.581] (EE)

At the same time, I see these kernel messages, which are related for sure:

Code:
KLD drm2_port.ko: depends on kernel - not available or version mismatch
KLD radeonkms_port.ko: depends on drmn_port - not available or version mismatch

Clearly the radeon driver is not missing because the drm2. Where should drm2_port.ko come from? The kernel itself or a port?

I checked and see this:

% ls /boot/kernel/drm*
/boot/kernel/drm.ko /boot/kernel/drm2.ko
/boot/kernel/drm.ko.symbols /boot/kernel/drm2.ko.symbols


Should there be a drm2_port.ko module or is it part of drm2? I checked on another freebsd FreeBSD 9.3 box and it is not there either.

Riccardo
 
Since the new Xorg needs features not available in the drivers that came with FreeBSD 9.3, x11-drivers/drm-kmod came about to provide the new features. That port provides /boot/modules/drm2_port.ko. You may need to pkg install drm-kmod.
 
I had this package installed, to be sure I reinstalled it ( portupgrade -f drm-kmod)

Code:
% pkg info | grep drm
drm-kmod-9.280208  FreeBSD 9.3 Kernel DRM driver
libdrm-2.4.60,1  Userspace interface to kernel Direct Rendering Module services

Find reveals I have this package here:
/boot/modules/drm2_port.ko

Perhaps it is the wrong place? Perhaps my kernel needs to be instructed to look for modules in /boot/modules? All the others are in /boot/kernel

Thank you.
 
Per hier(7), /boot/modules is the correct place for third party kernel modules. When x11-drivers/drm-kmod got installed, was the source code in /usr/src the correct source code for FreeBSD 9.3? That's the only thing I can think of right now that make sense for the "version mismatch" error you are seeing.
 
1. /usr/src/sys/conf/newvers.sh will list the version and patch level.

Let's figure out what the version is first. You mentioned upgrading with freebsd-update(8) and assuming you are using the default configuration then the /usr/src directory would get upgraded to 9.3-RELEASE-p13 along with the rest of the system.
 
I can't execute that command, it has no +x
If I give it, or execute sh newvers.sh, I get nothing.

However it contains:
Code:
TYPE="FreeBSD"
REVISION="9.3"
BRANCH="RELEASE-p13"
thus it looks like latest.

the sources where not installed by update, but since I found a tarball, installed by me with tar xzpvf src_stable_9.tar.gz. Perhaps this was wrong?
 
Ok. That just defines the variables for version. You don't manually execute it. So it would appear that it is already the correct version.

The naming convention for the tarball you used looks odd. Where was that source from? If that is a legitimate version and the newvers.sh file reflects the correct version then it should be good.

Another option here is to just used devel/subversion or devel/git-lite to checkout the source. See https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/svn.html.
 
If this were me, the first thing I would do is install those DRM modules from a port rather than a package. Actually, make that the second thing. The first thing would be to upgrade to 10.1.
 
Ok. That just defines the variables for version. You don't manually execute it. So it would appear that it is already the correct version.

The naming convention for the tarball you used looks odd. Where was that source from? If that is a legitimate version and the newvers.sh file reflects the correct version then it should be good.

I got it from here:
ftp://ftp.freebsd.org/pub/FreeBSD/development/tarballs/

If you see the name conventions are those, I hope the content is the same? In can perhaps remove everything in /usr/src and substitute it with:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/9.3-RELEASE/src.txz

It is interesting that the latter is smaller! Would you advise going that route?

I'd rather stay with the 9.x series, they should be supported for some time to come. I have my workstation on 9.x and a laptop on 10.1 instead

I have installed the drm modules by compiling the port myself, I redid that yesterday with portupgrade.

Perhaps the problem is with the installed kernel? May I reinstall it? How?
Perhaps I can extract it from ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/9.3-RELEASE/kernel.txz
 
If this were me, the first thing I would do is install those DRM modules from a port rather than a package. Actually, make that the second thing. The first thing would be to upgrade to 10.1.

I usually update my system using portupgrade, thus I assume it is also better to install everything by compiling, or I fear it will break the next cycle, but it is easy to test. As soon as we sort the sources problem out, I can install the binary, where is it on the ftp?
 
A port is built from source. That is the way to go here, because it will be built to fit what is present on the system.
 
I was building from source, but using the sources in:ftp://ftp.freebsd.org/pub/FreeBSD/development/tarballs/
Now I replaced them from sources of: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/9.3-RELEASE/src.txz
And the module now loads and I get X!
I still have problems, like on X closure I get strange artifacts and apparently the console doesn't get back, but that is a different problem I guess. The specific problem of this thread related to the module is solved.
I wonder why the sources are different...
 
The source in those development tarballs is from 9.3-STABLE, not 9.3-RELEASE. It includes all the development that's happened since 9.3-RELEASE came out.
 
Back
Top