You are not logged in.

#1 2016-02-21 00:05:42

ravelax
Member
Registered: 2016-02-20
Posts: 9

[macbook 3,1] No backlight on resume

Hello all!

First of all, apologies if this thread is in the wrong place, or if I should have posted in an existing thread about a similar problem...

Anyway, I just installed BunsenLabs RC2 on a late 2007 MacBook 3,1, it seems to work very well for the most part, but I'm having trouble with the backlight not turning on when resuming after suspend. The computer resumes normally, it's just the backlight that leaves the display dark. The brightness keys don't work, neither does altering settings in Xfce Power Manager. I've done tons of googling and tried several suggestions but nothing has worked, and after a while I just end up very confused as to what I should attempt or not. Being a total Linux n00b in general there are lots of things I don't really understand or know how to do yet (but anxious to learn!), which has kept me from trying certain suggestions, and which also makes me unsure of whether I've even managed to do the things I have tried correctly...

A user on the Debian.net forums with the same computer managed to fix the issue in regular Debian Jessie by downgrading the kernel to a previous version (this thread, user Ricca). It's the only instance I've found so far of someone with the same hardware and the same problem, so I'd like to try that solution but haven't yet found out how to do it, and more importantly I'd like your input on whether it's a good idea or not to try it in BunsenLabs.

I tried Xubuntu 14.04 for a while and had no trouble suspending and resuming then, but I prefer BunsenLabs so I'm anxious to solve this problem. My graphics card is an Intel GM965, the backlight seems to be listed as "apple_backlight" in /sys/class/backlight. If you need any other info or anything, tell me how to get it and I'll post it here! smile Thanks in advance!

Offline

#2 2016-02-21 00:12:39

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [macbook 3,1] No backlight on resume

I think that it would be better to try a newer kernel version from jessie-backports rather than downgrading to an old kernel version, see the link in my signature for details.

Are there any other folders under /sys/clas/backlight?

What is the output of:

cat /proc/cmdline
systemctl --all|grep backlight

Offline

#3 2016-02-21 00:17:16

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

No other folders. This is the output:

frasse@c-ee29e655:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-686-pae root=UUID=b5971923-3e37-4844-90b1-90086fe95bc4 ro initrd=/install/gtk/initrd.gz quiet
frasse@c-ee29e655:~$ systemctl --all|grep backlight
  sys-devices-virtual-backlight-apple_backlight.device                                     loaded    active   plugged   /sys/devices/virtual/backlight/apple_backlight
  systemd-backlight@backlight:apple_backlight.service                                      loaded    active   exited    Load/Save Screen Backlight Brightness of backlight:apple_backlight
  system-systemd\x2dbacklight.slice                                                        loaded    active   active    system-systemd\x2dbacklight.slice

Last edited by ravelax (2016-02-21 00:18:15)

Offline

#4 2016-02-21 00:22:34

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [macbook 3,1] No backlight on resume

How are you suspending your machine?

Does the backlight resume correctly if you use:

systemctl suspend

Offline

#5 2016-02-21 00:29:29

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

I've tried different methods: Closing lid, pressing power button, suspending from the Exit-menu, systemctl suspend, nothing has worked so far...

(also, upgrading the kernel following your instructions didn't work, I get this error:

E: Release 'jessie-backports' for 'linux-image-amd64' was not found

)

Offline

#6 2016-02-21 00:38:28

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [macbook 3,1] No backlight on resume

ravelax wrote:

also, upgrading the kernel following your instructions didn't work, I get this error:

E: Release 'jessie-backports' for 'linux-image-amd64' was not found

Oh yes, sorry.

Try:

sudo apt install linux-image-4.3.0-0/jessie-backports

https://packages.debian.org/jessie-back … .1-686-pae

You can use `apt search linux-image` to show all available versions.

I don't know if there is a metapackage for that architecture or even if that is the correct version -- I only have amd64 hardware.

Offline

#7 2016-02-21 01:01:20

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

Thanks, that seems to work! I'll install it and see if it solves the backlight issue.

Offline

#8 2016-02-21 12:09:04

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

Nope, upgrading the kernel did nothing to solve the problem. sad

Offline

#9 2016-02-21 12:30:26

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [macbook 3,1] No backlight on resume

You could try some of the old backlight kernel parameters:

acpi=backlight_vendor

Or:

video.use_native_backlight=1

These must be added to /etc/default/grub on the GRUB_CMDLINE_LINUX line; run `sudo update-grub` after changing the file.

EDIT: those parameters will only work with kernel >4.1, for newer kernels see https://wiki.archlinux.org/index.php/Ba … ne_options

Alternatively, try a udev rule to set the backlight value explicitly:

# /etc/udev/rules.d/81-backlight.rules
SUBSYSTEM=="backlight", ACTION=="add", KERNEL=="apple_backlight", ATTR{brightness}="5"

This example uses a brightness value of "5" -- check what an appropriate value might be in /sys/class/backlight/apple_backlight/brightness

EDIT2: You could also try masking the apple_backlight.service

sudo systemctl mask apple_backlight

Last edited by Head_on_a_Stick (2016-02-21 12:40:59)

Offline

#10 2016-02-21 17:34:12

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

Thanks for taking the time to help! I've tried all of these suggestions, none of them solved the problem, but I noticed that some give "better" results than others:

acpi_backlight=vendor

and

acpi_backlight=video

work best. Using "native" or "none" instead, as suggested on the Arch Wiki Backlight page, results in a black screen (though with working backlight) when loading the log-in screen after boot. That's fixed by closing and then opening the lid.

video.use_native_backlight=1

works almost like using the "vendor" or "video" settings, but it messes up the tray icons (fixed by logging out then in again).

Setting a udev rule doesn't seem to do anything, neither does masking the apple_backlight.service. I've also tried setting the backlight brightness with

cd /sys/class/backlight/apple_backlight 
echo <value> | sudo tee brightness

after resume, but it doesn't work, or rather, the command seems to be working but the backlight remains off... 

Since playing around with the kernel parameters in Grub doesn't result in ACPI registering its own backlight entry (acpi_video0), as suggested on Arch Wiki, this seems to be a mac-specific ACPI-issue... I googled "apple_backlight" and found this entry on the Ubuntu wiki, suggesting there is a solution available for Ubuntu, which might explain why I didn't have any trouble resuming in Xubuntu on this computer.

I also have BunsenLabs running on a PC laptop (HP Compaq nc2400), where I haven't had any issues whatsoever smile. Graphics card is also an Intel, but GM945. It has entries for both an "intel_backlight" and an "acpi_video0" under /sys/class/backlight, without any custom configuration of Grub. Besides not being a mac I originally installed BunsenLabs RC1 to this computer. Could it be worth a try replacing RC2 on the macbook with RC1 (still have it on disc), to see if that solves anything, and then doing a system upgrade through apt-get?

Last edited by ravelax (2016-02-21 17:36:40)

Offline

#11 2016-02-21 17:53:33

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [macbook 3,1] No backlight on resume

ravelax wrote:

Could it be worth a try replacing RC2 on the macbook with RC1 (still have it on disc), to see if that solves anything

No, a fully updated rc1 installation should be exactly equivalent to a fresh rc2 (user configuration aside).

A fully updated system is always a good thing with Debian stable though wink

Have you tried just entering your password and pressing <Return> when you have the blank screen?

It could be a screenlocker issue rather than a low backlight setting.

Offline

#12 2016-02-21 18:18:47

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

The screen is not really blank, everything is there, it's just the backlight that doesn't go back on when resuming. I can even use the computer by shining a light on the display to see a little better (but it's rather tedious, of course). It doesn't seem to be a screen locker issue... I did try disabling lightlocker, it was one of the first suggestions I encountered when starting to search for solutions, but it  didn't help. I tried it again just now just to make sure, but it resulted in a new, weird behavior: the display repeatedly flashing between on and off (while on: completely black and no backlight)... entering username and password did nothing, I had to shut down by holding the power button. hmm

Offline

#13 2016-02-21 18:35:14

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [macbook 3,1] No backlight on resume

I can only presume this is a kernel regression in respect of backlight support for your hardware and that Ubuntu have patched their kernel version to fix it.

You could try a git bisect from a known working kernel version and try to find the dodgy commit but it's a *lot* of work.

You could perhaps try a minimal Ubuntu install and use johnraff's script to try to install BunsenLabs but this would be entirely unsupported and very experimental.
https://github.com/BunsenLabs/bunsen-netinstall

You could also try creating Debian-compatible versions of the apple-gmux-dkms package mentioned in your Ubuntu wiki link by following this guide:
https://wiki.debian.org/CreatePackageFromPPA

*Do not* attempt to add the PPA and install directly as it may wreck your system.

Offline

#14 2016-02-21 18:49:38

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

I can only presume this is a kernel regression in respect of backlight support for your hardware and that Ubuntu have patched their kernel version to fix it.

That does indeed seem to be the case... Thanks for all your help so far, anyway! smile I'll try converting the Ubuntu package and post the results here.

Offline

#15 2016-02-22 17:17:02

ravelax
Member
Registered: 2016-02-20
Posts: 9

Re: [macbook 3,1] No backlight on resume

I managed to convert the ubuntu package and install it, it did nothing, and on further googling it seems my computer doesn't even use gmux (it's found on more recent dual graphics card MacBook Pro's). Oh well.

For now I'll go back to running Ubuntu on the Mac, at least I have BunsenLabs running impeccably on the PC laptop I mentioned smile

Last edited by ravelax (2016-02-22 17:18:02)

Offline

Board footer

Powered by FluxBB