Bug 21363 - unable to find a valid framebuffer device with UseFBDev
Summary: unable to find a valid framebuffer device with UseFBDev
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: xserver-1.7
  Show dependency treegraph
 
Reported: 2009-04-23 11:21 UTC by Stefan Schweizer
Modified: 2009-09-08 23:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
try graphics:fb%d and graphics/fb%d (699 bytes, patch)
2009-09-07 23:12 UTC, Daniel Stone
no flags Details | Splinter Review

Description Stefan Schweizer 2009-04-23 11:21:19 UTC
With linux kernel 2.6.29.1 xorg is unable to find my
framebuffer device when I turn on UseFBDev (see log below).

The following patch seems to fix it.

--- xorg-server-1.6.1.orig/hw/xfree86/fbdevhw/fbdevhw.c 2009-04-23 20:04:20.000000000 +0200
+++ xorg-server-1.6.1/hw/xfree86/fbdevhw/fbdevhw.c      2009-04-23 20:04:55.000000000 +0200
@@ -314,7 +314,7 @@
 
     for (i = 0; i < 8; i++) {
        sprintf(filename, 
-               "/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics/fb%d",
+               "/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics:fb%d",
                pPci->domain, pPci->bus, pPci->dev, pPci->func, i);
 
        fd = open(filename, O_RDONLY, 0);


(II) Loading /usr/lib/xorg/modules//libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
        compiled for 1.6.1, module version = 0.1.0
        ABI class: X.Org Video Driver, version 5.0
(--) MGA(0): Chipset: "mgag400" (G400)
(**) MGA(0): Depth 24, (--) framebuffer bpp 32
(==) MGA(0): RGB weight 888
(**) MGA(0): Option "HWcursor" "off"
(**) MGA(0): Option "UseFBDev" "true"
(==) MGA(0): Using AGP 1x mode
(**) MGA(0): Using SW cursor
(==) MGA(0): Using XAA acceleration
(**) MGA(0): Using framebuffer device
(II) Loading sub module "fbdevhw"
(II) LoadModule: "fbdevhw"
(II) Loading /usr/lib/xorg/modules/linux//libfbdevhw.so
(II) Module fbdevhw: vendor="X.Org Foundation"
        compiled for 1.6.1, module version = 0.0.2
        ABI class: X.Org Video Driver, version 5.0
(WW) open /dev/fb2: No such file or directory
(WW) open /dev/fb3: No such file or directory
(WW) open /dev/fb4: No such file or directory
(WW) open /dev/fb5: No such file or directory
(WW) open /dev/fb6: No such file or directory
(WW) open /dev/fb7: No such file or directory
(EE) Unable to find a valid framebuffer device
(EE) MGA(0): Failed to open framebuffer device, consult warnings and/or errors above for possible reasons
        (you may have to look at the server log to see warnings)
Comment 1 Michel Dänzer 2009-09-01 01:26:09 UTC
With a 2.6.30.y kernel I have ../graphics/fb0 not .../graphics:fb0. If this was changed in the kernel, fbdevhw probably needs to look for both.
Comment 2 Stefan Schweizer 2009-09-01 02:15:13 UTC
(In reply to comment #1)
> With a 2.6.30.y kernel I have ../graphics/fb0 not .../graphics:fb0. If this was
> changed in the kernel, fbdevhw probably needs to look for both.

Hmm, I just rechecked on a vanilla 2.6.30.2 kernel and I have graphics:fb0.

# ls -l /sys/bus/pci/devices/0000:01:00.0
-r--r--r-- 1 root root     4096  1. Sep 11:05 boot_vga
-rw-r--r-- 1 root root     4096  1. Sep 11:05 broken_parity_status
lrwxrwxrwx 1 root root        0  1. Sep 11:05 bus -> ../../../../bus/pci
-r--r--r-- 1 root root     4096 31. Aug 19:09 class
-rw-r--r-- 1 root root      256 31. Aug 19:09 config
-r--r--r-- 1 root root     4096 31. Aug 19:09 device
lrwxrwxrwx 1 root root        0 31. Aug 19:09 driver -> ../../../../bus/pci/drivers/matroxfb
lrwxrwxrwx 1 root root        0  1. Sep 11:05 drm:card0 -> ../../../../class/drm/card0
-rw------- 1 root root     4096  1. Sep 11:05 enable
lrwxrwxrwx 1 root root        0 31. Aug 19:09 graphics:fb0 -> ../../../../class/graphics/fb0
lrwxrwxrwx 1 root root        0  1. Sep 11:05 i2c-adapter:i2c-3 -> ../../../../class/i2c-adapter/i2c-3
lrwxrwxrwx 1 root root        0  1. Sep 11:05 i2c-adapter:i2c-4 -> ../../../../class/i2c-adapter/i2c-4
lrwxrwxrwx 1 root root        0  1. Sep 11:05 i2c-adapter:i2c-5 -> ../../../../class/i2c-adapter/i2c-5
-r--r--r-- 1 root root     4096  1. Sep 11:05 irq
-r--r--r-- 1 root root     4096  1. Sep 11:05 local_cpulist
-r--r--r-- 1 root root     4096  1. Sep 11:05 local_cpus
-r--r--r-- 1 root root     4096  1. Sep 11:05 modalias
-rw-r--r-- 1 root root     4096  1. Sep 11:05 msi_bus
drwxr-xr-x 2 root root        0  1. Sep 11:05 power
--w--w---- 1 root root     4096  1. Sep 11:05 remove
--w--w---- 1 root root     4096  1. Sep 11:05 rescan
-r--r--r-- 1 root root     4096 31. Aug 19:09 resource
-rw------- 1 root root 33554432  1. Sep 11:05 resource0
-rw------- 1 root root 33554432  1. Sep 11:05 resource0_wc
-rw------- 1 root root    16384  1. Sep 11:05 resource1
-rw------- 1 root root  8388608 31. Aug 19:09 resource2
-r-------- 1 root root    65536 31. Aug 19:09 rom
lrwxrwxrwx 1 root root        0 31. Aug 19:08 subsystem -> ../../../../bus/pci
-r--r--r-- 1 root root     4096 31. Aug 19:09 subsystem_device
-r--r--r-- 1 root root     4096 31. Aug 19:09 subsystem_vendor
-rw-r--r-- 1 root root     4096  1. Sep 11:05 uevent
-r--r--r-- 1 root root     4096 31. Aug 19:09 vendor
Comment 3 Daniel Stone 2009-09-07 23:12:57 UTC
Created attachment 29327 [details] [review]
try graphics:fb%d and graphics/fb%d

how about this? michel?
Comment 4 Michel Dänzer 2009-09-08 03:08:03 UTC
(In reply to comment #3)
> how about this? michel?

Looks good to me, thanks Daniel.
Comment 5 Daniel Stone 2009-09-08 23:30:20 UTC
pushed to master, cheers


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.