Bug 23792

Summary: Getting inverted colors after having launched Virtualbox with Nouveau driver
Product: xorg Reporter: Thomas PEGEOT <thomas.pegeot>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Dmesg before launching Virtualbox
none
Kernel log before launching Virtualbox
none
Xorg log before launching Virtualbox none

Description Thomas PEGEOT 2009-09-08 03:51:07 UTC
Hello,

Lauching Virtualbox on my computer makes the screen get inverted/negative colors when i open new qt/kde applications. If i focus on an older windows (launched before Virtualbox), the screen goes back to normal colors, and vice versa. When the colors are inverted, my screen looks like this : http://bbs.archlinux.org/viewtopic.php?id=77040 (it's not my thread). 
Restarting X solves the problem. ;)

The kernel (master branch), mesa, libdrm, xf86-video-nouveau were compiled this morming from the git repos. ;)

I got this problem for the first time about 1 month ago but I didn't really know whether this problem was related to nouveau or not...

I use KDE with compositing (via Xrender) and toggling off compositing doesn't solve the problem. 

This morning i tried the NV driver, and this problem didn't occur. 

My graphic card : 05:00.0 VGA compatible controller: nVidia Corporation NV41.1 [GeForce 6800] (rev a2)

Feel free to ask if you have any further questions. 

Regards

Thank you in advance!
Comment 1 Thomas PEGEOT 2009-09-12 03:36:16 UTC
How can i find out where this problem comes from ? How can i debug this bad behaviour ? 

Thank you.
Comment 2 Maarten Maathuis 2009-09-12 04:03:11 UTC
At the very least give some kernel and xorg logs.
Comment 3 Thomas PEGEOT 2009-09-18 04:59:49 UTC
Created attachment 29663 [details]
Dmesg before launching Virtualbox
Comment 4 Thomas PEGEOT 2009-09-18 05:00:36 UTC
Created attachment 29664 [details]
Kernel log before launching Virtualbox
Comment 5 Thomas PEGEOT 2009-09-18 05:01:38 UTC
Created attachment 29665 [details]
Xorg log before launching Virtualbox
Comment 6 Thomas PEGEOT 2009-09-18 05:04:53 UTC
Here are the different logs you ask for. ;)

After having launched Virtualbox, the following lines are added to the kern.log : 
gentoo thomas # diff kern.log /var/log/kern.log
8936a8937,8940
> Sep 18 13:57:16 gentoo kernel: [  349.772788] warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)
> Sep 18 13:57:18 gentoo kernel: [  351.947281] nouveau 0000:05:00.0: Allocating FIFO number 2
> Sep 18 13:57:18 gentoo kernel: [  351.948771] nouveau 0000:05:00.0: nouveau_channel_alloc: initialised FIFO 2
> Sep 18 13:57:18 gentoo kernel: [  352.103528] nouveau 0000:05:00.0: nouveau_channel_free: freeing fifo 2

Thank you in advance! ;)

Regards.
Comment 7 Thomas PEGEOT 2009-09-26 04:55:34 UTC
Disabling opengl in Virtualbox solved the problem. ;) I even didn't know that it was enabled ... :( 

Comment 8 Pekka Paalanen 2009-09-26 07:04:12 UTC
(In reply to comment #7)
> Disabling opengl in Virtualbox solved the problem. ;) I even didn't know that
> it was enabled ... :( 

Were you using the Nouveau Gallium/DRI driver or swrast?

The description sounds like VirtualBox sets up a window palette, a feature from the dark ages. X desktop was 256-color so it used a palette. If an application set up its own palette, all other windows would draw with "bad" colors while the application had focus. IIRC.
Is you X in 256-color paletted mode? I don't know if we even support that, so all this is unlikely.
Comment 9 Thomas PEGEOT 2009-09-27 04:47:15 UTC
> Were you using the Nouveau Gallium/DRI driver or swrast?
Actually, I've been using the Mesa ebuild from the X11 overlay for a while with gallium support enabled, as well as Nouveau (VIDEO_CARDS="nouveau)". 
What is swrast? 

> Is you X in 256-color paletted mode? I don't know if we even support that, so
all this is unlikely.
According to xdpyinfo, the default number of colormap cells is 256. Is that what you want to know ? If i'm wrong, just tell me where i can find this and i'll tell you. ;)
Comment 10 Pekka Paalanen 2009-09-27 05:13:38 UTC
(In reply to comment #9)
> Actually, I've been using the Mesa ebuild from the X11 overlay for a while with
> gallium support enabled, as well as Nouveau (VIDEO_CARDS="nouveau)". 

Okay, that is enough to make this report invalid. We do not take Gallium3D bugs yet.

> What is swrast? 

The Mesa software rasterizer, the only supported OpenGL renderer for Nouveau at this time. glxinfo would say:
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer

> According to xdpyinfo, the default number of colormap cells is 256. Is that
> what you want to know ? If i'm wrong, just tell me where i can find this and
> i'll tell you. ;)

"Depth of root window". I bet you would know if you were in 256-color mode. Ever looked at 256-color gifs? Not to mention that anything OpenGL would probably refuse to work.

Comment 11 Thomas PEGEOT 2009-09-27 12:34:19 UTC
> Okay, that is enough to make this report invalid. We do not take Gallium3D bugs
> yet
I think I had the same problem even when gallium was disabled ... but i'm not sure about it. If i've time, i'll try it again. ;)
Anyway, i don't need OpenGL support in Virtualbox, disabling it is fine for me. Even disabling Gallium is ok. 

> "Depth of root window". I bet you would know if you were in 256-color mode.
> Ever looked at 256-color gifs? Not to mention that anything OpenGL would
> probably refuse to work.
Because of my English, i definitely missed the point about the 256-color mode. 
You're right, i would have known if i were using this crappy mode. :p

depth of root window:    24 planes

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.