Why OpenBSD runs so hot on AMD A4 APU hardware — and how to cool it down 20 degrees C

The good news is that I can run X in OpenBSD 5.6 on my AMD A4 APU-equipped HP Pavilion g6 laptop. Before now, starting X would cause a kernel panic.

The bad news is that the laptop runs very, very hot.

This OpenBSD misc post explains it:


List:       openbsd-misc
Subject:    Re: Slow performance on Radeon (HD7770) video card
From:       Jonathan Gray 
Date:       2014-06-22 5:12:12
Message-ID: 20140622051212.GC9087 () mail ! netspace ! net ! au
[Download message RAW]

On Sat, Jun 21, 2014 at 10:32:55PM +0200, Julian Andrej wrote:
> Hello,
> 
> i'm getting really low performance on my ATI Radeon HD7770 video card.
> glxgears runs at poor 27 fps and videos are stuttering (playback with
> mplayer and different -vo options).

We don't do acceleration on southern islands or newer Radeon
parts because it depends on LLVM, glamor and drm backed EGL.
This also requires the gbm part of Mesa which until very
recently has only supported Linux and udev/systemd.

Yes, even basic 2d acceleration requires this mess because
xf86-video-ati only has OpenGL backed glamor acceleration
for these parts, they didn't write any normal X style acceleration.

In the default configuration, my cpu is running at 70-80 degrees C as reported by:

$ sysctl hw.sensors

I was able to cool it down about 20 degrees C with this (as root):

# sysctl hw.setperf=0

I’m sure there’s a way to get that parameter set automatically on boot, but I leave that to you (or for me another day).

So now I’m getting CPU temps of 50 to 65 degrees C, which is 122 to 149 degrees F. Not horrible, but not anywhere near the 95 to 120 degrees F that I get in Linux.

I did a few other OpenBSD 5.6 tests. I installed the Firefox browser and then the Xfce desktop environment.

Both worked well. Video playback from YouTube stuttered quite a bit. Audio was low, even when boosted via the Xfce volume control.

Then I installed GNOME, which consisted of adding the metapackage and making a couple of configuration changes.

That went well. I had a working GNOME 3 desktop in OpenBSD 5.6. I must say, it is probably more responsive than GNOME 3 in Fedora. It’s pretty much like it is in Debian, except for the CPU heat and the fan blowing.

So the combination of excessive heat and fan noise along with poor video performance means I won’t be doing much with OpenBSD on this particular laptop.

But it’s always instructive to check in on OpenBSD with various hunks of hardware to see how they work together. OpenBSD has always been a project to watch, and I can only hope that hardware compatibility improves as development continues.

Success: Suspend/resume with open Radeon driver in Linux on the HP Pavilion g6-2210us with GRUB hack

It’s been my holy grail in Linux ever since I started seriously using it on the desktop back in 2010.

That would be working suspend/resume. WITH the open-source video drivers. First you need working video. Then it should “just work.” But it never does. For me and my AMD hardware anyway.

I got suspend/resume to work on my now-dead 2010-era Lenovo G555, and settled into a wonderful run with Debian Squeeze until the laptop’s untimely death in early April 2013. (Maybe it’s irony that I closed the lid one day in March, and the laptop never again woke up.)

My thought was that things in the Linux world has progressed so much that any laptop I got in 2013 would no doubt run Linux without a hitch.

But new laptops have new CPUs and new video chips, and in the case of my 2013 HP Pavilion g6-2210, a new AMD “APU” combining CPU and video hardware on a single chip.

Linux was OK, not great with these APUs.

And then there was UEFI/Secure Boot as implemented by Hewlett-Packard.

To meet my goal of successfully dual-booting Windows 8 and Linux, pretty much the only game in town, as far as this specific hardware at this specific point in time (May 2013) goes, was Fedora. Debian at the time didn’t “do” UEFI. Ubuntu/Xubuntu installs just weren’t working (I blame HP’s implementation of UEFI, though I could be wrong).

Only Fedora was able to handle my situation (which was neither than nor now exotic in any way).

I had a working dual-boot with a fully encrypted Linux side (something Debian and Ubuntu still won’t do — they require the whole disk for a fully encrypted Linux installation).

But there was no 3D acceleration, and the fan blew like crazy because the APU got so hot.

So I turned to the closed-source AMD Catalyst driver. RPM Fusion packages it, and I immediately got a cooler APU (aka CPU + graphics). I eventually figured out that calling my swap partition in GRUB got me working suspend/resume, but only in closed Catalyst and not in open Radeon.

… to be continued …

Why I’m using the closed Catalyst driver for Linux instead of the open Radeon driver

I’ve been using Fedora Linux for the greater part of this year, starting with F18 and upgrading via Fedup to F19. For most of that time, I’ve used the closed-source AMD Catalyst driver as packaged by RPM Fusion instead of the open Radeon driver that ships by default with Fedora and most every other Linux distribution.

I’m not proud of it. But the differences in performance are too big to ignore.

Things that stink with both drivers: Neither the open- nor the closed-source driver will resume my HP Pavilion g6-2210us laptop after suspend. (The machine uses the AMD A4-4300M APU with AMD Radeon HD 7420G graphics.)

Things that stink with the open driver:
Only the Catalyst driver delivers working 3D acceleration, meaning without it I can’t run GNOME 3 at all, most games look like hell, and a certain wonkiness crops up here and there on various web pages.

With Catalyst, my glxgears frames per second are 100 times greater than with the open driver. I don’t know what glxgears fps numbers really mean, but 5,200 has got to be better than 50.

Things that stink with the closed driver: In Xfce, many application windows have lost the borders on the left and right sides. I can’t explain it.

I also cannot successfuly use UEFI secure boot with the Catalyst-enabled kernel, though I can do so without Catalyst installed. It’s not Secure Boot itself that is stopping the boot. It just hangs at some point — after some IP tables lines in the dmesg, I think. The solution is keeping EFI but turning off Secure Boot.

The AMD Catalyst 13.8 beta video driver for Linux is out, and it breaks my system

So I finally get working 3D acceleration and suspend/resume and get rid of artifacts in Fedora 19 on my HP Pavilion g6 laptop (AMD A4-4300M APU with AMD Radeon HD 7420G graphics) with the 13.6 beta version of the AMD Catalyst driver for Linux.

Except that the 13.8 beta driver was released about a week ago, and it finally came into my system via RPM Fusion.

And it broke X. Login is fine, but most applications — including Firefox — cause X to quit and send me back to the login prompt.

Not good at all.

I had to rip out kmod-catalyst and all associated packages and return to the open-source Radeon driver, which works great — except for the aforementioned artifacts, lack of working 3D acceleration and refusal to resume after suspend.

No dependency hell here. RPM and the Yum package manager (which I’m using via the Yumex graphical front end) have performed admirably. But it’s pretty hard to revert to 13.6 due to all the other related packages that have been upgraded to 13.8.

I haven’t filed a bug on the driver just yet, and the consensus seems to be that AMD developers generally ignore such efforts. There is an “unofficial” Bugzilla instance, and Phoronix readers are discussing 13.8 as well.

So now I wait for the next build of the Catalyst driver to see if my system will like it.

Fedora 18 to 19 upgrade with fedup: It’s alive!

fedora_19_with_catalyst_13_point_six

After a shaky start with Fedora’s fedup update tool to bring my Fedora 18 with Xfce system to Fedora 19, I did manage to successfully upgrade my HP Pavilion g6-2210us (with AMD A4-4300M APU, which features AMD Radeon HD 7420G graphics).

After a curl error on my work network, I started the process on my much slower home network, quickly bypassed the error and started on the slow process of downloading 1,800+ packages.
Continue reading “Fedora 18 to 19 upgrade with fedup: It’s alive!”

Fedora 18 with Xfce on the HP Pavilion g6-2210us — all systems are very, very ‘go’

Just a quick post to tell you that my Fedora 18 with Xfce installation on the HP Pavilion g6-2210us is doing very well indeed.

Unlike Xubuntu 13.04, Fedora 18 WILL run under Secure Boot after installation.

I’m using full disk encryption and working on a separate hard drive (not the Windows 8 drive that shipped with the laptop).

Also unlike Xubuntu 13.04, I had no trouble with sound in Skype. Yep, I already installed Skype in Fedora. And it’s working perfectly.

Like Xubuntu 13.04, overall sound levels are fine once volume is upped via the Pulse Audio Volume Control.

In addition to Skype, things I also added to Fedora 18 without incident included the RPM Fusion repositories, the Adobe Flash browser plugin, gPodder and Xchat. I also found a new kernel and installed it (you’ll see why below).

All went smoothly.

So far Xfce in Fedora looks great. It runs great. It’s super-fast.

The only problem with this laptop and its new AMD APU (CPU plus graphics) is video. The 2D video in Xfce runs with no problem. GNOME 3 is a total mess. Unity is workable but has artifacts (though there was some improvement in the final release of Ubuntu 13.04 that I saw with live media).

And what all of these systems have in common — Ubuntu and Fedora included — is that suspend doesn’t work.

The laptop does go into suspend, but there’s no waking it (i.e. resume is broken). That’s bad because I’m a huge user of suspend/resume. The new kernel I tried from Fedora’s Koji service didn’t help. Eventually Linux, X, radeon and catalyst will catch up to this HD 7000-series video chip. It just hasn’t happened yet.

But I can say right now that Fedora 18 is good enough, configurable enough with proprietary bits, and stable enough for my daily use.

This is the first time I’ve used the Yum Extender for package management, and it’s a terrific, exceedingly quick tool.

What do I miss most not running Linux? Easy, usable FTP via the file manager and text editors (I can’t believe this is so f’d up in Windows8), and easy management of my old, old iPod, which I’m shocked is pretty much impossible to do in Windows without iTunes. I’ve tried a half-dozen music-manager/podcast manager apps, and none of them in Windows can do a damn thing half well.

Getting back to Linux’s gPodder (the Windows version doesn’t do iPod) and Rhythmbox will solve all of my Windows problems. For almost everything else I have mostly free open-source apps that just happen to run on Windows.

But a pure Linux environment would make my life better and easier. That and working suspend/resume and I’ll be a most happy camper. If I were confident that a dual-boot with Windows 8 wouldn’t fail, I’d do it today.

Update: It’s been about 2 1/2 years, and I’m still running Fedora on this laptop. Now I’m on Fedora 22, so that means four in-place upgrades without it blowing up. And I should upgrade to F23 soon.

Now I don’t need the Catalyst driver. The free Radeon driver works great. I don’t even need any hacks for suspend/resume, though I did have one for quite some time. And there are no sound issues — switching between HDMI and native laptop sound is seamless with the pavu (aka PulseAudio Volume Control) application.

My experience is that with new hardware, Linux can be difficult at first, gets better in a year, and now I can say it’s very solid after two years. While that’s a nice thing for people with 2-year-old hardware (like me now), we really need to get to the point where things are pretty good out of the box and totally locked down in six months.

What constitutes totally locked down?

  • Boots from ISO with no issues
  • Installs with no issues, especially no EFI/UEFI problems
  • Installs in dual-boot with Windows with no issues
  • Boots from disk after installation with no issues and allows boot to Linux by default
  • Video works perfectly with free drivers, including HDMI
  • Audio works perfectly, including HDMI
  • Suspend/resume works without any hacks
  • CPU heat and fan usage is comparable to what hardware achieves in Windows

Linux on the HP Pavilion g6-2210us — today’s tests: Debian Wheezy and Xubuntu 13.04

I swapped an old hard drive into the HP Pavilion g6-2210us and gave a few Linux distros a spin today.

Why a separate drive? I’m not at all confident about a successful Linux-Windows 8 dual boot. For those keeping score, this laptop features an AMD A4-4300M APU processor with AMD Radeon HD 7420G graphics. The wireless NIC is by Atheros, and the wired NIC is a Realtek. (I’ll report later on specific NIC chips for wired and wireless Ethernet.)

First up was Debian Wheezy. I had to turn off Secure Boot because Debian doesn’t support it. That was no problem. You can toggle Secure Boot on this HP Pavilion g6, and you can also toggle UEFI and “legacy” BIOS mode. So really I’m only limited by what “works” with the hardware itself. Given my angst lately over video (no GNOME 3 due to shaky 3D acceleration support for this newish AMD chip), that’s cold comfort.

Debian seemed to install perfectly. Except that, early in the install, it wanted me to supply nonfree firmware for the wired networking port (a Realtek NIC) on removable media. I actually got the nonfree .deb package (all Wheezy firmware is here, unpacked it and put the required files on a USB flash drive (formatted as FAT), plugged it in and continued with the install. That didn’t work. Debian didn’t “see” the firmware.

Give what happened later (the laptop stalled during boot), this was strange because the system continued installing from the netboot image — using that very NIC to download all of the required files.

I knew I would have trouble with the 3D acceleration in GNOME 3 (and I later confirmed that the proprietary 3D driver for ATI/AMD does not work on this video card), but I was doing a test install and could always bring in Xfce later.

That wouldn’t matter.

I did the entire installation. But as I hinted above, Debian Wheezy wouldn’t reboot into the new system. It hung during configuration of the wired Ethernet port. I guess I can try again with install media that includes the nonfree firmware.

Later: I did look at the installation guide for Wheezy, where I saw that you need to leave the firmware in .deb package form. I also found install images with the firmware included.

Next up was Xubuntu.

The install went fine with Secure Boot turned on. But on reboot, I had to turn off Secure Boot to get the system up and running. It could have had something to do with the fully encrypted LVM option that I chose during the install. I’ll have to do an install without encrypted LVM to see if it makes a difference in Xubuntu’s ability to run with Secure Boot enabled.

Everything looked good once I was in the system. I installed a boatload of updates. I brought in Skype with the service’s own .deb package. I managed to get audio working in Skype. But upon reboot it was not to be. The audio left Skype, as did the configuration options I had to choose from to make it work in the first place. it might come back on the next boot. Who knows?

Unfortunately I need Skype to work at the moment. I never had such trouble in Debian Wheezy on my now-dead Lenovo G555. Until it died, that is.

Otherwise I was happy with audio. That was a major concern of mine. However, I was able to boost audio levels with the Pulse Audio Volume Control, and audio was every bit as good as it is in Windows 8.

Alas, the day’s experimenting had to come to an end. I swapped back in the Windows 8 hard drive, re-enabled Secure Boot and had a working Win 8 system once again. Yep, it’s as exciting as you thought it was.

Linux on the HP Pavilion g6-2210us, video isn’t perfect, but I’m more worried about audio

I did some tests today with different Linux releases on my new HP Pavilion g6-2210us, and while I’m pretty sure that 3D-accelerated video is something that will come along later — leaving me with some very nice 2D-video desktop environments like Xfce, what’s really worrying me is audio.

Audio was a definite problem in Fedora 18 with Xfce. It was slightly better in Xubuntu 13.04 beta 2 (which will be a final release in two days). I could deal with it in Xubuntu.

What worries me — even with Xubuntu is the basics: It’s not loud enough. Playback on YouTube videos is louder in Windows. Could it have something to do with using HTML 5 on the Linux side and Flash on the Windows side? That is certainly fodder for another test. As is playing audio that isn’t a YouTube video.

I’m too tired to find the links, but I distinctly remember audio being a problem when my now-dead Lenovo G555 laptop was new in 2010. Audio issues were eventually solved with new kernels and new ALSA drivers. Hopefully the same will be true for this now-new HP Pavilion g6.

Earlier today: Linux on the new HP Pavilion g6-2210us — It’s looking like Xfce until video catches up

The next day: I did a full install of Xubuntu, and I was satisfied with audio output as managed by the Pulse Audio volume control.

I tried the fglrx proprietary AMD Radeon video driver, and X wouldn’t start. So much for the closed-source binary driver.

It looks like Linux and X will have to catch up to this video chip.

Linux video and the AMD Radeon HD 7420G in my new HP Pavilion g6-2210us

It’s not looking great for this hunk of new hardware — an HP Pavilion g6-2210us laptop with AMD Radeon HD 7420G graphics — and Linux at this moment.

Things look good in 2D, meaning Xubuntu is probably my best choice right now. But distros running GNOME 3 (so far Fedora 18, Ubuntu GNOME Remix 13.04 beta 2) and Unity (Ubuntu 13.04 beta 2) are problematic. They go from screen tearing to complete video fail.

What I’ve been able to find on this video chip is not encouraging.

What is encouraging (and I hope helpful) is this week’s Fedora Test Days for Radeon, Nouveau and Intel video cards. Fedora gives me a warm, fuzzy feeling when they do things like this. It helps everybody.

Linux and its video drivers eventually catch up to new chips (the same being true for networking and sound chips), but there is usually a wait.

Not so encouraging is my apprehension at dual-booting with Windows 8. Back (a few weeks ago) when I was running a Windows 7 machine, I had wiped the crapware-ridden Windows 32-bit from my 64-bit Lenovo (yep, they cheaped out on that) and replaced it with a “clean” 64-bit Win 7 install from an ISO.

I can’t find any ISO for Windows 8, and I have no idea how many discs it will take to make a restore set from the machine itself.

Add to that: It looks like there are five partitions just for Windows on this drive. How will Ubuntu or Fedora handle that? I don’t see a lot of specific documentation on how the Linux installers deal with existing Windows 8 installations. Except for “it didn’t work” forum posts.

So I’m thinking of working with Linux on a separate hard drive. That would mean I could turn off Secure Boot and have a much wider variety of install choices.

I could also experiment with OpenBSD this way. They keep it quiet, but OpenBSD 5.3 will feature GNOME 3.6.2. I still think it’s the only BSD offering GNOME 3 at all. I would love to kick the tires on this one.

I’ll probably end up with Linux so I can run Skype.

Linux on the HP Pavilion g6-2210us: Part 1 — Trouble with Fedora 18

So I’ve had this HP Pavilion g6-2210us for less than a week now. I knew it had Windows 8 when I got it, but I reconciled myself to the “challenge” of getting a Secure Boot-aware Linux distribution working on it.

I did boot Fedora 18 (aka Spherical Cow) from a live disc today. I had no problem with the Secure Boot (which I want to keep turned on so I can dual-boot Windows 8).

But once I got Fedora’s GNOME 3 desktop on screen, it was all graphics problems. First there were artifacts, then a total inability to read any text or see any images clearly. Plus lots of flashing … things.

FYI, this HP Pavilion g6 has the AMD A4-4300M processor with AMD Radeon HD 7420g graphics. I guess Fedora 18 isn’t terribly compatible with it.

I suppose I could install F18, then add repositories to see if AMD’s proprietary drivers make a difference, but I’d rather explore my options. I’m bringing down the Ubuntu GNOME 13.04 Beta live image right now with a torrent. (I can’t do a direct download because I am bandwidth challenged, and using torrents enables me to start and stop the download at will, even between reboots.)

So I guess I’ll be waiting for Fedora 19 and giving the Ubuntu family a try. As I say above, I’m going to start with the GNOME edition (very formerly called Ubuntu GNOME Remix but probably called simply Ubuntu GNOME right now).

This reminds me of the trouble I had with graphics when I first got the Lenovo G555 in May 2010, and how Fedora 13 ran great until a new kernel pretty much ended things.

This laptop is definitely too new to be a comfortable fit for the majority of Linux distributions (most of which aren’t playing along with Secure Boot, either just yet or … ever).