RADEON(0): [drm] Failed to open DRM device: No such file or directory error

Alex Deucher alexdeucher at gmail.com
Sat Mar 15 06:33:42 PDT 2014


On Sat, Mar 15, 2014 at 4:34 AM, StompDagger1 at yahoo.com
<stompdagger1 at yahoo.com> wrote:
> here is a simple test case that reproduces the issue on my machine:
> dagg at NCC-5001-D ~/workspace $ cat open_example.c
> #include <unistd.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <errno.h>
> #include <string.h>
>
> int main()
> {
>         char *param1 = "ok";
>         char *param2 = ".";
>         int filedesc = open("/dev/dri/card1", O_RDWR, 0);
>         if (filedesc) {
>                 param1 = "ERROR: ";
>                 param2 = strerror(errno);
>         }
>         printf("fd = %d, status = %s%s\n", filedesc, param1, param2);
>         close(filedesc);
>
>         return 0;
> }dagg at NCC-5001-D ~/workspace $ gcc open_example.c -o open_example &&
> ./open_example
> fd = -1, status = ERROR: Invalid argument
>

Does booting with radeon.runpm=0 on the kernel command line in grub
fix it?  If so, it should be fixed with these patches:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9babd35ad72af631547c7ca294bc2e931cc40e58
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7848865914c6a63ead674f0f5604b77df7d3874f

Alex

>
> On Friday, March 14, 2014 4:22 PM, "StompDagger1 at yahoo.com"
> <stompdagger1 at yahoo.com> wrote:
> On Tuesday, March 11, 2014 8:45 AM, "StompDagger1 at yahoo.com"
> <stompdagger1 at yahoo.com> wrote:
>>On Tuesday, March 11, 2014 5:16 AM, Michel Dänzer <michel at daenzer.net>
>> wrote:
>>On Mon, 2014-03-10 at 08:23 -0700, StompDagger1 at yahoo.com wrote:
>>
>>>
>>>
>>> >On Monday, March 10, 2014 5:58 AM, Michel Dänzer <michel at daenzer.net>
>>> wrote:
>>>
>>> >On Sam, 2014-03-08 at 11:41 -0800, StompDagger1 at yahoo.com wrote:
>>> >
>>> >> >On Sat, Mar 8, 2014 at 2:56 AM, StompDagger1 at yahoo.com
>>> >> >
>>> >> >> [    51.829] (EE) RADEON(0): [drm] Failed to open DRM device for
>>> >> >> pci:0000:06:00.0: No such file or directory
>>> >
>>> >'No such file or directory' sounds like something is deleting
>>> >your /dev/dri/card* files, or not creating them in the first place.
>>> >Maybe check your udev setup.
>>> >
>>> >If it only happens with a 3.13 kernel but not with a 3.12 one,
>>> another
>>> >option is to bisect the kernel.
> .>
> .> Greetings Michel,
> .>
> .> dri node do exists, see:
>>> dagg at NCC-5001-D ~ $ ll /dev/dri
>>> total 0
>>> crw-rw----+ 1 root video 226,  0 Mar 10 09:27 card0
>>> crw-rw----+ 1 root video 226,  1 Mar 10 09:27 card1
>>> crw-rw----+ 1 root video 226,  2 Mar 10 09:27 card2
>>> crw-rw----  1 root video 226, 64 Mar 10 09:27 controlD64
>>> crw-rw----  1 root video 226, 65 Mar 10 09:27 controlD65
>>> crw-rw----  1 root video 226, 66 Mar 10 09:27 controlD66
>>>
>>> I think that the way to find the cause on my part is to check the
>>> origin of that msg in Xorg.log.
>>>
>>> is that a xserver msg or xf86-video-ati msg?
>>
>>
>>The message is from the radeon driver, but it's because drmOpen() in
>>libdrm fails. It would indeed be interesting to track down where the 'No
>>such file or directory' error originates from.
>
> will do, when I'll have more info, I'll update.
>
> Greetings Michel,
>
> I've tried to track the source if that error, I've enabled dbg prints in
> libdrm and found this:
> (II) [KMS] Kernel modesetting enabled.
> drmOpenDevice: node name is /dev/dri/card0
> drmOpenDevice: open result is 11, (OK)
> drmOpenByBusid: Searching for BusID pci:0000:06:00.0
> drmOpenDevice: node name is /dev/dri/card0
> drmOpenDevice: open result is 11, (OK)
> drmOpenByBusid: drmOpenMinor returns 11
> drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
> drmOpenDevice: node name is /dev/dri/card1
> drmOpenDevice: open result is -1, (Invalid argument)
> drmOpenByBusid: drmOpenMinor returns -22
> drmOpenDevice: node name is /dev/dri/card2
> drmOpenDevice: open result is -1, (Invalid argument)
>
> looking in the code I see this:
>     fd = open(buf, O_RDWR, 0);
>     drmMsg("drmOpenDevice: open result is %d, (%s)\n",
>                 fd, fd < 0 ? strerror(errno) : "OK");
>     if (fd >= 0)
>         return fd;
>
> I think that the issue might be that the file cannot be opened for that mode
> as the path is printed above and it is ok.
>
> any ideas what might it be?
>
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s
>
>
>
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s


More information about the xorg mailing list