Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5533 closed bug (fixed)

Colors Are Incorrect (Radeon X850)

Reported by: drcouzelis Owned by: euan
Priority: normal Milestone: R1
Component: Drivers/Graphics/radeon Version: R1/alpha1
Keywords: Colors Radeon X850 Cc:
Blocked By: Blocking:
Platform: All

Description

The colors are incorrect for the entire Haiku GUI. By "incorrect" I mean the wrong colors are used, and there is often a lot of pink and green. There are no graphical glitches; only the colors are incorrect. Please see the attached screenshot. I have a Radeon X850 XT PE video card. (Dec 2004, PCIe, codename "R480")

No bpp setting will fix the problem (8, 15, 16, 32 bpp). As a workaround, if I boot Linux, reboot, and then boot Haiku, then 32 bpp is almost correct and 16 bpp looks correct.

I assume the workaround works because Linux loads the Radeon "R420 microcode". Consider adding the microcode to Haiku. I will attach the microcode that is used in the Linux kernel for convenience.

This bug may be related to ticket #1700.

Attachments (5)

r35731-pink.jpg (121.2 KB ) - added by drcouzelis 14 years ago.
radeon_microcode.h (57.6 KB ) - added by drcouzelis 14 years ago.
Radeon microcode from the Linux kernel
r35752-syslog.txt (111.2 KB ) - added by drcouzelis 14 years ago.
Xorg.dvi-0.stretched.log (61.3 KB ) - added by drcouzelis 14 years ago.
BIOS and console are stretched, GUI looks good.
Xorg.dvi-1.linux-good-haiku-bad.log (66.7 KB ) - added by drcouzelis 14 years ago.
BIOS and Linux look good, Haiku has many video problems.

Download all attachments as: .zip

Change History (28)

by drcouzelis, 14 years ago

Attachment: r35731-pink.jpg added

by drcouzelis, 14 years ago

Attachment: radeon_microcode.h added

Radeon microcode from the Linux kernel

comment:1 by drcouzelis, 14 years ago

I just noticed these files: (in add-ons/kernel/drivers/graphics/radeon)

In "CP_setup.c":

  case rt_r300:
  case rt_rv350:
  case rt_r350:
  case rt_rv380:
  case rt_r420:
      microcode = r300_cp_microcode;

The microcode for "hrev420" is different from the "hrev300" microcode. I confirmed this by doing a diff of the latest Haiku hrev300 microcode (found in "CPMicroCode.h") and the hrev420 microcode from the Linux kernel.

Maybe making the update to support the hrev420 microcode will be a lot easier than I thought. ;-)

By the way, I'm still under the ASSUMPTION that Haiku is actually trying to load the "radeon" driver for my video card. I have not confirmed whether it is using "radeon" or "vesa". I'm still pretty much a Haiku newbie.

comment:2 by anevilyak, 14 years ago

If anything other than vesa shows up in /dev/graphics, then it most likely is. Two ways to check for sure: 1) get the team ID of app_server, and run: listimage team_id | grep accel to see what accelerant is loaded, or 2) open up the screen prefs. If they have options for refresh rate, multiple monitors, etc. then the radeon driver is in use.

comment:3 by drcouzelis, 14 years ago

I am work right now, but I do remember: when I open the "Screen" preferences, I do have options for resolution, BPP (8, 15, 16, 32), and refresh rate (60, 70, ...). I don't remember if it showed multiple monitors or not. I will double check everything you asked me about when I get home.

comment:4 by euan, 14 years ago

Hi,

I doubt it is the microcode, as X800's and 850's etc have been working fine (for those lucky people) for a long time. I'm not discounting the chance you are correct, but I would think its more likely to be a memory management / framebuffer configuration issue.

Please post your syslog so we can see what the driver is doing.

PS last person to touch the code becomes the new driver maintainer... ;)

comment:5 by anevilyak, 14 years ago

I can at least vouch for the X800XL working perfectly here (also PCIe).

comment:6 by scottmc, 14 years ago

This looks strangely familiar... http://dev.haiku-os.org/attachment/ticket/1169/Thinkpad-570-bad-colors.jpg Similar results, completely different chipset.

comment:7 by drcouzelis, 14 years ago

Ok, I can confirm it is using the "radeon" driver: "/dev/graphics" has

1002_5D4D_010000
vesa

And the "Screen" preferences gives me options for resolution, colors, refresh rate, combining displays, swapping displays, and the video format.

The syslog has a whole bunch of information about the Radeon card. I will attach it.

by drcouzelis, 14 years ago

Attachment: r35752-syslog.txt added

comment:8 by drcouzelis, 14 years ago

I downloaded the Haiku build tools and source code, setup a build directory, made the simple changes about the microcode that I suggested, and compiled a new CD. I still see the same symptoms. :(

I did a diff comparing the old syslog to the one when booting with my mod. Nothing changed concerning the Radeon driver.

Since I have almost zero experience with Haiku and driver development, and since the X800 and X850 are reported to be working for others, I will wait to hear what your next suggestion is.

By the way, I am using a 1680x1050 LCD monitor with a DVI-DVI cable.

comment:9 by euan, 14 years ago

can you try a VGA connection? or if you have dual DVI, the other port?

comment:10 by drcouzelis, 14 years ago

That is a very good suggestion. Here is what I found:

I have two DVI ports (no VGA) on my video card. I moved the monitor cable from one port to the other and booted the live CD. This fixed many things:

I now see the Haiku boot icons, instead of a black screen and a "color strip".

The colors look perfect.

Haiku is able to use 32bpp.

And (I think) I can do all this without doing a reboot from Linux first.

As far as I'm concerned, this specific ticket can be closed.

BUT, by switching DVI ports a new bug has appeared: in both Haiku and Linux, the GUI looks and behaves perfectly, but the BIOS screen, the Haiku boot screen, and the Linux console (anything that isn't X11) are... off. I mean, everything shows up, but the picture kind of runs off the right side of the monitor, so I can't see some of the text that is on the right side and everything looks a little blurry. I'm going to use Google to see if it is a known problem, although I'm not quite sure what search string to use. :P

Anyway, in regards to this ticket, thank you very much for your help.

comment:11 by drcouzelis, 14 years ago

Just a quick correction: the live CD still will not boot without first rebooting from Linux. It appears that it is unrelated to this ticket.

comment:12 by euan, 14 years ago

Resolution: fixed
Status: newclosed

It's not what I would call a fix, but its better than nothing I guess. :) At least there's a workaround for this issue.

Are you sure the live cd issue is video related. On my AMD system I have to disable everything, ACPI, IDE DMA, pick a safe mode resolution etc. Are there any boot options that let the live cd boot?

comment:13 by stippi, 14 years ago

Yeah, I wouldn't call this a fix either. The issue is still there, even if it has become clear that it relates to the output used and that there may be a work around, at least there is one in this situation. I would reopen the ticket.

comment:14 by drcouzelis, 14 years ago

Maybe keeping it open would be good, since I suppose I should be able to use either DVI port and have it work.

Do you think it would be worth it for me to start looking at the Haiku Radeon driver code, especially for something involving a second video port?

euan, when I get home I will try booting in super-duper safe mode to see if it will boot. I still plan on opening another bug report for that one though, since a build from two months ago boots with no problems.

comment:15 by euan, 14 years ago

Resolution: fixed
Status: closedreopened

Will leave it open for now then. If you can provide a x.log from linux we can compare that to what Haiku is doing.

comment:16 by drcouzelis, 14 years ago

I will attach two X log files, one from DVI-0 and one from DVI-1.

When I use DVI-0, the BIOS, the Linux console, and the Haiku boot icon screen look incorrect; it's as if the video card thinks my monitor is about two inches wider than it actually is, so I can't see text on the right side of the screen and things look a little "stretched". But, both X (Linux) and the Haiku GUI look perfect. (correct resolution and 32 bpp) Maybe this "stretching" problem is caused by a bug in my video card or monitor.

When I use DVI-1, the BIOS, the Linux console, and X look correct, but Haiku has some problems. I don't see the Haiku boot icons; instead, I see a black screen with a "color strip" in the upper left hand corner. (it looks like a film strip filled with the colors of the rainbow) When the Haiku GUI loads, the colors are incorrect. If I have just rebooted from Linux, then I can choose 16 bpp and the colors will look ok. This is the symptom I originally reported in this ticket.

by drcouzelis, 14 years ago

Attachment: Xorg.dvi-0.stretched.log added

BIOS and console are stretched, GUI looks good.

by drcouzelis, 14 years ago

BIOS and Linux look good, Haiku has many video problems.

comment:17 by drcouzelis, 14 years ago

Please set this bug to "closed".

I now have full resolution and color depth and correct colors using either DVI-0 or DVI-1. DVI-0 still has a few glitches, but I have reason to believe they are not related to Haiku.

If I learn anything about what has changed to make my video card start behaving correctly, and if I am still allowed to post here, then I will add more information to this bug report.

Thank you very much for your assistance!

comment:18 by jackburton, 14 years ago

Resolution: fixed
Status: reopenedclosed

comment:19 by drcouzelis, 14 years ago

Ok, I did more testing, and I think I have the situation figured out.

As I mentioned before, DVI-0 works pretty well, but when I use DVI-1 Haiku looks very bad. There are no boot icons (only the "color strip") and the Haiku user interface colors are incorrect. It seems to be related to my RESOLUTION SETTINGS. When I set Haiku to 1024x768x32 and reboot, the beautiful boot icons appear and the Haiku user interface looks perfect. Then, I can change my screen settings to my native 1680x1050x32 and it will still look perfect.

So, to reiterate, the color problem appears when I am using DVI-1 and I have my screen resolution set to anything but 1024x768x32. (I tried many resolutions between 1024x768x32 and 1680x1050x32, but only 1024x768x32 would give me a perfect Haiku desktop)

I am interested in learning about where Haiku is getting my monitor settings and information at boot time. I will look at the code, but graphics drivers are very new to me. Anyway, shall I continue posting here, open a new ticket, or should I continue the discussion somewhere else?

Thank you.

in reply to:  19 ; comment:20 by anevilyak, 14 years ago

Replying to drcouzelis:

I am interested in learning about where Haiku is getting my monitor settings and information at boot time. I will look at the code, but graphics drivers are very new to me.

It queries the monitor for those via DDC/EDID.

in reply to:  20 ; comment:21 by drcouzelis, 14 years ago

Replying to anevilyak:

It queries the monitor for those via DDC/EDID.

I wonder if Haiku is using the wrong DVI port during the boot process. It's just a guess. I am probably wrong. :P

For now, I will change the resolution when I shutdown and after booting as a workaround.

in reply to:  21 comment:22 by anevilyak, 14 years ago

Replying to drcouzelis:

I wonder if Haiku is using the wrong DVI port during the boot process. It's just a guess. I am probably wrong. :P

That's a possibility, the other case is that on some boards the I2C bus on the second port might not actually be wired up properly, in which case an EDID query on that port can't work properly. Hard to tell which one's the case here without further information though.

comment:23 by drcouzelis, 14 years ago

I'd like to give more information, if possible.

On the other hand, if you think that I am the only one experiencing this problem, then maybe it's not worth the time trying to fix it.

Note: See TracTickets for help on using tickets.