suspend fails on powerpc > 2.6.38-1 in IOCTL PMU_IOC_SLEEP

Bug #779110 reported by Jonathan Hudson
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: linux-image-powerpc

On PowerPC, G4 tibook, suspend worked fine for kernels 2.6.38-1 and earlier.
In kernel 2.6.38-8 and later (the kernels in between did not boot on PPC), suspend fails. This appears to be because the recent kernels do not suspend when the PMU_IOC_SLEEP is issued. This is quite easily demonstrated:

1. Create the following file (pmus.pl), lifted directly from /usr/lib/pm-utils/pm-functions

#!/usr/bin/perl
sub PMU_IOC_SLEEP { 0x20004200; }
open PMU, "/dev/pmu" or die "open /dev/pmu: $!";
ioctl PMU, &PMU_IOC_SLEEP, 0;

On 2.6.38-1, running the perl script causes the system to suspend.

On 2.6.38-8 and later (including the current 11.10 kernel), the script executes, but the system does not suspend.

Revision history for this message
Jonathan Hudson (jh+lpd) wrote :

Forgot to mention that this is on a standard 11.04 (natty) install --- the 11.10 kernel was added to see if that helped, which it does not.

The numeric value for the PMU_IOC_SLEEP ioctl validates against the installed kernel headers.

-jh

Revision history for this message
Jonathan Hudson (jh+lpd) wrote :

The thread here <http://mailrepository.com/linuxppc-dev.lists.ozlabs.org/msg/3237221/> and the presence of the following in dmesg

[ 26.210182] radeonfb 0000:00:10.0: enabling device (0086 -> 0087)
[ 26.210220] radeonfb 0000:00:10.0: BAR 0: can't reserve [mem 0xb8000000-0xbfffffff pref]
[ 26.210227] radeonfb (0000:00:10.0): cannot request region 0.
[ 26.210435] radeonfb: probe of 0000:00:10.0 failed with error -16

combined with the fact that radeonfb was not available as a module in the last working kernel (2.6.38-1 ?possibly compiled in?) is perhaps relevant?

-jh

Revision history for this message
Jonathan Hudson (jh+lpd) wrote :

If the kernel is built with CONFIG_FB_RADEON=y (vice =m), then suspend works again. So this looks like an Ubuntu regression, even if modular building is what the maintainer desires.

-jh

Brad Figg (brad-figg)
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in dianosing the problem. From a terminal window please run:

apport-collect 779110

and then change the status of the bug back to 'New'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jonathan Hudson (jh+lpd) wrote :

Running apport is not appropriate during the execution of this bug, and as running kernels build with CONFIG_FB_RADEON=y has, for the 2 months, removed all evidence of the bug, it is justifiably "confirmed".

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Riccardo Murri (rmurri) wrote :

I too can confirm that Jonathan's suggestion of recompiling with CONFIG_FB_RADEON=y fixes the issue.

Revision history for this message
Riccardo Murri (rmurri) wrote :

This is not a duplicate of bug #949288.

This issue is about suspend failing on PPC hardware, which turns out to be an effect of not having Radeon FB compiled in the kernel; bug #949288 instead is devoted to discussing the opportunity of having KMS support in the kernel, also for older hardware like Radeon. It's not the same issue, or at least, not the same angle.

Please remove the duplicate status.

Revision history for this message
ojordan (ojordan12345) wrote :

It is exactly the same issue. Bug 949288 requests that radeon FB be built into the kernel.

The presence of FB_radeon will stop KMS from working (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/59651 ) so you will still have suspend.

Without KMS you won't have 3d hardware acceleration though (see https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/946677 ). Some applications also now require KMS so the option to easily enable KMS is beneficial.

The current setup of 11.04, 11.10 and 12.04 neither benefits radeon UMS or KMS. Bug 949288 tries to find a setup that works for UMS and KMS, and it does. You can alter your graphics setup from the kernel command line (yaboot prompt) unlike at present which requires altering several files.

BTW, compiling a kernel is an extreme solution to your suspend problem. See https://wiki.ubuntu.com/PowerPCFAQ#Power_preferences.2BAC8-suspend.2BAC8-multimedia_keys .

Revision history for this message
ojordan (ojordan12345) wrote :

Missed a '5' off one of the above links. It should be https://bugs.launchpad.net/ubuntu/+source/linux/+bug/596515

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers