-   Gentoo (
-   -   scrambled colors (

CollieJim 12-10-2012 06:30 AM

scrambled colors
I've just finished a major update (1GB download) which included moving to KDE-4.9.3.

While the desktop starts normally, the colours are totally scrambled, making it unusable.

My video is an ATI Mobility Radeon HD 2400, and x11-drivers/ati-drivers-12.11_beta has been built.

I know the hardware is good because another distro works fine.

Would this be a problem with the driver, KDE, or a combination?


vik 12-10-2012 09:47 AM

I updated my Gentoo box to the latest KDE yesterday, although I have an Nvidia card (I've had problems with AMD cards in the past).

As a sanity check see that your opengl is set to the AMD driver. eselect opengl list; eselect opengl set <whatever option you need>

I would suggest rolling back to an earlier video driver; in your /etc/portage/package.mask file add >=x11-drivers/ati-drivers-12.8 and re-emerge your ati-drivers. This will roll you back to the 12.6 version.

CollieJim 12-11-2012 08:38 AM

opengl is set to ati, and unfortunately rolling back did not solve the problem.

I'm wondering if there is something else involved? Up until now I have been using an xorg.conf, but as of this update it is no longer usable. The error is 'No screens found', and the logfile indicates one found but not acceptable.


Section "ServerFlags"
    #DontZap # disable <Ctrl><Alt><BS> (server abort)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
    #DontZoom # disable <Ctrl><Alt><KP_+>/<KP_-> (resolution switching)

Section "Module"
    Load "dbe" # Double-Buffering Extension
#    Load "v4l" # Video for Linux
    Load "extmod"
    Load "glx" # 3D layer
    Load "dri" # direct rendering

Section "InputDevice"
    Identifier "Keyboard1"
    Driver "kbd"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    Option "XkbOptions" "compose:rwin"

Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
#    Option "Protocol" "ExplorerPS/2"
    Option "Protocol" "Auto"
    Option "Device" "/dev/input/mice"

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"

    Subsection "Display"
#        Viewport 0 0
        Depth    24
        Modes    "1920x1080"

Section "Monitor"
    Identifier "monitor1"
    VendorName "Acer"
    ModelName "H223HQ"
    HorizSync 30-80
    VertRefresh 55-75
    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"    50.00  768  832  846 1000  576  590  595  630
    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"    63.07  768  800  960 1024  576  578  590  616

Section "Device"
    Identifier "device1"
    VendorName "ATI"
    BoardName "ATI Radeon HD 2400"
    Driver "radeon"
    Option "DPMS"

Section "ServerLayout"
    Identifier "layout1"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "Mouse0" "CorePointer"
#    InputDevice "SynapticsMouse1" "SendCoreEvents"
    Screen "screen1"

vik 12-11-2012 05:38 PM

It looks like your xorg.conf is messed up. If you're trying to use the fglrx driver you don't want this:

Section "Device"
    Identifier "device1"
    VendorName "ATI"
    BoardName "ATI Radeon HD 2400"
    Driver "radeon"
    Option "DPMS"

because it will try to load the radeon driver which will conflict with the fglrx driver. Try renaming your xorg.conf to xorg.conf.bak and see if X comes up without an xorg.conf first. If that fails, run:

/opt/bin/aticonfig --initial
to create a new xorg.conf and see how it goes. You might want to blacklist the radeon module as well:

echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf

CollieJim 12-12-2012 01:13 AM

Still batting .000

X does not start at all with xorg.conf present, and has bad colours when absent.
"blacklist radeon" had no effect. According to lsmod it was not loaded at boot time.
/opt/bin/aticonfig could not detect a supported card.

The hardware I'm using is a Toshiba Satellite M200 laptop with an external HD monitor. The internal screen was broken and removed. I have checked the physical connection to the monitor with another computer and it tests good.

I have unmerged ati-drivers, and still have bad colour. Is it possible that KDE 4.9.3 is sending garbage to the card?

vik 12-12-2012 05:36 AM

Simplest way to see if KDE is the problem would be to emerge twm and xterm, then pick that environment from KDM login. I do not think KDE is the problem though: it could be trying to use some opengl effects that are not well supported by your driver. Maybe try turning off desktop effects from "Workspace Appearance and Behavior" in System Settings?

Do you have radeon built into the kernel? If you do, blacklisting it won't help and it will conflict with fglrx.

On the distro that does work, check to see which driver is working for you: is it radeon or fglrx? What version of KDE do you have on that distro? Also, you could try taking that xorg.conf and moving it over to your current Gentoo setup and see how it goes...

CollieJim 12-13-2012 08:21 PM

More pieces to the puzzle.
I went a bit overboard and installed Gnome. Still bad colours.

However this time I noticed that the 2 Tuxes (sp?) displayed at the beginning of the boot process are also defective.

I have just built a fresh 3.5.7 kernel.
Ascii colours seem to be OK.

The system that works uses a 2.6.39 kernel, and the same /. It has uvesafb loaded which the defective system does not. It also does not like the xorg.conf but works without it.

vik 12-13-2012 08:47 PM

I think we're narrowing it down: seeing bad colors before booting into X suggests you may be having problems with one of the AMD framebuffer modules. I believe it's just a matter of figuring out which modules you're actually using and seeing what's conflicting. My guess would be you're trying to use the KMS driver along with radeon, which has problems as noted here:

1) first, what does your /etc/portage/make.conf VIDEO_CARDS= line looks like.

2) lsmod

3) let's see how your kernel is configured:

zcat /proc/config.gz | grep FB_RADEON
zcat /proc/config.gz | grep FB_ATY
zcat /proc/config.gz | grep DRM_RADEON
zcat /proc/config.gz | grep DRM_R128

CollieJim 12-13-2012 11:05 PM

/etc/make.conf VIDEO_CARDS="ati"

  Good system        Bad
    uvesafb            pcspkr
    mmc_block          pc_ich
    mmc_core            sky2

(- = not present as opposed to not set)
                    Good    Fail    Fail after trying to match Good
FB_RADEON          Not set    y      Not set
FB_RADEON_I2C        -        y      -
FB_RADEON_BACKLIGHT  -        Y      -
FB_RADEON_DEBUG      -        ns      -
FB_ATY                ns        ns      ns
FB_ATY128            -        ns      -
DRM_RADEON            -        m      ns
DRM_RADEON_KMS        -        ns      -
DRM_R128              -        ns      ns

Still no luck.
I forgot to add uvesafb in the latest try.

vik 12-14-2012 06:41 AM

Yep, looks like you were having problems with the AMD framebuffer modules. OK, since in Gentoo we don't usually use an initrd, you'll need to build in uvesa (CONFIG_FB_UVESA=Y) in order to boot. That's why on your good system it was a module and still worked fine, whereas on your Gentoo install it's broken. While you're still building your kernel, make sure you unset Device Drivers->Graphics Support->Direct Rendering Manager as mentioned in the gentoo fglrx guide. This should also remove your Radeon module so now you only have fglrx and uvesa.

Now, after boot edit your /etc/make.conf like this:

And do a emerge -uND world. That should pull in the ati drivers for you automatically and eselect opengl as well.

Now, you should be able to startx and hopefully have everything work.

CollieJim 12-16-2012 09:16 PM

None of the above helped. However I have found another clue.

The version that works uses the default vga setting when booting, making for a rather poor display on an full HD monitor. I changed it to vga=883 (0x0373) which has been working up until the update. It gives me a 240 character line in console mode. Instant fail!

I changed to vga=794 which gives me a 160 character line and all is well. Except I don't have the full benefit of the HD screen. I think I will try "1920x1080" as that works on my other system.

vik 12-17-2012 10:28 AM

A few things you could try:

1) If games aren't a priority for you, you could try the open-source radeon driver and see if you have better luck.

2) Take a look at your emerge log when you updated. Revert all packages to the pre-update state and test updating each one individually until you find what's causing the issue. What a pain though...

3) Alternatively if you're tired of messing with it, I would recommend you try a few distros with live CDs and see if any of them bring up X correctly.

FYI, specifying vga=ask in your grub kernel args will bring up a list of the modes your video card will support when you boot.

All times are GMT -5. The time now is 04:21 PM.