Toshiba Portege R705 backlight after suspend issue
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Toshiba Portege R705 backlight after suspend issue

    I finally decided to retire my five-years-old MacBook and transition my work over to Fedora.

    I picked up a Toshiba Portege R705 and am now running it under F14. Other than issues that are endemic to the kernel on this platform, (Core iX power management, tentative WiMax support), I've been really happy with the general operation and stability of the machine.

    My most visible issue with the machine is how the backlight brightness controls fail to respond after resuming from a Suspend-to-RAM event.

    Other people have had the same issue with the same kernel over on the Ubuntu forums. It appears the issue might have to do with a buggy implementation of the toshiba-acpi kernel module.

    To wit: upon a fresh boot changing the brightness using the hardware keys (Fn+F6, Fn+F7) adjusts the brightness as expected. Also, the files contained within /proc/acpi/video/GFX0/DD01/brightness and /proc/acpi/toshiba/lcd change to reflect the modification of brightness levels. Additionally, writing directly to /proc/acpi/toshiba/lcd changes the brightness as expected. See:
    Code:
    # echo "brightness:3" > /proc/acpi/toshiba/lcd
    Note the following result:
    Code:
    # echo "current:24" > /proc/acpi/video/GFX0/DD01/brightness
    -bash: echo: write error: Invalid argument
    and does not yield any brightness change.

    Now, once the machine is resumed from Suspend-to-RAM, all of this fails to work. Pressing the brightness hotkeys will change all of the files in /proc but the hardware doesn't respond. Writing directly to /proc/acpi/toshiba/lcd also changes the file, but the hardware still doesn't respond.

    Now the kicker: if the brightness controls aren't working, a Suspend-to-disk restores functionality.

    Some more things I've noticed: if I unload the toshiba-acpi kernel module, I can still change brightness with the hardware keys, but I have no command line ability to modify brightness. The files under /proc/acpi/video still show changes but I still can't write to them.

    Anybody else?

  2. #2
    Join Date
    Nov 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    A status update: I attempted to use all of the available video quirks available to pm-suspend, but still to no avail.

    Updating the kernel, pm-utils and acpid to the versions in Rawhide still don't solve this issue.

    Side note: I've administered RHEL systems for years but this is the first time I've really started to walk the bleeding edge with Fedora. Where should I look if I want to learn how to put together a bug report for Red Hat Bugzilla?

  3. #3
    Join Date
    Feb 2009
    Posts
    2,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    I always found this page very helpful when issueing Xorg bug reports

    https://fedoraproject.org/wiki/Xorg/Debugging

    It tells you in a very detailed way what information to collect and submit.

  4. #4
    Join Date
    Nov 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    Sorry for the delay in this. I managed to cobble together a solution shortly after posting my original message but haven't gotten around to documenting this until now.

    This solution is the product of adapting several other forum posts and bugfixes already in existence. See my references at the following locations:

    http://ubuntuforums.org/showthread.php?t=1550219
    https://bugs.launchpad.net/ubuntu/+s...et/+bug/644898

    From my original message, I still contend this issue exists because of a buggy implementation of the toshiba_acpi kernel module as it's distributed with the Linux kernel. I have yet to input a formal bug report, but suppose I should at some point.

    As an overview, this solution works by using the toshset utility to poke the system management controller on this laptop to allow the hardware to update the backlight brightness. I'm not sure what happens upon a system suspend but I would be willing to wager some internal register is not reset, as a system hibernate does allow full use of the stock backlight control scheme.

    One issue with this solution is that the toshset utility can not interface with the currently-shipped version of the toshiba_acpi kernel module. A workaround can be achieved by patching the source and then building and installing the appropriately-provisioned kernel module.

    As mentioned the key to this scheme is toshset. Assuming you're trying to implement this solution on a Toshiba R700/R705 laptop and running 64-bit Fedora, get the 64-bit binary.

    Code:
    $ cd ~
    $ wget 'http://www.schwieters.org/toshset/toshset64.gz'
    $ gunzip toshset64.gz
    # mv toshset64 /usr/local/bin
    Before proceeding, ensure you have the latest kernel-devel package

    Code:
    # yum install kernel-devel
    Next, get the kernel source files appropriate for your current kernel version:

    Code:
    # cd /usr/src
    # wget http://www.kernel.org/pub/linux/kernel/v`uname -r | cut -b-3`/linux-`uname -r | cut -f1 -d'-'`.tar.bz2
    # tar -xjvf linux-`uname -r | cut -f1 -d'-'`.tar.bz2
    Get the patch for the toshiba_acpi kernel module

    Code:
    # wget 'http://www.schwieters.org/toshset/toshiba_acpi-current.patch'
    # cd linux-`uname -r | cut -f1 -d'-'`
    # patch -p1 < ../toshiba_acpi-current.patch
    # cd drivers/platform/x86
    Since we're only concerned about building the toshiba_acpi module, either comment out all of the other lines in Makefile that deal with building everything else or simply:

    Code:
    # echo 'obj-$(CONFIG_ACPI_TOSHIBA)      += toshiba_acpi.o' > Makefile
    Now build the modules using the headers for the specific release of Fedora you're running:

    Code:
    # make -C /usr/src/kernels/`uname -r` M=`pwd` modules
    Again, to install the modules

    Code:
    # make -C /usr/src/kernels/`uname -r` M=`pwd` modules_install
    This should toss the newly-patched toshiba_acpi.ko into /lib/modules/*/extra

    Restart to load the new modules

    Now, we just need to make the ACPI daemon aware of the magic we're trying to do with toshset so that it will eventually poke the system management controller in the right places.

    We're going to make two files in /etc/acpi/events so the ACPI daemon now has something extensible to hook on to when the hardware buttons are pressed. I used the acpi_listen program to determine the event code the hardware was coughing up so I knew what to tell the daemon to listen for.

    First file, toshiba-brightness-down contains:

    Code:
    event=video/brightnessdown BRTDN 00000087 00000000
    action=/etc/acpi/actions/toshiba-brn-down.sh
    Second file, toshiba-brightness-up contains:

    Code:
    event=video/brightnessup BRTUP 00000086 00000000
    action=/etc/acpi/actions/toshiba-brn-up.sh
    As you can probably tell, we're going to put a couple of files into /etc/acpi/actions. Both files will contain the same script that calls upon toshset64 but we're putting them in different files just in case something comes up down the line.

    First file, toshiba-brn-down.sh

    Code:
    #!/bin/sh
    /usr/local/bin/toshset64 -bl on
    Second file, toshiba-brn-up.sh

    Code:
    #!/bin/sh
    /usr/local/bin/toshset64 -bl on
    Now, give everyone read and execute permissions:

    Code:
    # chmod +rx /etc/acpi/actions/toshiba*
    Restart acpid so it ingests the new events:

    Code:
    # /sbin/service acpid restart
    ...and your backlight keys should work. Note that this solution only makes acpid aware of hardware button keypresses (i.e. Fn+F6, Fn+F7), so the Power Management app in GNOME won't be able to modify the brightness, nor will the "auto dim" feature.

    Hope this helps someone else out!
    Last edited by trox355; 7th December 2010 at 05:38 AM.

  5. #5
    Join Date
    Jan 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    Quote Originally Posted by trox355
    Sorry for the delay in this. I managed to cobble together a solution shortly after posting my original message but haven't gotten around to documenting this until now.

    ...

    ...and your backlight keys should work. Note that this solution only makes acpid aware of hardware button keypresses (i.e. Fn+F6, Fn+F7), so the Power Management app in GNOME won't be able to modify the brightness, nor will the "auto dim" feature.

    Hope this helps someone else out!
    Hi there. I have the identical hardware to you, and the exact same issue on f14. I haven't (yet) tested your solution, but I will and report back here. It's unfortunate that this won't allow power management and auto dim to work though. Are you aware of any fixes in the kernel since your original post that might address this long term? I'm currently running kernel-2.6.35.10-74.fc14.x86_64

  6. #6
    Join Date
    Nov 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    I haven't been trying anything too tricky lately and just keep up with the updates the team pushes into the stable repository. I'm running the same Fedora-branded kernel now (2.6.35.10-74) and still don't see any changes that fix the brightness issue.

    Be aware that kernel 2.6.35.10 is part of the "longterm" branch, so the wget line that downloads the kernel is broken in this release. Download the kernel instead at:

    http://www.kernel.org/pub/linux/kern....35.10.tar.bz2

    Everything else still works as published.

    Good to see someone else is venturing into Fedora-land with this kickin' little machine.

  7. #7
    Join Date
    Jan 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    I just wanted to post that I too experience this issue. I have upgraded my kernel to 2.6.37 and still see the issue. For now I've just set my computer to suspend to disk rather than suspend to ram.

    Here's a link to the kernel bug. https://bugzilla.kernel.org/show_bug.cgi?id=21012

  8. #8
    Join Date
    Jan 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    Quote Originally Posted by trox355
    I haven't been trying anything too tricky lately and just keep up with the updates the team pushes into the stable repository. I'm running the same Fedora-branded kernel now (2.6.35.10-74) and still don't see any changes that fix the brightness issue.

    Be aware that kernel 2.6.35.10 is part of the "longterm" branch, so the wget line that downloads the kernel is broken in this release. Download the kernel instead at:

    http://www.kernel.org/pub/linux/kern....35.10.tar.bz2

    Everything else still works as published.

    Good to see someone else is venturing into Fedora-land with this kickin' little machine.
    Thanks for the confirmation. Another issue related to the suspend is that the wireless driver appears to get somehow "stuck" after resuming from suspend. I have to unload and reload the "iwlagn" driver to get wireless working again, e.g.:

    Code:
    $ sudo modprobe iwlagn
    $ sudo modprobe -r iwlagn
    Are you also experiencing this with suspend?

    Also I found the "hibernate" even more unstable, it would lock up sometimes (although not always). It's also very slow to both hibernate, and especially resume, taking up to 5 mins sometimes. My old Sony Vaio which was much slower would typically only take 1 min with the same version of Fedora. Perhaps this is something to do with having a much larger RAM? 4GB with Toshiba vs. 2GB with the Vaio.

    Let me know what you experience is with hibernate as well, it would be good to get this fixed, if there are any bugs.

    Otherwise this machine works pretty well with Fedora 14.

  9. #9
    Join Date
    Nov 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    @fiveisalive,

    I haven't had any problems with the wireless card locking up after a suspend. For the most part, suspend-to-RAM seems to work pretty well. Not more than once every couple of weeks or so do I encounter an issue that makes X choke and requires a Ctrl-Alt-Bksp to kill the X-server. I haven't yet had anything that completely prevents usage after suspend.

    Regarding the need to modprobe the wireless drivers, I know pm-suspend has a syntax for invoking hooks for suspend or hibernate modes. I'm not sure of the syntax, but the man pages should provide some help. If your configuration requires you to poke the drivers upon resume, you may be able to get away with tossing a shell script in the directory for that and have pm-utils take care of that step for you.

    As for hibernate, I found it to work occasionally but finicky enough for me to not rely on it. I really haven't touched it in the last several minor kernel revisions, but after testing it now, it still is unreliable. I tried to hibernate my machine but after waiting more than five minutes to arrive at a completely unresponsive, I finally gave it the one-finger salute. See the countless other forum posts regarding suspend-to-disk issues.

  10. #10
    Join Date
    Jan 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Toshiba Portege R705 backlight after suspend issue

    Finally got around to upgrading to f16 on the Toshiba. I had hoped that this would be fixed by kernel version 3 (kernel-3.1.1-2.fc16.x86_64), but no luck. Same problem after coming back from suspend. No way to adjust brightness, except by a reboot.

Similar Threads

  1. Toshiba Portege M200
    By themoosegoesmoo in forum Hardware & Laptops
    Replies: 0
    Last Post: 15th June 2008, 07:23 PM
  2. No sound on Toshiba Portege M700
    By xxxamazexxx in forum Hardware & Laptops
    Replies: 6
    Last Post: 28th April 2008, 10:45 PM
  3. Fedora 7/8 on Toshiba Portege 4010
    By lynkxx in forum Hardware & Laptops
    Replies: 1
    Last Post: 5th November 2007, 11:13 PM
  4. problems with fc6 on a toshiba portege 3840CT
    By trungus in forum Hardware & Laptops
    Replies: 0
    Last Post: 15th April 2007, 03:02 AM
  5. Replies: 0
    Last Post: 3rd December 2006, 08:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •