New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xorg for Radeon 4xxx not loading kernel radeon modules #89
Comments
Does the switch to usb4bsd as the default usb stack mean that dports version of hal can assume working libusb, at least for 3.7+? In turn does that mean xorg-server can use hal as a default option? I am curious whether with these changes using hal more extensively and with fixing the broken WITH_GALLIUM version of dri / libGL (at least last time I tried it), whether Radeon 4xxx would start using the kernel drm modules again. Also there is a mechanism for detecting OS version numbers in FreeBSD ports, but is there something similar for DragonFly OS version numbers in dports? What about specifying specific architectures such as i386 or x86_64? |
It will take some time to switch all the ports, but yes, 3.7+ ports will be the same as freebsd which is to say they'll use U4b. FreeBSD uses ${OSVERSION} which is set to 9999999 for use. |
Do the latest patches to sysutils/hal still permit building dports from source for versions of DragonFly earlier than latest 3.7-DEVELOPMENT, which do not have usb4bsd as the default? The patches also work for cvs pkgsrc on DragonFly 3.7-DEVELOPMENT i386 and x86_64. |
I believe sysutils/hal builds equally well on 3.4, 3.6, and the 3.7 development branch. |
Actually looking at the patch patch-hald_freebsd_probing_probe-hiddev.c I wonder what are the right include lines for usb4bsd versus the old usb. Is the user expected to have a nonempty /usr/include/bus/usb directory if the user is using usb4bsd as the default in 3.7-DEVELOPMENT? Every now and then I experiment by moving aside /usr/include during a make installworld, so when I do this with current 3.7-DEVELOPMENT the new /usr/include/bus/usb directory is empty. For systems using usb4bsd should the includes possibly be: and not the current bus/usb/usb.h |
I just double checked my Release36 jail and my bleeding edge jail. Both have /usr/include/bus/usb directories with lots of headers. I believe the same locations are used for U4B as before. Unless my eyes are playing tricks with me, the second block of pseudo-code is identical to the first one, so I don't know what to do with that. In any case, like I said, systems/hal is building on all 3 supported branches right now. |
Yes, a system that was working prior to the change to U4B will have the old /usr/include/bus/usb headers. The question is what happens when some lunatic like me installs /usr/include from scratch by moving the old /usr/include and doing make installworld && make installkernel and getting a brand new /usr/include. For that case the /usr/include/bus/usb will be empty. Note that patch-hald_freebsd_probing_probe-usb2-device.c uses u4b not usb. I guess my concern is that /usr/include/bus/u4b reflects "the truth" while /usr/include/bus/usb is the old headers that may or may not be accurate as to what is now actually installed on a U4B system. |
the usb2 file (patch-hald_freebsd_probing_probe-usb2-device.c) is only compiled for the U4B scenario, so we don't need to think about the old usb support. I'm trying to get some confirmation on why you aren't seeing bus/usb headers get installed. If they are truly for the original usb then they should be removed with "make upgrade" but that is clearly not happening. |
okay, from initial discussions it seems you caught a problem. standby... |
Just check the modification times in /usr/include/bus/usb. They are probably months old files. Whereas the files in /usr/include/bus/u4b will be newer. My experiment is something like cd /usr Now one has a brand new /usr/include with empty /usr/include/bus/usb. Here's another way to look at what I am questioning. Is /usr/include/usb/usb.h guaranteed to always be the same as /usr/include/u4b/usb.h, and the same for usbhid.h? I believe the u4b directory is the truth and usb is the older possibly non-truth. |
From what I'm hearing:
That should remove the ambiguity (swildner didn't think it was necessary but I convinced him to do that) |
Does that mean the sysutil/hal patches should be changed to use bus/u4b/usb.h It seems to me that it would be possibly to clean out /usr/include/bus/usb and then install the u4b headers also into /usr/include/bus/usb? Should userland even need to know there is a separate u4b directory in /usr/include/bus? It's too bad that the backwards compatibility problems are probably too great to synch DragonFly with every other BSD I know of and simply use /usr/include/dev/usb for the headers ... |
yeah, hal patches need to be fixed. |
Dillon doesn't want dev to be used, he thinks that is a mistake, so it's different by design. |
I am very concerned about how to compile hald/freebsd/hf-usb.c under U4B. There are many constants in the old usb/usb.h that do not seem to have an analogous definition anywhere in U4B such as USB_MAX_DEVNAMES. struct usb_device_info is actually declared in u4b/usb_ioctl.h instead of formerly usb/usb.h. Furthermore the old struct usb_device_info has fields that have no analog in U4B such as udi_devnames. |
While I haven't tried to update hal myself, I trust that this may be a major challenge. As far as dports is concerned, there will be a push to remove hal from all the dports as has already been done for xorg. That doesn't address pkgsrc though. I am not sure of the best approach yet. Is it worth disabling USB functionality on hal on U4B systems? Likely that would not be a good solution as mice and keyboards not working would be noticed. Ideally hal would be removed from option lists for dragonfly on pkgsrc as well. It would be nice to know which major packages would need modication (e.g. KDE4, XFCE4, Xorg) |
okay, these patches are surely invalid but at least hal builds with the last master: I'm going to send profmakx the link so he can at least restore the ports[i] functionality which must be in there somewhere. |
For current dports master through commit 84cdd88
and a bit earlier, building x11/xorg and x11-wm/xfce4 from source with current master DragonFly 3.9-DEVELOPMENT on both an Intel i3 and AMD machine with Radeon 4550 or Radeon 4350 graphics cards results in locked machines with eventual panic. Restoring to dports from around April 24, 2014, resulted in a system that could at least use Xorg with the vesa driver. From tailing /var/log/messages: Jun 5 15:37:40 kernel: info: [drm] Initialized drm 1.1.0 20060810 From the summary of the panic: Version String: DragonFly v3.9.0.44.g1b3d9-DEVELOPMENT #1: Thu Jun 5 08:46:47 PDT 2014 xxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC panic: page fault |
ftigeot, what is the status with this one? |
I have been focusing on drm/i915 lately and haven't touched drm/radeon in a while. |
As of current master through: commit dacf70b99fb315685679e484687c2f3c94e8ab49
which is after a series of changes improving drm/ttm, on both DragonFly 3.9-DEVELOPMENT x86_64 and i386, Radeon 4xxxx graphics cards now are able to match say FreeBSD 10-releng in loading kernel radeon modules. For i386, I changed /etc/make.conf to have the lines: WITH_NEW_XORG="YES" and then pkg delete -R libGL dri With x86_64 all I had to do was portmaster -d x11-drivers/xf86-video-ati Here's the very brief patch just reversing a previous patch: diff --git a/x11-drivers/xf86-video-ati/Makefile b/x11-drivers/xf86-video-ati/Makefile .include <bsd.port.options.mk> -.if ${DFLYVERSION} < 300951 || !defined(WITH_NEW_XORG) |
okay, ftigeot didn't object so I'll change this in DeltaPorts and then regenerate it in DPorts |
The previous commit incorrectly enabled xf86-video-ati 7.2 on DragonFly 3.8. |
do we need to keep this issue open? Does the problem still exist currently? |
xf86-video-ati appears to function as expected on both dragonfly 3.8.x and 3.9.x. |
There was a brief moment after the porting of the kernel radeon drivers where the kernel modules were loaded for Radeon 4xxx cards such as Radeon 4550 and 4350, but that was months ago. Since the new FreeBSD ports framework using WITH_NEW_XORG and WITH_GALLIUM was imported, even though these are not used in DragonFly Dports, the kernel modules are not being loaded.
$ kldstat
Id Refs Address Size Name
1 5 0xffffffff80200000 1545e30 kernel
2 1 0xffffffff81746000 816fd0 acpi.ko
3 1 0xffffffff81f5d000 56e58 ehci.ko
A sample from Xorg.0.log reads:
220.839 Falling back to old probe method for vesa
220.839 VGA arbiter: cannot open kernel arbiter, no multi-card support
220.839 RADEON(0): TOTO SAYS 00000000feaf0000
220.839 RADEON(0): MMIO registers at 0x00000000feaf0000: size 64KB
220.839 RADEON(0): PCI bus 1 card 0 func 0
220.839 RADEON(0): Creating default Display subsection in Screen section
"Builtin Default ati Screen 0" for depth/fbbpp 24/32
220.839 RADEON(0): Depth 24, (--) framebuffer bpp 32
220.839 RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
220.839 RADEON(0): Default visual is TrueColor
220.839 Loading sub module "vgahw"
220.839 LoadModule: "vgahw"
220.839 Loading /usr/local/lib/xorg/modules/libvgahw.so
220.840 Module vgahw: vendor="X.Org Foundation"
[ 220.840] compiled for 1.12.4, module version = 0.1.0
[ 220.840] ABI class: X.Org Video Driver, version 12.1
220.840 RADEON(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0
220.840 RADEON(0): RGB weight 888
220.840 RADEON(0): Using 8 bits per RGB (8 bit DAC)
220.840 RADEON(0): Chipset: "ATI Radeon HD 4350" (ChipID = 0x954f)
220.840 RADEON(0): Linear framebuffer at 0x00000000d0000000
220.840 RADEON(0): PCIE card detected
220.840 Loading sub module "int10"
220.840 LoadModule: "int10"
220.840 Loading /usr/local/lib/xorg/modules/libint10.so
220.842 Module int10: vendor="X.Org Foundation"
[ 220.842] compiled for 1.12.4, module version = 1.0.0
[ 220.842] ABI class: X.Org Video Driver, version 12.1
220.842 RADEON(0): initializing int10
220.846 RADEON(0): Primary V_BIOS segment is: 0xc000
220.847 RADEON(0): ATOM BIOS detected
220.847 RADEON(0): ATOM BIOS Rom:
[ 220.847] SubsystemVendorID: 0x1458 SubsystemID: 0x21ac
[ 220.847] IOBaseAddress: 0xd000
[ 220.847] Filename: R435OC9I.F3
[ 220.847] BIOS Bootup Message: GV-R435OC-512I/F3
220.847 RADEON(0): Framebuffer space used by Firmware (kb): 20
220.847 RADEON(0): Start of VRAM area used by Firmware: 0x7ffec
220.847 RADEON(0): AtomBIOS requests 20kB of VRAM scratch space
220.847 RADEON(0): AtomBIOS VRAM scratch base: 0x7ffec
220.847 RADEON(0): Cannot get VRAM scratch space. Allocating in main memory instead
220.847 RADEON(0): Default Engine Clock: 650000
220.847 RADEON(0): Default Memory Clock: 400000
220.847 RADEON(0): Maximum Pixel ClockPLL Frequency Output: 1200000
220.847 RADEON(0): Minimum Pixel ClockPLL Frequency Output: 0
220.847 RADEON(0): Maximum Pixel ClockPLL Frequency Input: 16000
220.847 RADEON(0): Minimum Pixel ClockPLL Frequency Input: 6000
220.847 RADEON(0): Maximum Pixel Clock: 400000
220.847 RADEON(0): Reference Clock: 27000
[ 220.847] drmOpenDevice: node name is /dev/dri/card0
[ 220.847] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[ 220.848] drmOpenDevice: open result is -1, (No such file or directory)
[ 220.848] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[ 220.848] drmOpenDevice: open result is -1, (No such file or directory)
[ 220.848] drmOpenDevice: Open failed
[ 220.848] [drm] failed to load kernel module "radeon"
220.848 RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM
[dri] Disabling DRI.
The text was updated successfully, but these errors were encountered: