Bug 78562 - [gma500] wrong pixel clock on LVDS (half the correct frequency)
Summary: [gma500] wrong pixel clock on LVDS (half the correct frequency)
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
Depends on:
Reported: 2014-05-11 21:44 UTC by pmarques
Modified: 2017-10-30 16:41 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

dmesg of Ubuntu 12.04 (44.54 KB, text/plain)
2014-06-03 00:06 UTC, pmarques
no flags Details
Xorg.log of Ubuntu 12.04 (24.94 KB, text/plain)
2014-06-03 00:07 UTC, pmarques
no flags Details
dmesg of working Ubuntu 12.04.4 (14.39 KB, text/plain)
2014-06-04 18:25 UTC, linuxuser330250
no flags Details
Xorg.log of working Ubuntu 12.04.4 (7.13 KB, text/plain)
2014-06-04 18:27 UTC, linuxuser330250
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pmarques 2014-05-11 21:44:58 UTC
I have a embedded PC system here that has an Atom Z510. The system includes a GMA500 graphics chip.

The display is connected through the LVDS port and has a resolution of 1024x768.

The system works ok in Windows and painfully slowly in Linux with the vesa driver, but without any flicker.

Using the gma500 driver, the pixel clock seems to be half of what it should be (measured with an oscilloscope). When the image is good the pixel clock is around 65MHz. When the gma500 driver sets the resolution the pixel clock goes to around 32MHz. This gives a frame rate of around 30Hz which explains the horrible screen flicker. The performance is quite good, though.

I tried running xrandr to create new modes, but the pixel clock is always wrong, no matter what I tried.

The kernel version is 3.12.1. I looked at the git repository log to see if anything changed in the meanwhile that could affect this, but nothing popped up.

Can you give me some pointers to what I should try next? Some obscure kernel parameter? Do you need more information?

The linux graphics system changed a bit over the last few years (KMS, etc.) and I missed some of the changes, so please bare with me if I ask silly questions...

Thanks in advance for any help.
Comment 1 linuxuser330250 2014-05-18 18:23:18 UTC
I have the same issue on an ASUS Eee PC 1101HA running Ubuntu 14.04 LTS.

The screen starts to flicker around 30 seconds after the gma500_gfx.ko kernel module is loaded.
This happens both on the console (no X started) and then X started.
The flicker is changing. When it starts it hits the screen like a storm. Then it "stabilizes" at a lower flicker rate...

Graphics performance is good with the gma500_gfx.ko accelerator, but I found no way to get rid of the flickering.

When vesafb is used, no flickering occurs. But vesafb is tied to the VESA modes listed in the BIOS, and sadly 1366x768 is missing, so instead 1024x768 is used which results in a wrong aspect ratio. It's also very slow.

I don't know what Ubuntu 12.04.4 does differently, but with the previous LTS version of Ubuntu this flickering does not occur.

Hopefully this will be fixed soon.
Comment 2 Patrik Jakobsson 2014-05-19 09:09:21 UTC
Just writing to let you know I've put this on my todo-list.

If possible, it would help if you could try bisecting this. I don't recall making any changes to the Poulsbo LVDS code so nothing obvious pops up in my head either.

Comment 3 pmarques 2014-05-20 23:23:09 UTC
I can try to bisect (although it will be slightly painful), but unlike linuxuser330250 I didn't find a kernel version that actually works with this machine.

I always tried to install complete distributions to avoid kernel/Mesa/whatever version incompatibilities, but all the distros I tried either worked with VESA (too old) or had the flicker issue (more recent). IIRC some had the gma500 driver with flicker and poor video playback performance, but the most recent ones only seem to have the flicker issue.

linuxuser330250, can you point me to the version of Ubuntu that worked for you so that I can try it too? At least if that works I'll have a starting point for bisecting.

Thanks in advance,
Paulo Marques
Comment 4 linuxuser330250 2014-05-22 19:51:16 UTC
I used Ubuntu 12.04. I later found out that this may be using the proprietary driver that was used before gma500_gfx was developed.


I used the desktop-i386 version (which actually is a i686 version):
Comment 5 linuxuser330250 2014-05-22 20:13:33 UTC
There are some interesting pages about the Poulsbo IGP:


Seems that 12.04 also uses the gma500_gfx.ko. My time is limited right now, but I will report back in a few weeks, as I plan to downgrade from Ubuntu 14.04 to 12.04 and I will check 1) kernel version and 2) gma500 driver on 12.04.

I did run 12.04 on this netbook before I upgraded to 14.04, and there was definitely no flicker.

pmarques, please report if you have luck with 12.04.4.
Patrik Jakobsson, thanks for working on it (soon).
Comment 6 pmarques 2014-06-03 00:06:52 UTC
Created attachment 100336 [details]
dmesg of Ubuntu 12.04
Comment 7 pmarques 2014-06-03 00:07:19 UTC
Created attachment 100337 [details]
Xorg.log of Ubuntu 12.04
Comment 8 pmarques 2014-06-03 00:10:43 UTC
Hi all,

I tried installing Ubuntu 12.04 LTS on the system and it flickers, both on the setup and the installed system, and both before and after installing the updates.

So, I don't think this is a new bug, I just never tried to run Linux on this system before.

I've attached the complete dmesg and Xorg.log from the Ubuntu 12.04 boot because it may have some relevant information.

If you need me to try anything else, please let me know.
Comment 9 linuxuser330250 2014-06-03 21:52:23 UTC
I've installed 12.04.4 again on my system and the flicker is NOT there. It was there with 14.04. (I can run the 14.04 installer again to see it flicker...)

On 14.04 however the flicker starts after about 15 to 25 seconds, so it is not there right from the start.

Logically, there definitely happend something between those versions. I have to get the logs and post them, please stand by for this.

Question: HOW should I find out, what is wrong, or rather: different with 14.04 compared to 12.04.4?
Comment 10 linuxuser330250 2014-06-04 18:25:49 UTC
Created attachment 100413 [details]
dmesg of working Ubuntu 12.04.4

As stated before, Ubuntu 12.04.4 doesn’t flicker at all on this ASUS EeePC 1101HA.
Comment 11 linuxuser330250 2014-06-04 18:27:31 UTC
Created attachment 100414 [details]
Xorg.log of working Ubuntu 12.04.4

Since on 14.04 the flicker also appears when in text mode, I don’t think that this Xorg.log will be useful, but for the completeness here it is. This log is from Ubuntu 12.04.4 without flicker on this ASUS EeePC 1101HA.
Comment 12 linuxuser330250 2014-06-04 18:39:52 UTC

My ASUS EeePC 1101HA has an Intel Atom Z520 processor @1.33GHz and a US15W Ultra Mobile chipset. This very chipset includes an IGP called Intel GMA500 or Poulsbo, which really is a PowerVR SGX 535 embedded graphics core.

Links that might be of interest:

1) Why does it flicker at all?
2) Why does it flicker in at least one case (linuxuser) on 14.04 but not on 12.04.4 of Ubuntu?
3) Why does it flicker on every Linux in another case (pmarques)?
4) What can we do about it and how to proceed?

Notably there are various bug reports of users with the Poulsbo chipset graphics having similar problems...
Comment 13 Patrik Jakobsson 2014-06-04 21:25:24 UTC
Hi, thanks for all the info

It seems there are two different issues. One regression and one that probably is as old as the driver itself.

I have an ASUS1201HA that I can test with to see if I suffer from the same problem. In that case I can bisect it. If not I have written a regdumper that I'll post somewhere (if I can find it) that can give us a clue about what is wrong.

With that said, I have no idea when I'll have time to look at this. Hopefully soon but my backlog just keeps growing at the moment. If you're in a hurry, the only advise I can give you is to dig into the code yourself.

Comment 14 pmarques 2014-06-04 23:21:23 UTC
One thing I noticed on the Xorg.log I posted is that at some point it has this:

[    25.686] (II) modesetting(0): Modeline "1024x768"x30.1   32.57  1024 1048 1184 1344  768 771 777 806 (24.2 kHz P)

So, it seems that the system knows it is working at 30.1 Hz (instead of 60Hz), but all my attempts to use xrandr to convince the display to go to 60Hz didn't work. I don't rule out that I might have been doing something wrong, though.

I can try to look at the code, but all the code under "drivers/gpu/drm/gma500" is around 30k lines. can you at least give me some pointers at which files I should look at first? Are they even in this directory?
Comment 15 jmartin 2014-11-22 00:59:54 UTC
SGX Drivers had been posted to GitHub for the 540 and 544sc PowerVR GPUs. The GMA 500 is based on the 535. Would these commits be any helpful in getting proper video acceleration supported for Linux distributions?

Comment 16 Raul 2015-09-11 06:18:21 UTC
Is anyone working on this? I still hve this bug on gma500_gfx driver on Vaio P, screen flickering. It's better with low level of backlight but tht's not the solution.
Comment 17 Patrik Jakobsson 2017-04-24 09:53:54 UTC
I've posted a patch that is reported to fix this issue. If anyone still have the hardware available please give it a try:

Comment 18 Stuart Hopkins 2017-05-11 12:27:25 UTC
Can confirm this patch does remove the flicker on my Sony Vaio VPC1P (tested against the latest 4.x kernel from the Ubuntu 17.04 tree). If required I can post the xrandr output from before/after as well.

On my device xrandr now shows the screen as being at 1600x768@59.90 rather than 1600x768@29.97
Comment 19 mirh 2017-10-30 16:41:06 UTC
Can be closed then?
Fixed in 82bc9a42cf854fdf63155759c0aa790bd1f361b0 that landed in 4.12-rc3

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.