How to fix the blank screen problem while launching WhatsApp web client from Google Chrome installed in Ubuntu

I have Ubuntu 12.04.5 LTS version installed on my Compaq Presario A900. Its a widescreen laptop (actually, a desktop replacement) with 17 inch display. I love the large screen and the full sized keyboard. Its such a pleasure to see Ubuntu run smoothly on this laptop.

Recently, WhatsApp launched their web-client with a limitation that it can only run on the Chrome web browser.

When I launched https://web.whatsapp.com on the Chrome browser, everything seemed fine. Scanned the QR code and found that my display went blank. No response for any keystrokes, mouse movements. The only way to recover was to put the system to sleep and wake-up. Upon wake up, Unity would crash and unity-reset does not help. The only option was to issue a graceful reboot from the terminal (Ctrl-Alt-F1). The issue was reproducible consistently.

Initially, I felt this could be a display driver problem. Since the laptop contains an Intel Integrated Graphics Adapter, I verified if there are any new drivers listed on the HP website. Found everything was up to date with respect to Graphics adapter and related drivers.

The second step was to Google for a solution. There are numerous people who have reported ‘Blank Screen issue on Ubuntu 12.04 LTS’. Most of them were related to Screen Saver and some of them with respect to XOrg settings. None of the solutions helped.

Finally, with a hunch, I started reading about Google Chrome features and the steps to be followed to enable/disable experimental features. As part of this investigation, I came across an option to disable ‘GPU Hardware Rendering’. The option was --disable-gpu. This option turned off the hardware rending facility in the browser and restricted it to use ‘Software Renderers’. The quality of the output when hardware rendering is used is usually superior, but in this case, I had to stick with software renderers.

settipalli@settipalli-ubuntu:~$ google-chrome --disable-gpu

Running Chrome with GPU rendering disabled solved the mystery behind the blank screen. I was able to launch https://web.whatsapp.com perfectly without issues.

I decided to create a desktop shortcut for the Chrome with GPU disable switch turned on such that whenever I would like to use the WhatsApp web client, I do not accidentally start the browser with hardware rendering enabled and be greeted with a blank screen.

The first step was to copy the exisitng google-chrome.desktop script located within the /usr/share/applications folder and name it, say, google-chrome-gpu-disabled.desktop. The contents of the script are listed below:

[Desktop Entry]
Version=1.0
Name=Google Chrome - GPU Disabled
# Gnome and KDE 3 uses Comment.
Comment=Access the Internet
Exec=/usr/bin/google-chrome-stable --disable-gpu %U
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito

[NewWindow Shortcut Group]
Name=New Window
Exec=/usr/bin/google-chrome-stable --disable-gpu 
TargetEnvironment=Unity

[NewIncognito Shortcut Group]
Name=New Incognito Window
Exec=/usr/bin/google-chrome-stable --incognito --disable-gpu 
TargetEnvironment=Unity

Now, whenever I search Chrome from within the Search bar in the Unity-Dashboard, I could see two Chrome icons, one with the GPU support, other without the GPU disabled.


References:
1. WhatsApp web-client
2. Ubuntu 12.04.5 LTS (Precise Pangolin)
3. Compaq Presario A900 Notebook PC
4. WhatsApp Blog – WhatsApp Web
5. Chrome Browser – Google

Advertisements

4 thoughts on “How to fix the blank screen problem while launching WhatsApp web client from Google Chrome installed in Ubuntu

  1. This hint works however is there a way to avoid the black screen while keeping the hardware rendering on (to get superior quality in browsing)

    1. Hello Suhail,

      Since the problem is caused when the hardware rendering is enabled, it probably has something to do with either the drivers or the display settings. I do not know a solution to fix this problem while having the hardware rendering option enabled.

      Thanks for stopping by!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s