Ubuntu

Build in ATI/radeon framebuffers on PowerPC

Reported by ojordan on 2012-03-07
58
This bug affects 12 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Tim Gardner
Precise
Medium
Tim Gardner
Quantal
Undecided
Tim Gardner

Bug Description

Hi,

Could I request a few kernel changes to improve out-of-the-box support on PowerPC please? They involve the ATI/radeon framebuffers and KMS support.

Since 11.04 the framebuffers used by Rage, Rage128 and radeon graphics cards have been compiled as modules. This has resulted in a number of problems, such as booting to a command prompt, loss of tty consoles and loss of suspend. Debian still builds in these modules and it has been commented by a few people who are testing 12.04 that Ubuntu and its derivatives are lagging behind in their user friendlyness.

Whilst it is possible to load the framebuffers as modules (and the Ubuntu PowerPC documentation describes how to do this), building back the modules into the kernel is the only way I can think of that will easily get everything working out of the box again. It will stop the openfirmware framebuffer from grabbing the resources.

The other change I would like to see is radeon defaulting to KMS on. This was the case in 10.04 and 10.10. This did cause a lot of complaints at the time about loss of 3d hardware acceleration, but 12.04 does not have UMS support anymore. KMS is the future! (if currently a little shakey! - there is no suspend with it and it crashes a lot with AGP)

Here is what I propose:

CONFIG_DRM_RADEON_KMS=y
CONFIG_FB_RADEON=y
CONFIG_FB_ATY128=y
CONFIG_FB_ATY=y

I don't know if there is some way to ensure that the above framebuffers are loaded in preference to the openfirmware framebuffer (CONFIG_FB_OF) ?

This setup should mean that tty consoles and suspend should work by default. Also, it will allow everything to be controlled from the kernel command line (yaboot prompt on PowerPC). If somebody wants fully working radeon KMS then they can disable radeonfb and offb with video=radeonfb:off video=offb:off. If there is some problem with KMS they can disable it with radeon.modeset=0. I've been over the options, and I think this is the best setup.

Finally, I've been trying to work out what to do with CONFIG_AGP_UNINORTH. Currrently it is compiled as a module, but debian has it built in. From the tests I've done there appears to be a race issue with it being compiled as a module. Under 10.04, KMS reverts to PCI mode because of it. This is actually a good thing as without forcing PCI mode (radeon.agmode=-1) it seems PowerPC radeon KMS crashes. From anecdotal evidence reading forums I would say Ubuntu nouveau support is better than Debain wheezy, and I'm wondering if this is the possible cause? So I'm thinking leave CONFIG_AGP_UNINORTH=m since we're trying to improve out-of-the box support. You can add uninorth_agp to /etc/modules to get it to load in time if needed. This gives a nice fancy splash screen, but results in the need for the additional radeon.agpmode=-1 parameter. Ideally, I need some nouveau people to test the stability of AGP (they use nouveau.agpmode=0 to disable AGP in 12.04).

Hopefully the above makes sense!

Thanks for reading this!

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-18-powerpc 3.2.0-18.28
ProcVersionSignature: Ubuntu 3.2.0-18.28-powerpc 3.2.9
Uname: Linux 3.2.0-18-powerpc ppc
AcpiTables:

AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Snapper [PowerMac Snapper], device 0: PMac Snapper [PowerMac Snapper]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
ApportVersion: 1.94-0ubuntu1
Architecture: powerpc
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Snapper [PowerMac Snapper], device 0: PMac Snapper [PowerMac Snapper]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: adam 1147 F.... lxpanel
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Snapper'/'PowerMac Snapper (Dev 38) Sub-frame 0'
   Mixer name : 'PowerMac Snapper'
   Components : ''
   Controls : 15
   Simple ctrls : 14
Date: Wed Mar 7 18:48:08 2012
HibernationDevice: RESUME=UUID=47641231-8c14-4d18-89b3-1d18df122ad5
InstallationMedia: Lubuntu 12.04 "Precise Pangolin" - Beta powerpc (20120301.1)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
PciMultimedia:

ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcFB:
 0 OFfb ATY,Via_A
 1 OFfb ATY,Via_B
ProcKernelCmdLine: root=UUID=4c63bdc8-1be5-4b20-a938-298abd5ca619 ro quiet splash
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-18-powerpc N/A
 linux-backports-modules-3.2.0-18-powerpc N/A
 linux-firmware 1.71
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)

ojordan (ojordan12345) wrote :
Brad Figg (brad-figg) on 2012-03-07
Changed in linux (Ubuntu):
status: New → Confirmed
ojordan (ojordan12345) on 2012-03-07
tags: added: bot-stop-nagging
description: updated
description: updated
Changed in linux (Ubuntu):
importance: Undecided → Medium
ojordan (ojordan12345) on 2012-03-07
description: updated
ojordan (ojordan12345) wrote :

I've been playing a bit more with this. I now think it is agpgart rather than uninorth_agp that influences whether KMS reverts to PCI mode or not. Well that is what it seems to be under 10.04. Agpgart is built into 12.04 already so I guess the nouveau people have been using AGP mode all along? It is hard to tell what affects what as the boot order can be quite random it seems and small things can have a 'butterfly' effect.

The parameter video=ofonly works well under 10.04 to disable the radeonfb framebuffer. This gives a very nice splash screen . However, I cannot replicate this under 12.04. The colours are all messed up (particularly on shutdown) and nothing I seem to do can correct this. As described in post 1, video=offb:off video=radeonfb:off gives the best splash results on boot, but has no effect on shutdown.

ojordan (ojordan12345) wrote :

More on the splash screen colours (going off topic) - I think it is caused by the framebuffer being set to 8 bit depth? In 10.04 the splash screen is blue instead of purple, but looks acceptable. In 12.04 Lubuntu it is all wrong. Currently I cannot figure out how to set the framebuffer depth with KMS on.

ojordan (ojordan12345) wrote :

Just a quick comment to explain why the aty_128 framebuffer needs to be built in. The r128 video driver has UseFBDev set to on for PowerPC (see the manual http://manpages.ubuntu.com/manpages/precise/en/man4/r128.4.html ). Thus without the framebuffer loaded the r128 video driver will boot to a terminal.

ojordan (ojordan12345) wrote :

On a fresh install today from the precise desktop cd I tried to turn on KMS with radeon.modeset=1. This brought me to a running in low graphics mode message.

It is because of a race issue described in the KMS wiki https://wiki.ubuntu.com/X/KernelModeSetting . I have the "RADEONDRIGetVersion failed" message in the Xorg.0.log. It used to be the case that you would end up at a terminal becuase of this.

This is why I am requesting KMS on by default for radeon cards. On kernels where KMS is on (lucid, debian sid) you don't have this problem.

ojordan (ojordan12345) wrote :

I've made bugs that request radeonfb be built in (bug 779110) and bugs that request radeonfb NOT be built in (bug 596515) duplicates of this one. These are obviously opposing bugs, but this bug is about finding a setup that everybody is happy with.

From comments in bug 779110 it seems I have not made the intentions of this bug report very clear. As the title suggests the most imortant request is to build back in the ATI and radeon framebuffers. Building back in these framebuffers fixes suspend, lack of tty terminals and allows machines with rage 128 cards to actually use the r128 driver (unlike other architectures, for powerpc it expects the framebuffer to be there).

I've requested KMS to be on by default although the presence of radeonfb will stop this from working (bug 596515). It is very easy to turn off radeonfb so I don't see this as a problem. From kernels that have KMS turned on by default (e.g. lucid) it seems this solves a race issue when you do want to use it and this is why I have requested it. It will not have any effect in 12.04 until you turn off radeonfb.

Finally, the strange splash colours that I describe in the above comments are similar to those described in bug 564471 and so I don't want this bug to be distracted by them.

ojordan (ojordan12345) wrote :

I've tracked down when the framebuffers were removed https://lists.ubuntu.com/archives/kernel-team/2011-April/015249.html

KMS was also turned off at the same time https://lists.ubuntu.com/archives/kernel-team/2011-April/015248.html . If I am reading that correctly, it looks like KMS was left on for PowerPC 64 bit machines. I wonder if this is still the case?

ojordan (ojordan12345) wrote :

CONFIG_DRM_RADEON_KMS is not set for PowerPC 64. Configurations are here http://kernel.ubuntu.com/~kernel-ppa/configs/ if anybody is interested.

ojordan (ojordan12345) wrote :

I asked the linuxppc-dev mailing list about this proposed setup and KMS with a radeon card http://lists.ozlabs.org/pipermail/linuxppc-dev/2012-April/097503.html

ojordan (ojordan12345) wrote :
ikke (ikke-iki) wrote :

I confirm Apple PowerBook G4 17" would work with the radeonfb compiled into kernel. I just re-compiled 3.2.0-23-powerpc-smp and set the following options:

3886c3886
< # CONFIG_DRM_RADEON_KMS is not set
---
> CONFIG_DRM_RADEON_KMS=y
3948c3948
< CONFIG_FB_RADEON=m
---
> CONFIG_FB_RADEON=y
3952c3952
< CONFIG_FB_ATY128=m
---
> CONFIG_FB_ATY128=y
3954c3954
< CONFIG_FB_ATY=m
---
> CONFIG_FB_ATY=y

And that made the suspend work and I can switch to tty's which were garbled earlier. Please apply the changes into kernel config, otherwise the PowerBook is serioysly broken on ubuntu.

I also need to apply the following as kernel params:

radeon.modeset=0 video=radeonfb:1440x900-24@60

ojordan (ojordan12345) wrote :

@ikke Thanks for the comment. I'm afraid it is almost certainly too late for 12.04 to get these changes in. It is unlikely that there will be another kernel upload before release. Considering this probably affects half of the PowerPC mac users the amount of people reporting this bug is pitifully small! Not enough to be noticed anyway.

Btw, compiling a kernel is an extreme solution. It is much easier to load the modules. I've update the PowerPC Known Issues page with the necessary workarounds and links https://wiki.ubuntu.com/PowerPCKnownIssues#A12.04_Precise_Pangolin .

Tim Gardner (timg-tpi) on 2012-04-23
Changed in linux (Ubuntu Precise):
assignee: nobody → Tim Gardner (timg-tpi)
status: Confirmed → In Progress
Tim Gardner (timg-tpi) on 2012-04-23
Changed in linux (Ubuntu Precise):
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Changed in linux (Ubuntu Precise):
status: In Progress → Fix Committed
Tim Gardner (timg-tpi) on 2012-04-24
Changed in linux (Ubuntu Quantal):
status: In Progress → Fix Committed
Phill Whiteside (phillw) wrote :

There 'may' be a kernel rebuld for ppc, as there is a possibility that something got dropped. The release team are awaiting with baited breath, the results of https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/987764 We're in the laps of the Gods at this stage, and I very much doubt they would even consider include extras if there is a 'work-around'. Only Release Critical can cause re-spins now. The rest has to go to release notes and SRU's.

Hello ojordan, or anyone else affected,

Accepted linux into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.2.0-24.37

---------------
linux (3.2.0-24.37) precise-proposed; urgency=low

  [ Herton Ronaldo Krzesinski ]

  * d-i: Add hid-logitech-dj to input-modules
    - LP: #975198
  * d-i: Add rtl8187 driver to nic-usb-modules
    - LP: #971719

  [ Ian Abbott ]

  * SAUCE: staging: comedi: Add module parameters for default buffer size
    - LP: #981234
  * SAUCE: staging: comedi: Add kernel config for default buffer sizes
    - LP: #981234

  [ K. Y. Srinivasan ]

  * SAUCE: hv_storvsc: Account for in-transit packets in the RESET path
    - LP: #978394

  [ Leann Ogasawara ]

  * [Config] Set CONFIG_COMEDI_DEFAULT_BUF_[SIZE_KB,MAXSIZE_KB]
    - LP: #981234

  [ Luis Henriques ]

  * SAUCE: ite-cir: postpone ISR registration
    - LP: #984387

  [ Manoj Iyer ]

  * SAUCE: Bluetooth: btusb: Add vendor specific ID (0489 e042) for
    BCM20702A0
    - LP: #980965

  [ Tim Gardner ]

  * Extract firmware module info during getabi
  * [Config] Remove hiq-quanta module references
    - LP: #913164
  * [Config] powerpc-smp: build in ATI and RADEON frame buffer drivers
    - LP: #949288

  [ Trond Myklebust ]

  * SAUCE: NFSv4: Ensure that the LOCK code sets exception->inode
    - LP: #974664
  * SAUCE: NFSv4: Ensure that we check lock exclusive/shared type against
    open modes
    - LP: #974664

  [ Upstream Kernel Changes ]

  * Input: psmouse - allow drivers to use psmouse_{de,}activate
    - LP: #969334
  * Input: psmouse - use psmouse_[de]activate() from sentelic and hgpk
    drivers
    - LP: #969334
  * Input: sentelic - refactor code for upcoming new hardware support
    - LP: #969334
  * Input: sentelic - enabling absolute coordinates output for newer
    hardware
    - LP: #969334
  * Input: sentelic - minor code cleanup
    - LP: #969334
  * Input: sentelic - improve packet debugging information
    - LP: #969334
  * Input: sentelic - filter taps in absolute mode
    - LP: #969334
  * drm/i915: Fixes distorted external screen image on HP 2730p
    - LP: #796030
  * NFSv4: Minor cleanups for nfs4_handle_exception and
    nfs4_async_handle_error
    - LP: #974664
  * NFSv4: Rate limit the state manager for lock reclaim warning messages
    - LP: #974664
  * HID: multitouch: merge quanta driver into hid-multitouch
    - LP: #913164
  * HID: usbhid: add quirk no_get for quanta 3008 devices
    - LP: #913164
 -- Leann Ogasawara <email address hidden> Tue, 24 Apr 2012 07:47:49 -0700

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
ojordan (ojordan12345) wrote :

@ Martin Pitt - Sorry about the delay. The proposed kernel works fine and fixes the suspend problem with my radeon card. Many thanks.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.2.0-24.37

---------------
linux (3.2.0-24.37) precise-proposed; urgency=low

  [ Herton Ronaldo Krzesinski ]

  * d-i: Add hid-logitech-dj to input-modules
    - LP: #975198
  * d-i: Add rtl8187 driver to nic-usb-modules
    - LP: #971719

  [ Ian Abbott ]

  * SAUCE: staging: comedi: Add module parameters for default buffer size
    - LP: #981234
  * SAUCE: staging: comedi: Add kernel config for default buffer sizes
    - LP: #981234

  [ K. Y. Srinivasan ]

  * SAUCE: hv_storvsc: Account for in-transit packets in the RESET path
    - LP: #978394

  [ Leann Ogasawara ]

  * [Config] Set CONFIG_COMEDI_DEFAULT_BUF_[SIZE_KB,MAXSIZE_KB]
    - LP: #981234

  [ Luis Henriques ]

  * SAUCE: ite-cir: postpone ISR registration
    - LP: #984387

  [ Manoj Iyer ]

  * SAUCE: Bluetooth: btusb: Add vendor specific ID (0489 e042) for
    BCM20702A0
    - LP: #980965

  [ Tim Gardner ]

  * Extract firmware module info during getabi
  * [Config] Remove hiq-quanta module references
    - LP: #913164
  * [Config] powerpc-smp: build in ATI and RADEON frame buffer drivers
    - LP: #949288

  [ Trond Myklebust ]

  * SAUCE: NFSv4: Ensure that the LOCK code sets exception->inode
    - LP: #974664
  * SAUCE: NFSv4: Ensure that we check lock exclusive/shared type against
    open modes
    - LP: #974664

  [ Upstream Kernel Changes ]

  * Input: psmouse - allow drivers to use psmouse_{de,}activate
    - LP: #969334
  * Input: psmouse - use psmouse_[de]activate() from sentelic and hgpk
    drivers
    - LP: #969334
  * Input: sentelic - refactor code for upcoming new hardware support
    - LP: #969334
  * Input: sentelic - enabling absolute coordinates output for newer
    hardware
    - LP: #969334
  * Input: sentelic - minor code cleanup
    - LP: #969334
  * Input: sentelic - improve packet debugging information
    - LP: #969334
  * Input: sentelic - filter taps in absolute mode
    - LP: #969334
  * drm/i915: Fixes distorted external screen image on HP 2730p
    - LP: #796030
  * NFSv4: Minor cleanups for nfs4_handle_exception and
    nfs4_async_handle_error
    - LP: #974664
  * NFSv4: Rate limit the state manager for lock reclaim warning messages
    - LP: #974664
  * HID: multitouch: merge quanta driver into hid-multitouch
    - LP: #913164
  * HID: usbhid: add quirk no_get for quanta 3008 devices
    - LP: #913164
 -- Leann Ogasawara <email address hidden> Tue, 24 Apr 2012 07:47:49 -0700

Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
Herton R. Krzesinski (herton) wrote :

Marking verification-done for precise as per comment #16

tags: added: verification-done-precise

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

Duplicates of this bug

Other bug subscribers