On 03/15/14 04:34, stompdagg...@yahoo.com wrote:
here is a simple test case that reproduces the issue on my machine:
dagg@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@NCC-5001-D ~/workspace $ gcc open_example.c -o open_example && ./open_example
fd = -1, status = ERROR: Invalid argument


On Friday, March 14, 2014 4:22 PM, "stompdagg...@yahoo.com" <stompdagg...@yahoo.com> wrote: On Tuesday, March 11, 2014 8:45 AM, "stompdagg...@yahoo.com" <stompdagg...@yahoo.com> wrote: >On Tuesday, March 11, 2014 5:16 AM, Michel Dänzer <mic...@daenzer.net> wrote: >On Mon, 2014-03-10 at 08:23 -0700, stompdagg...@yahoo.com <mailto:stompdagg...@yahoo.com> wrote:
>
>>
>>
>> >On Monday, March 10, 2014 5:58 AM, Michel Dänzer <mic...@daenzer.net <mailto:mic...@daenzer.net>>
>> wrote:
>>
>> >On Sam, 2014-03-08 at 11:41 -0800, stompdagg...@yahoo.com <mailto:stompdagg...@yahoo.com> wrote:
>> >
>> >> >On Sat, Mar 8, 2014 at 2:56 AM, stompdagg...@yahoo.com <mailto:stompdagg...@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@NCC-5001-D <mailto:dagg@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?

I had a similar problem over the last weeks using kernel 3.13.x Not sure it happened before with older kernels. I am using a "from scratch" distro. It's using systemd and glibc-2.19, with relatively recent Xorg and Mesa development.
I have a Radeon 4870.  I don't think it's the video card.
Tentatively what happens is I lose the /dev/dri/card0 and the display goes black. I get "no usable screens found" in the Xorg.0.log file. Anyway what seems to be causing the problem is If I leave a music CD in the CD drive, upon booting, timing issues or something cause the dri/card0 device to go away. There are a lot of messages in the kernel log, where it's trying to find out about the music CD.
X seems to come up fine with no music CD in the drive.

Fred


_______________________________________________
xorg@lists.x.org <mailto:xorg@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@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@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

Reply via email to