# macbook pro 8.2 radeon gnome brightness problem

## alvinwu

Hi,

I install gentoo linux into a macbook pro 8.2 laptop (triple boot, OSX, Win7, Linux) with the following problems:

1. broadcom 4331 wireless port unsupported yet

2. cannot control brightness via gnome-power-manager

About the (1), I use an usb wireless adaptor to bypass it.

However about (2), I cannot find any solution to overcome it yet. So I try to describe what I've tried and the situations. Hope somebody can help me to solve this issue.

-----------Legacy Boot--------------------------------------

The machine is boot from Refit, that legacy grub, then Linux.

-----------Kernel modules-------------------------------------

applesmc

apple_bl

hid_apple

drm_kms_helper

radeon

drm

i2c_algo_bit

i2c_core

ttm

-------------------emerge info-----------------------

app-shells/bash:          4.2_p10

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.7.2, 3.1.3-r1, 3.2

dev-util/ccache:          3.1.5

dev-util/cmake:           2.8.4-r1

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      2.0.3

sys-apps/openrc:          0.8.3-r1

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1

sys-devel/binutils:       2.21.1

sys-devel/gcc:            4.5.2

sys-devel/gcc-config:     1.4.1-r1

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r1

sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)

sys-libs/glibc:           2.13-r2

Repositories: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O3 -march=native -pipe -floop-interchange -floop-strip-mine -floop-block"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O3 -march=native -pipe -floop-interchange -floop-strip-mine -floop-block"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="http://distfiles.gentoo.org    http://gentoo.aditsu.net:8000/ ftp://gentoo.cs.nctu.edu.tw/gentoo/ http://ftp.twaren.net/Linux/Gentoo/"

LANG="en_HK.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en en_US zh zh_TW zh_CN ja_JP ko_KR th_TH ja ko th korean japanese thai"

MAKEOPTS="-j7"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 

--exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

Portage 2.1.10.3 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.2, glibc-2.13-r2, 2.6.39-gentoo-r2 x86_64)

=================================================================

System uname: Linux-2.6.39-gentoo-r2-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.0.3

Timestamp of tree: Sun, 03 Jul 2011 14:00:01 +0000

ccache version 3.1.5 [enabled]

USE="X a52 aac accessibility acl acpi alsa amd64 apache2 audiofile avahi bcmath berkdb bidi bluetooth branding bzip2 cairo cdda cddb cdparanoia cdr cjk clamav cli consolekit cracklib crypt css cups cxx dbus djvu dri dts dvd dvdr eds emboss encode evo exif fam fftw firefox flac fontconfig fortran gdbm gdu gif gimp gmp gnome gnome-keyring gnutls gpm gstreamer gtk iconv ieee1394 imagemagick ipod ipv6 java java6 jpeg jpeg2k latex lcms ldap libedit libnotify libsamplerate lm_sensors lzma lzo m17n mad midi mmx mng modules mp3 mp4 mpeg mpi mudflap multilib musicbrainz mysql nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 raw readline samba sdl session smp sndfile sound speex spell sqlite sqlite3 sse sse2 ssl ssse3 startup-notification svg sysfs tcpd theora threads tiff truetype udev unicode usb v4l2 vorbis wifi x264 xcb xcomposite xinerama xml xorg xpm xulrunner xv xvid zeroconf zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard synaptics mtrack evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US zh zh_TW zh_CN ja_JP ko_KR th_TH ja ko th korean japanese thai" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa fbdev radeon intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

----------------profile------------

  [3]   default/linux/amd64/10.0/desktop/gnome *

---------- /sys information------------

Only /sys/class/backling/acpi_video0

-------------/etc/X11/xorg.conf.d-------------------------

I have nothing manually set here for the display device, only other minors for the mtrack touchpad..

----------  observations------------------

1. The gpm F1 F2 can control the brightness normally when I boot from a Ubuntoo 11.04 amd64 cd

2. The gpm F1 F2 actions does change the numbers in /sys/class/backlight/acpi_video/brightness, etc, but the actual screen brightness remains unaffected. 

3. radeontool fails to work since avivotool exits with segmentation fault

4. When the machine resumes after a suspend, the screen wakes with full brightness, of course I cannot change it with whatever means unless a reboot...

5. The "/sys/class/backlight/acpi_video0/type" value is firmware

Any help for this problem is much appreciated!

----------

## chithanh

Unfortunately it does not look like there is any work underway to support the Broadcom 4331.

http://linuxwireless.org/en/users/Drivers/b43

Regarding the backlight, sometimes upgrading to a newer kernel can help. If possible, try latest git-sources-3.0_rc7 and see if the /sys/class/backlight controls now work.

Some users have reported that it makes a difference whether they boot in EFI or legacy BIOS mode.

----------

## andybotting

The current kernels (including 3.0) doesn't support the backlight on these new MacBook Pros.

See the comments by Sloth on this Ubuntu forum thread:

http://ubuntuforums.org/showthread.php?t=1695746&page=23

http://ubuntuforums.org/showthread.php?t=1695746&page=24

His patches might not work on 3.0, but I have a patch which will apply. Also the AHCI patch is supposed to improve I/O performance too. 

cheers,

Andy

----------

## alvinwu

Hi,

I try plenty git-sources-3.0 & grub efi (bzr latest trunk, 1-99-rc2... .. follow some instruction from the web experts...)i, etc. Still cannot make the radeon display card work properly.  The following is the Error message from the log:

------------------------

Jul 29 23:51:15 [kernel] [drm] radeon defaulting to kernel modesetting.

Jul 29 23:51:15 [kernel] [drm] radeon kernel modesetting enabled.

Jul 29 23:51:15 [kernel] fb: conflicting fb hw usage radeondrmfb vs EFI VGA - removing generic driver

Jul 29 23:51:15 [kernel] Console: switching to colour dummy device 80x25

Jul 29 23:51:15 [kernel] radeon 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

Jul 29 23:51:15 [kernel] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741).

Jul 29 23:51:15 [kernel] [drm] register mmio base: 0xB0800000

Jul 29 23:51:15 [kernel] [drm] register mmio size: 131072

Jul 29 23:51:15 [kernel] radeon 0000:01:00.0: Invalid ROM contents

                - Last output repeated twice -

Jul 29 23:51:15 [kernel] [drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM

Jul 29 23:51:15 [kernel] radeon 0000:01:00.0: Fatal error during GPU init

Jul 29 23:51:15 [kernel] [drm] radeon: finishing device.

Jul 29 23:51:15 [kernel] [TTM] Memory type 2 has not been initialized.

Jul 29 23:51:15 [kernel] vga_switcheroo: disabled

Jul 29 23:51:15 [kernel] radeon 0000:01:00.0: PCI INT A disabled

Jul 29 23:51:15 [kernel] radeon: probe of 0000:01:00.0 failed with error -22

---------------------------------------------------

The display turns into black (just when the radeon modules are being loaded) and the PC keeps on booting.

I did try many options such as loadbios, outb, noefi,  options ...etc; but with no luck via efi boot.

Suppose I have to wait for sometime...anyway thanks for your advises.

----------

