Comment 7 for bug 1358936

Revision history for this message
Alexander Lindo (alexanderlindo) wrote :

I installed Ubuntu 14.10. After about 5 minutes of browsing the web, I noticed the garbled graphics. This proved that the situation with the integrated Intel x4500 graphics has worsened. As I was aware of what caused the issue in 14.04, I disabled the swap partition by adding “swapoff -a” to the “/etc/rc.local” configuration file. I rebooted, and tried the process again. It worked for a while but as the RAM began to deplete I was still faced with the same issue of garbled graphics.

I went back to the “/etc/rc.local” configuration file and removed the “swapoff -a” option. I remembered in 14.04 that editing the “/etc/default/grub” configuration file to reserve RAM for the graphics card helped tremendously while I was on 14.04. As I stated previously, the Intel x4500 graphics chip is said to steal up to 384 MB of the systems RAM (Source: http://www.notebookcheck.net/Intel-Graphics-Media-Accelerator-4500MHD-GMA-X4500MHD.9883.0.html). Before I had alloted this amount, which did help a great amount. However, occasionally when the RAM began to deplete and the SWAP was used, I was still faced with the issue of garbled graphics.

I decided to ignore the spec sheets written for the mobile x4500 graphics chip and went with the one present in the desktop version (http://www.asus.com/Motherboards/P5G41CM_LX/specifications/). I edited the grub configuration file to reserve 1GB of RAM (See comment #4 for more details on how to configure GRUB). This RAM would be invisible to Ubuntu while running and thus would not be disturbed when memory available to the OS becomes depleted. For my test, I ran the computer for over 3 hours, opened many Firefox tabs, visited many content rich websites; websites that I know would eat RAM. I watched as the RAM depleted. The computer gradually became slower, and processor usage increased as expected. The SWAP usage was increasing, I continued, as I maxed out the RAM, the SWAP usage increased but NO GARBLED GRAPHICS. I randomly opened other applications, like Ardour 3 with a 50+ track session, Hydrogen Drum Machine, LibreOffice writer, Thunderbird. I continued until the the SWAP was almost maxed out and the computer became unbearable to use.

Finally, I closed Firefox. This process would, under normal circumstances instantly cause the entire screen to become garbled, as the OS begins to flush the RAM and SWAP cache, restoring persistent files temporarily stored in the SWAP back to the RAM. I watched the System Monitor as the RAM and SWAP cache was restored. I viewed the dash (an area that always became corrupt graphically). There was no corruption anywhere. The speed of the computer was returned once the the RAM was restored. In the past, with garbled graphics, the computer would become unbearable to use, you would not be able to log out, you would have to shut down. All functions were intact.

In conclusion and partly supporting my previous comments above. This is not so much an issue with Swapping as it is an issue with what is being Swapped. Before reserving that 1GB of RAM, Ubuntu would use all memory available to the system as RAM depleted, before using the SWAP partition (editing the SWAPiness has little to no effect on this). I did notice some improvements in memory/SWAP management in Ubuntu 14.10 but the issues with garbled graphics increased. This has led me to believe that Ubuntu is Swapping the graphics data stored in RAM, this in turn causes the garbled graphics.

By reserving 1GB of RAM (hidden from Ubuntu), The graphics chip always has dedicated RAM available to it, even when the OS is supposedly running out of RAM and starts Swapping. By reserving that RAM, it is always available to the graphics chip, all graphics data stays in that dedicated RAM and does not get Swapped, hence no more garbled graphics. It is my theory that in order to solve the issue with garbled graphics on the Intel x4500, we would have to instruct Ubuntu to keep all graphics data in RAM and never SWAP it. SWAP only application data. Until this fix is implemented, this workaround is the best option you have got.