Bug 853268

Summary: inteldrmfb driver emulation of fbdev interface incomplete
Product: [Fedora] Fedora Reporter: Gerry Reno <greno>
Component: directfbAssignee: Matthias Saou <matthias>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17CC: dwmw2, kwizart, matthias, samuel-rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 03:36:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gerry Reno 2012-08-30 23:57:30 UTC
Description of problem:
On new HP laptop with Intel i7 Ivy Bridge CPU w/iGPU (Intel HD4000) plus Nvidia Geforce GT 650M.
inteldrmfb driver emulation of fbdev interface appears to be incomplete.

Version-Release number of selected component (if applicable):
special test version of directfb 1.6.1

How reproducible:
Always

Steps to Reproduce:
1. install F17 directfb 1.6.1 from koji build by Tom Callaway (see dev mailing list)
2. setup /root/.directfbrc file to use fbdev mode
2. su
3. dfbinfo
  
Actual results:
# dfbinfo

       ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.6.1 |~~~~~~~~~~~~~~~~~~~~~~~~~~
            (c) 2001-2012  The world wide DirectFB Open Source Community
            (c) 2000-2004  Convergence (integrated media) GmbH
          ----------------------------------------------------------------

    (*) DirectFB/Core: Single Application Core. (2012-08-29 21:15)
    (*) Direct/Memcpy: Using libc memcpy()
...
    (*) DirectFB/Core/WM: Default 0.3 (directfb.org)
     (!!!)  *** ONCE [no mode found for 1024x768] *** [fbdev.c:1354 in dfb_fbdev_find_mode()]
    (*) FBDev/Mode: Setting 1024x768 RGB32
    (*) FBDev/Mode: Switched to 1024x768 (virtual 1024x768) at 32 bit (RGB32), pitch 7680
    (!) DirectFB/FBDev: Could not set gamma ramp    --> Invalid argument
    (*) FBDev/Mode: Setting 1024x768 RGB16
    (*) FBDev/Mode: Switched to 1024x768 (virtual 1024x768) at 16 bit (RGB16), pitch 7680
    (!) DirectFB/FBDev: Could not set gamma ramp    --> Invalid argument


Expected results:
inteldrmfb fbdev emulation successful

Additional info:
See dev mailing list for more details.

Comment 1 Gerry Reno 2012-08-31 00:01:28 UTC
# cat /etc/udev/rules.d/40-permissions.rules 
KERNEL=="fb[0-9]*",                     GROUP="video", MODE="0666"
KERNEL=="tty[0-9]*",                    GROUP="tty", MODE="0666"
KERNEL=="mice",                         MODE="0666"
#
# cat /root/.directfbrc 
system=fbdev
depth=16
mode=1024x768
autoflip-window
force-windowed

Comment 2 Nicolas Chauvet (kwizart) 2012-09-07 14:32:08 UTC
Did you tried to boot with nomodeset ?

Comment 3 Gerry Reno 2012-09-07 16:06:23 UTC
Using 1.5.3-8 package with nomodeset I get this:

----------- regular user ------------
$ dfbinfo

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.5.3 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2010  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2012-08-30 21:37) 
(*) Direct/Memcpy: Using libc memcpy()
(!) DirectFB/fbdev/vt: K_MEDIUMRAW failed!
    --> Operation not permitted
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> A general initialization error occured
(#) DirectFBError [DirectFBCreate() failed]: A general initialization error occured



----------- root user ------------
# dfbinfo
gives me a totally blue screen and no keyboard response.
Have to use power button to recover.

.

Comment 4 Gerry Reno 2012-09-09 15:33:14 UTC
Again using 1.5.3-8 package with nomodeset:

I built the directfb 1.5.3 examples and tried running df_andi:

----------- root user ------------
# df_andi

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.5.3 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2010  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2012-08-30 21:37) 
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/FBDev: Found 'VESA VGA' (ID 0) with frame buffer at 0xc0000000, 8128k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Power Button (1) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: AT Translated Set 2 keyboard (2) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Video Bus (3) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Hewlett-Packard  HP f2100a Opti (4) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Video Bus (5) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: SynPS/2 Synaptics TouchPad (6) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Logitech Logitech Illuminated K (7) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Logitech Logitech Illuminated K (8) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: ST LIS3LV02DL Accelerometer (9) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: HP Truevision HD (10) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: HP WMI hotkeys (11) 0.1 (directfb.org)
(*) Direct/Thread: Started 'Hotplug with Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input Driver 
(*) Direct/Thread: Started 'Keyboard Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) Direct/Thread: Started 'PS/2 Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) DirectFB/Genefx: MMX detected and enabled
(*) DirectFB/Graphics: MMX Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) FBDev/Mode: Setting 1024x768 RGB16
(*) FBDev/Mode: Switched to 1920x1080 (virtual 1920x1080) at 32 bit (RGB16), pitch 7680
(#) DirectFBError [Failed to get exclusive access]: Access to the resource is denied
df_andi.c <488>:
	(#) DirectFBError [layer->TestConfiguration( layer, &config, &ret_failed )]: The requested operation or an argument is (currently) not supported
 (!!!)  *** WARNING [Application exited without deinitialization of DirectFB!] *** [core.c:1068 in dfb_core_deinit_check()]
 (!!!)  *** WARNING [still objects in 'Layer Region Pool'] *** [object.c:239 in fusion_object_pool_destroy()]
 (!!!)  *** WARNING [still objects in 'Layer Context Pool'] *** [object.c:239 in fusion_object_pool_destroy()]
 (!!!)  *** WARNING [still objects in 'Surface Pool'] *** [object.c:239 in fusion_object_pool_destroy()]
(!) DirectFB/core/vt: Unable to disallocate VT!
    --> Device or resource busy

.

Comment 5 Nicolas Chauvet (kwizart) 2012-09-15 15:47:36 UTC
This should be fixed with new version - an old patch produced this issue.

Comment 6 Fedora Update System 2012-09-15 15:49:30 UTC
directfb-1.5.3-9.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/directfb-1.5.3-9.fc17

Comment 7 Fedora Update System 2012-09-15 15:51:46 UTC
directfb-1.5.3-9.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/directfb-1.5.3-9.fc16

Comment 8 Nicolas Chauvet (kwizart) 2012-09-15 15:55:32 UTC
At least, it should fix:
(!) DirectFB/core/vt: Unable to disallocate VT!
    --> Device or resource busy

I cannot reproduce the other issue on intel

Comment 9 Gerry Reno 2012-09-15 16:17:29 UTC
(!) DirectFB/core/vt: Unable to disallocate VT!
    --> Device or resource busy

THIS IS NOT THE ISSUE IN THE BUG !

The issues are as outlined above when using Intel Ivy Bridge CPU and perhaps others.
---------
(!) DirectFB/fbdev/vt: K_MEDIUMRAW failed!
    --> Operation not permitted
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> A general initialization error occured
(#) DirectFBError [DirectFBCreate() failed]: A general initialization error occured
---------
     (!!!)  *** ONCE [no mode found for 1024x768] *** [fbdev.c:1354 in dfb_fbdev_find_mode()]
    (*) FBDev/Mode: Setting 1024x768 RGB32
    (*) FBDev/Mode: Switched to 1024x768 (virtual 1024x768) at 32 bit (RGB32), pitch 7680
    (!) DirectFB/FBDev: Could not set gamma ramp    --> Invalid argument
---------
(*) FBDev/Mode: Switched to 1920x1080 (virtual 1920x1080) at 32 bit (RGB16), pitch 7680
(#) DirectFBError [Failed to get exclusive access]: Access to the resource is denied
---------

.

Comment 10 Nicolas Chauvet (kwizart) 2012-09-15 16:43:34 UTC
(In reply to comment #9)
> (!) DirectFB/core/vt: Unable to disallocate VT!
>     --> Device or resource busy
> 
> THIS IS NOT THE ISSUE IN THE BUG !
Can you calm down boy ?

> The issues are as outlined above when using Intel Ivy Bridge CPU and perhaps
> others.
> ---------
> (!) DirectFB/fbdev/vt: K_MEDIUMRAW failed!
>     --> Operation not permitted
If it's a different issue than #852745 please submit a separate bug.
(so you are expected to run as root now).

Comment 11 Gerry Reno 2012-09-15 17:17:16 UTC
LOL. 

The K_MEDIUMRAW problem may be related to the setcap issue as well in #852745.

And I cannot expect all users to have root access - kind of the point of the exercise in #852745.

I'll open a separate bug for K_MEDIUMRAW although I think it's redundant.

.

Comment 12 Fedora Update System 2012-09-17 17:21:59 UTC
Package directfb-1.5.3-9.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing directfb-1.5.3-9.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14033/directfb-1.5.3-9.fc16
then log in and leave karma (feedback).

Comment 13 Gerry Reno 2012-09-17 19:38:01 UTC
Again 1.5.3-9 fix:
(!) DirectFB/core/vt: Unable to disallocate VT!
    --> Device or resource busy

Is not the issue in this bug.

If you want to fix this disallocate thing it should have been done under another bug not this one.

Please keep this bug open and do not let the auto system close the bug.

.

Comment 14 Nicolas Chauvet (kwizart) 2012-09-18 17:34:58 UTC
I can unlink this report from the update, but then it means I don't think this issue is related to directfb itself but something with the driver (kernel or userland part) or the xorg-x11-drv-fbdev xorg driver.

Specially I'm not reproducing this issue on a NM10 intel card.

That been said, please try to reproduce with Fedora 18 Alpha and directfb-1.6.1 from updates-testing.

Comment 15 Gerry Reno 2012-09-18 18:03:21 UTC
Are you talking about the Unable to disallocate VT issue?

Or the issues of this bug?

I was already able to reproduce the issues in this bug using directfb 1.6.1 under F17.  

Are you using a machine that has Intel iGPU?  Like i7 w/HD4000 plus a separate NVIDIA GPU as well?

.

Comment 16 Nicolas Chauvet (kwizart) 2012-09-18 18:31:07 UTC
Yep(In reply to comment #15)
> Are you talking about the Unable to disallocate VT issue?
> 
> Or the issues of this bug?
The issue which gave the name of this bug.
 
> I was already able to reproduce the issues in this bug using directfb 1.6.1
> under F17.  
Okay, but the interesting part would be if the kernel side has changed something.
> Are you using a machine that has Intel iGPU?  Like i7 w/HD4000 plus a
> separate NVIDIA GPU as well?
No, optimus is clearly another side of the problem.

Comment 17 Gerry Reno 2012-09-18 18:46:13 UTC
# uname -r
3.5.3-1.fc17.x86_64

I'm running a very recent kernel already.

.

Comment 18 Nicolas Chauvet (kwizart) 2012-11-11 11:02:59 UTC
Can you reproduce with a newer kernel.
Because according to the report title, this is not my bug, as the inteldrmfb driver live within the kernel.

Comment 19 Fedora End Of Life 2013-07-04 00:10:25 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 20 Fedora End Of Life 2013-08-01 03:36:55 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.