You are not logged in.

#1 2015-04-11 15:00:28

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Problem with brightness control on Toshiba Satellite R830 [SOLVED]

Ever since I've been using Linux on my Toshiba Satellite R830 laptop I had problems with the brightness setting after wakeup from sleep. The solution I had found was to use a custom xorg.conf setup. Actually I was creating a 20-intel.conf file in /usr/share/X11/xorg.conf.d/ with the following content:

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection

This worked until today. Now I realised that Xorg is somewhat ignoring this configuration file. I looked in the wiki and this suggested that any such config files should be in /etc/X11/xorg.conf.d/. I copied the file there and rebooted. I opened a terminal and checked the value of /sys/class/backlight/intel_backlight/actual_brightness. Modified the brightness with the Fn + F6/F7 and checked again and it was controlling these.

But after closing the lid and leaving it for a while, and wakeing up the PC the Fn +F6/F7 keys started controlling /sys/class/backlight/toshiba/ which never worked after sleep. Somehow on wakeup the custom config files are being ignored. It seems this is related to the upgrade to Gnome 3.16. I'm using linux-lts kernel.

How do I make Xorg use intel_backlight instead of Toshiba for brightness control?

Last edited by entodoays (2015-05-18 15:21:04)

Offline

#2 2015-04-13 08:19:15

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

I found a similar bug already reported: https://bugs.archlinux.org/task/40926

Offline

#3 2015-05-04 07:19:20

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

I hav acpi_backlight=vendor as kernel parameter. I ran "grep -r . /proc/acpi" and got (partial output):
/proc/acpi/toshiba/fan:running:                 0
/proc/acpi/toshiba/fan:force_on:                0
/proc/acpi/toshiba/lcd:brightness:              1
/proc/acpi/toshiba/lcd:brightness_levels:       8
/proc/acpi/toshiba/keys:hotkey_ready:            0
/proc/acpi/toshiba/keys:hotkey:                  0x0000
/proc/acpi/toshiba/video:lcd_out:                 0
/proc/acpi/toshiba/video:crt_out:                 0
/proc/acpi/toshiba/video:tv_out:                  0
/proc/acpi/toshiba/version:driver:                  0.21
/proc/acpi/toshiba/version:proc_interface:          1

Also:
cat /sys/class/backlight/toshiba/type = platform
cat /sys/class/backlight/intel_backlight/type = raw

How do I configure the kernel not to use the toshiba device and instead use "intel_backlight"?

Offline

#4 2015-05-04 10:43:08

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

entodoays wrote:

How do I configure the kernel not to use the toshiba device and instead use "intel_backlight"?

Try this kernel command line parameter:

video.use_native_backlight=1

https://wiki.archlinux.org/index.php/Ba … ne_options

You could also try using systemd to mask the creation of the Toshiba backlight interface:

# systemctl mask systemd-backlight@backlight:toshiba.service

I am guessing the name of the .service here -- tab completion is your friend!
smile

Offline

#5 2015-05-06 11:45:51

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

I had already thought of that but the toshiba.service only saves the brightness level between sessions. I masked the device (systemctl mask sys-devices-LNXSYSTM:00-device:00-TOS6208:00-backlight-toshiba.device) as well but the /sys/class/backlight/toshiba device did not vanish and it is still being controlled by Gnome. Masking doesn't seem to have any effect on Gnome.

Offline

#6 2015-05-07 07:20:30

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

Is there a way to block the /sys/class/backlight/toshiba device from appearing in the first place? I never did anything like that but, is there a kernel module that could be blocked? And if this is possible how do I identify the right module to block? Hoping that this does not block also the intel_backlight device.

Another possibility that came to mind is to somehow tell ACPI to "control" intel_backlight instead of toshiba. Any ideas if it is possible and if yes how?

Offline

#7 2015-05-07 09:25:37

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

entodoays wrote:

is there a kernel module that could be blocked? And if this is possible how do I identify the right module to block?

lsmod|grep -i toshiba

Perhaps?

Then use `modinfo <module name>` to find out what it does.

Also, have you tried using the specific `systemctl` command I posted?

The backlight.service is distinct from the backlight.device

Offline

#8 2015-05-07 10:42:11

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

Starting form last, I masked both the device and service but the service is not about backlight control but about saving the brightness value between sessions. In any case masking both device and service seems to have no effect.

lsmod|grep -i toshiba

gives

toshiba_acpi           14605  0 
sparse_keymap           3242  1 toshiba_acpi
rfkill                 15914  6 cfg80211,toshiba_acpi,bluetooth
wmi                     8539  1 toshiba_acpi
toshiba_bluetooth       2297  0 
led_class               3579  3 ath9k,toshiba_acpi,sdhci
i8042                  13673  2 toshiba_acpi,libps2

Offline

#9 2015-05-07 10:58:01

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

So try blacklisting the "toshiba_acpi" module then:

# /etc/modprobe.d/toshiba.conf
blacklist toshiba_acpi

Offline

#10 2015-05-07 12:01:11

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

It seems the toshiba_acpi module controls more than the brightness control. So, wouldn't blacklisting it disable more than we intend to disable?

Offline

#11 2015-05-07 12:04:28

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

entodoays wrote:

It seems the toshiba_acpi module controls more than the brightness control. So, wouldn't blacklisting it disable more than we intend to disable?

There's only one way to find out...

Just delete the file if you don't like what it does; you can even do this from the live environment if need be.

Offline

#12 2015-05-07 12:33:05

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

You cannot delete system files and folders.

Offline

#13 2015-05-07 12:36:58

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

entodoays wrote:

You cannot delete system files and folders.

Yes you can -- just mount the partition (rw) and use `# rm`

Offline

#14 2015-05-07 14:03:05

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

My partitition is mounted rw but you cannot delete the /sys/class/backlight/toshiba folder not even with sudo. These are created dynamically.

Offline

#15 2015-05-07 14:04:39

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

entodoays wrote:

My partitition is mounted rw but you cannot delete the /sys/class/backlight/toshiba folder not even with sudo. These are created dynamically.

My apologies, I wasn't clear enough.

I just meant that the file at /etc/modprobe.d/toshiba.conf could be deleted from the live environment if there were any problems with it.

Offline

#16 2015-05-07 16:32:09

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

blacklisting the toshiba_acpi module AND adding acpi_backlight=vendor made gnome use the only backlight device remaining that is intel_backlight. So, the issue is "solved" but I don't know the side effects.

What else did the toshiba_acpi module control? Who should I contact to file a bug report for correcting this long-standing issue with brightness control? Who's the maintainer of this module?

Is it possible to patch or configure this module?

Last edited by entodoays (2015-05-07 16:32:40)

Offline

#17 2015-05-07 16:41:11

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

I just discovered that this configuration makes the screen stay black after wake-up from sleep. And I have to put it on sleep again and wake it up a second time for the screen to turn on.

Offline

#18 2015-05-07 16:46:58

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

entodoays wrote:

What else did the toshiba_acpi module control?

Have a look at the output of:

# modinfo toshiba_acpi

Kernel modules are developed and maintained upstream (ie, by kernel.org) -- as with most software in Arch.

Offline

#19 2015-05-07 20:53:09

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

For the time being I installed the xorg-xbacklight package and added custom shortcuts to xbacklight +10 and xbacklight -10.

Offline

#20 2015-05-08 20:58:26

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

modinfo toshiba_acpi
filename:       /lib/modules/3.14.40-2-lts/kernel/drivers/platform/x86/toshiba_acpi.ko.gz
license:        GPL
description:    Toshiba Laptop ACPI Extras Driver
author:         John Belmonte
alias:          acpi*:TOS1900:*
alias:          acpi*:TOS6208:*
alias:          acpi*:TOS6200:*
depends:        wmi,rfkill,i8042,led-class,sparse-keymap
intree:         Y
vermagic:       3.14.40-2-lts SMP mod_unload modversions 

Offline

#21 2015-05-12 07:17:12

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

It seems that the culprit is /usr/lib/gnome-settings-daemon/gsd-backlight-helper. In this page: http://ubuntuforums.org/showthread.php?p=11910629 there's a procedure to patch the source file (for an older version). There's a section of the code like this:

/* available kernel interfaces in priority order */
static const gchar *backlight_interfaces[] = {
"nv_backlight",
"asus_laptop",
"toshiba",
"eeepc",
"thinkpad_screen",
"acpi_video1",
"mbp_backlight",
"acpi_video0",
"fujitsu-laptop",
"nvidia_backlight",
"samsung",
NULL,
};

Patching this file, eliminating the toshiba device from the preferred list and adding intel_backlight to it might solve the issue.

On another page, https://github.com/mate-desktop/mate-po … issues/135 they suggest another possible hack: changing the priority of device type
file plugins/power/gsd-backlight-helper.c

       /* search the backlight devices and prefer the types:
         * firmware -> platform -> raw */
        path = gsd_backlight_helper_get_type (devices, "firmware");
        if (path != NULL)
                goto out;
        path = gsd_backlight_helper_get_type (devices, "platform");
        if (path != NULL)
                goto out;
        path = gsd_backlight_helper_get_type (devices, "raw");
        if (path != NULL)
                goto out;

Changing the order to firmware -> raw -> platform would solve the problem for me too.

Unfortunately I've never done any patching yet. How would I go about it?

Last edited by entodoays (2015-05-12 07:22:06)

Offline

#22 2015-05-12 07:44:28

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

entodoays wrote:

How would I go about it?

https://wiki.archlinux.org/index.php/Arch_Build_System

Offline

#23 2015-05-12 07:51:33

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

The trickiest part is

Modify the PKGBUILD to your liking

.

I would need to modify the PKGBUILD to replace the firmware -> platform -> raw order to  firmware -> raw -> platform.

Last edited by entodoays (2015-05-12 07:55:35)

Offline

#24 2015-05-16 15:35:42

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

I don't have a clue how to patch gsd-backlight-helper. Can anyone help please?

Offline

#25 2015-05-17 02:18:57

koroki
Member
Registered: 2013-08-03
Posts: 50

Re: Problem with brightness control on Toshiba Satellite R830 [SOLVED]

I have the same problem and I found that the problem is this gnome.

Now I saw that the package problem is gnome-settings-daemon and you found the patch. I'll try to check what happends.

Offline

Board footer

Powered by FluxBB