|Sunday, May 13, 2012||(Comment)|
Linux in full HD (with brightness control) on Dell Vostro 360
Summary: You'll need kernel 3.2 or later with boot parameters “drm_kms_helper.poll=0 acpi_osi=Linux acpi_backlight=vendor”; and if you have kernel 3.2 or 3.3, you may need to run “intel_reg_write 0x2120 0x1206800” as root. Logging in and locking the screen may give inconsistent results. (Race condition??) And don't even think of suspending.*
It became known as the “X blink” bug: If you have a Dell Vostro 360 all-in-one PC with integrated Intel graphics, no Linux distribution (that I know of) will give you full HD graphics without some tweaking.* If the kernel is sufficiently old (e.g. 2.6.32), the default boot parameters will usually give you a graphical desktop, albeit with no more than 1280×1024 resolution. With newer kernels (e.g. 2.6.38 or 3.x), the default settings will usually give you a blank screen or blinking screen. You can fix this by booting with the “nomodeset” or “i915.modeset=0” parameter, or in VESA mode; but any of these options will limit your resolution to 1280×1024 — in which case the aspect ratio will be wrong, and the logical pixels won't match the physical pixels, and sub-pixel hinting won't work.
Another thing that won't work is the brightness control, whether by the buttons on the left of the screen or by the desktop settings.
Ingredients of a solution
Gustavo Spadari, who reported an “X blink” on the Dell Inspiron One 2320, discovered (and notified me) that it could be fixed by the boot parameter
but reported that the fix required a power-down rather than just a reboot. You'll need to delete any other parameters that clash with the above, e.g. any references to “vga=...” or “modeset” or “vesa”.
With a big hint from “zigzag” and a little bit of trial and error, I established that the further parameters
restore the brightness control.
Having fixed those two bugs, you might eventually notice another one: with unpatched 3.2 and 3.3 kernels, Google Earth freezes your desktop, which then cannot be unfrozen except by a reboot. The bug affects OpenGL programs on Sandy Bridge GPUs. Believe it or not, you can prevent the freeze by first running
intel_reg_write 0x2120 0x1206800
as root (e.g. with “sudo”). That write operation has been incorporated into kernel 3.4 and is being backported to 3.3 and 3.2. By the time you read this, the fix may be incorporated in updates for your distribution, in which case the above write command won't be needed. (But it is still needed for Linux Mint 13 as of June 18, 2012.)
Example: Installing Mint 13 MATE edition
You can burn the .iso image to a DVD, or copy it to a USB stick using the GNU/Linux “dd” command. I did the latter. I tried booting in compatibility mode and running the installer, but the installation wouldn't boot. For the second attempt, I booted from the USB stick, pressed the tab key at the grub screen, and substituted the parameters “drm_kms_helper.poll=0 acpi_osi=Linux acpi_backlight=vendor” for “quiet splash --”. That gave me a full-HD live desktop. To ensure that the screen would not permanently blank during the installation, I clicked “Menu”, then “Control Center”, then “Screensaver”, and delayed the screensaver as long as possible and set the “Power Management” options to “Never”. Then I ran the installer.
On the first boot after installation, you need to get past the “X blink” bug manually (e.g. with “nomodeset”), then make the required boot parameters permanent. To do this, run
sudo pluma /etc/default/grub
to edit /etc/default/grub so that the line setting the default boot parameters becomes
GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.poll=0 acpi_osi=Linux acpi_backlight=vendor"
(all on one line). Then run
which copies the parameters to /boot/grub/grub.cfg.
At this point you might as well also fix the OpenGL bug. I did it by editing /etc/mdm/PreSession/Default to insert the line
intel_reg_write 0x2120 0x1206800
just before the final line, which reads “exit 0”.
(For a GNOME-based distribution, you'll probably need to substitute “gdm” for “mdm” in “/etc/mdm/PreSession/Default”. Other display managers include kdm, xdm, lightdm, LXDM and SLiM.)
At this point you might also adjust the Screensaver and Power Management options as above. You might also want to set the software sources, run Update Manager and install an NTP daemon (for time/date synchronization) before you reboot.
But be prepared for inconsistent behaviour. When you boot, the login screen may or may not be blank when you hear the login “ping”. In either case, you can still enter your username and password, in which case the screen may or may not be blank when you hear the distinctive welcome tone of the Mint desktop. If the screen is blank, you can press Ctrl-Alt-Backspace to return to the login “ping”, and so on, until you eventually get a visible desktop.
Also be warned that if you lock the screen, it may go permanently blank. So don't lock it unless you're ready to return to the login screen. From “Control Center”, the screen may blank if you click “Monitors” or if you subsequently click “Detect monitors”. And don't expect to recover from a “suspend” without a full power-down.
Fortunately the MATE desktop, under “Startup Applications”, can be set to remember running applications when you log out!
Example: Installing Lubuntu 12.04
Before I found out about the “acpi_osi=Linux acpi_backlight=vendor” combination, I tried installing Lubuntu 12.04. On the first boot after installation, I entered “drm_kms_helper.poll=0” at the grub screen. I edited /etc/default/grub and added the same parameter to the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm_kms_helper.poll=0"
(as it became), then ran “sudo update-grub”. It didn't seem to matter whether I did a full shutdown or a reboot. But the result was unreliable. Sometimes the login screen didn't appear; and if it did, the desktop might not appear. Booting to the desktop could take more than three attempts.
In view of the inconsistent behaviour of Mint and Lubuntu (above) and some distributions below, the following observations should perhaps be taken as anecdotal. Some of them date from before I tried “acpi_osi=Linux acpi_backlight=vendor”. I record them all for what they're worth. My hardware configuration is the base-model Vostro 360 with the Core i3-2100 processor and integrated HD 2000 graphics. “Your mileage may vary.”
So far, I have been able to get the following distributions working in full HD:
- Fedora 17 Beta live CD (with kernel 3.3): I substituted the three recommended parameters for “quiet splash”, obtaining full HD with brightness control via the buttons or the desktop.
- Lubuntu 12.04 live USB stick (kernel 3.2): For running live, it seemed that I had to remove the initial “noprompt” parameter and the final “--”; but a full shutdown was not needed.
- Mint 201204 “Debian” live USB stick (kernel 3.2), made from .iso image using “dd”: Best results were obtained by deleting “quiet splash” and adding “drm_kms_helper.poll=0” before the final “--”. I could log out and lock the screen without incident, but switching the user sometimes gave the blank screen.
- Mint 13 Cinnamon live USB stick (kernel 3.2) with no persistence file: As for the “Debian” edition, provided that I removed the “noprompt” parameter (absent from the “Debian” edition), except that some time after startup, the desktop blinked once (and then was steady).
- Mint 13 MATE live USB stick (kernel 3.2) with no persistence file: Removing the “noprompt” parameter (absent from the “Debian” edition) and adding “drm_kms_helper.poll=0” after “quiet splash --” gave results similar to the “Debian” edition, albeit with one additional bug: when the screensaver starts, there might be no recovery.
- OpenSUSE 12.2 Milestone 3 live CD (kernel 3.3): There was no opportunity to remove parameters, but adding “drm_kms_helper.poll=0” gave full HD.
- OpenSUSE 12.2 Beta 1 GNOME LiveCD build 0398 (kernel 3.4): There was no opportunity to remove parameters. Booting with the default parameters (whatever they are) gave a blank screen. Booting with “nomodeset” gave 1280×1024 with no brightness control. Booting with “drm_kms_helper.poll=0” gave a blank screen on the first two attempts, a brief glimpse of wallpaper on the third attempt, and a full-HD desktop with no brightness control on the fourth attempt (but the screen blanked when I tried to detect displays). Booting with all three recommended parameters gave full HD with full brightness control (and allowed me to check the resolution and detect displays).
- Plop Linux 4.2.1 live DVD (kernel 3.3.1): X must be started manually using “startxvesa” for VESA mode, or “startx” for normal mode. If I booted with the default parameters except “vga=1”, VESA mode gave limited resolution and normal mode gave the blank/blinking screen. If I booted with the three recommended parameters, VESA mode limited the resolution to 1024×768, and normal mode gave inconsistent behaviour. On at least two occasions it gave the infamous blank screen. On one occasion it gave what appeared to be a full-HD desktop on which mouse-clicks were ineffectual (although the pointer moved). And on one occasion it gave what appeared to be a full-HD desktop with a working mouse. But when I attempted to check the resolution, the screen went blank. Consequently I never found out whether the software brightness control worked; but the hardware brightness control certainly didn't. After X started in VESA mode, I could kill it with Ctrl-Alt-Backspace and restart it. But if it misbehaved after starting in normal mode, there was no such recovery.
- Porteus XFCE 1.2rc2 live CD (kernel 3.3.4): With “drm_kms_helper.poll=0”, it worked in full HD, after a reboot or a full shutdown.
- Sabayon 9 Xfce live DVD (kernel 3.4): Deleting the parameters “video=vesafb:ywrap,mtrr:3 vga=791” and entering the recommended parameters in place of “quiet --” gave a full-HD desktop and working brightness buttons (although I couldn't find the corresponding brightness control among the desktop options). But I almost didn't discover that, because nothing else would bring up the desktop — not “nomodeset” from the F5 menu, nor even Safe Mode. The default parameters gave a blank screen. Deleting “video=vesafb:ywrap,mtrr:3 vga=791” still gave a blank screen. Deleting the same and substituting “nomodeset” gave a root prompt; but attempting to start X gave the message “Fatal server error: no screens found”. Most of these options gave some full-HD text during the boot sequence; some gave a graphical splash screen indicating the progress of the boot; but only the first went all the way to a desktop.
- Siduction 12.1 “Desperado” LXDE live CD (with kernel 3.4): I needed to add the parameters “drm_kms_helper.poll=0 --”. Without the final “--”, the backlight went off as soon as X started. The full HD display would not resume on reboot; a full shutdown was needed.
- SolusOS 1.1 live USB stick (kernel 3.3.6): The three recommended parameters in place of “quiet splash” gave full HD with full brightness control.
- Ubuntu 12.04 Beta 1 live USB stick (kernel 3.2): It didn't seem to matter whether I included “quiet” or “splash” or “--”, and a full shutdown was not needed. The Unity desktop blinked once (like the related Cinnamon desktop, above).
- Ubuntu 12.04 LTS live USB stick (kernel 3.2), made from .iso image using “dd”: Booting with the three recommended parameters instead of “quiet splash --” gave full HD with full brightness control. Once the screen blanked when I clicked on “System Settings”. Failing that, it sometimes blanked when I clicked on “Displays”. Failing that, it sometimes blanked when I clicked on “Detect Displays”.
- Ubuntu 12.10 Alpha 1 live USB stick (kernel 3.4): Booting with the default parameters gives a blank screen. Booting with “nomodeset” gives 1280×1024 with no brightness control. Booting with “drm_kms_helper.poll=0” at the end gives full HD with no brightness control. Booting with the three recommended parameters at the end took two attempts. On the first attempt, the desktop went blank after a few seconds. The second attempt gave full HD with full brightness control. But when the screensaver kicked in, the screen blanked and would not come back.
- Xubuntu 12.04 Beta 1 live CD (kernel 3.2): You need to remove the “quiet” and “splash” parameters, and the “--” parameter must come last, and you need a shutdown rather than a reboot.
A note on Elementary OS 0.1 (based on Ubuntu 10.10, with kernel 2.6.35): It has been reported that the live CD (but not the installation) gives full HD on the Vostro 360. But I was not able to reproduce this behavior. The 64-bit live CD gave me a blank screen, both before and after I upgraded the BIOS. After the upgrade I belatedly tried the 32-bit live CD, which also gave a blank screen. Those observations apply to the default boot parameters. If I booted with “drm_kms_helper.poll=0”, I could not start X.
While it may have been my fault, I was not able to get the following distributions working in full HD:
- Fedora 16 live CD (kernel 3.1): Without “nomodeset”, I get the blank screen.
- Mint 9 live DVD (kernel 2.6.32): Whatever parameters I tried, I got 1280×1024 with no brightness control.
- Mint 11 live DVD (kernel 2.6.38): Without “nomodeset”, I get the blank screen.
- OpenSUSE 12.1 live USB stick (kernel 3.1): Ditto.
- Xubuntu 11.10 live CD (kernel 3.0): Ditto.
The bottom line
More than seven months after buying the slick new Vostro 360, I finally have a Linux system on which I can get some real work done. While the blanking of the screen is annoying, the circumstances in which it may happen are avoidable during “real work”.
[First posted May 13, 2012; last modified August 2, 2012.]
|Tweet||Return to Contents|