Screen brightness on Sony Vaio running M16 - SOLVED

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:in terminal

Code: Select all

chmod +x brightness_up.sh
chmod +x brightness_down.sh
gksudo pluma /etc/rc.local
and add

Code: Select all

chmod a+w /sys/class/backlight/*/brightness
in the file above exit 0 and save
When you say 'the file' are you referring to rc.local?

Also, there's no 'Keyboard Shortcuts' in the menu, but presumably the System Settings > Keyboard > Keyboard shortcuts is the same thing...
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

I proceeded on the assumption that the answer was yes to my queries above. Have followed all the steps but my laptop stil refuses to play ball. Even tried it using the Fn keys that are supposed to do the job but the only apparent difference was that with them apparently assigned as keyboard shortcuts they no longer brought the default onscreen icon up.
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Re: Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Try the echo with /sys/class/backlight/acpi_video0/ brightness and see if it will change the display. If the acpi_video0 fails to work, I can change the scripts to work with intel since I know your max_brightness. What is the max_brightness for acpi_video0, one of my laptops has a max of 8 and the other is 100. If yours is high enough you may not have noticed it actually changing by 1
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Still been playing around with this and actually put a file named 20-intel.conf in /usr/share/X11/xorg.conf.d containing this

Code: Select all

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

EndSection 
with acpi_backlight=vendor as a grub boot option and my keyboard shortcuts still work and it does seem to force the use of /sys/class/backlight/intel_backlight
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

Apologies - been away for a week on business.

Where should I try the echo command? I tried it in the grub (using a value of 1400) but booting halted with a syntax error message.

After amending the grub and letting it boot up, I've tried echo 8 > /sys/class/backlight/acpi_video0/brightness in the Terminal window. It made no difference.

As far as the incremental change in brightness is concerned, I've tried using the CTRL+arrows and holding it down but nothing appears to be changing.

The Intel max value is 4882. The acpi max value is 15
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Sgt Peppermint wrote:Apologies - been away for a week on business.

Where should I try the echo command? I tried it in the grub (using a value of 1400) but booting halted with a syntax error message.

After amending the grub and letting it boot up, I've tried echo 8 > /sys/class/backlight/acpi_video0/brightness in the Terminal window. It made no difference.

As far as the incremental change in brightness is concerned, I've tried using the CTRL+arrows and holding it down but nothing appears to be changing.

The Intel max value is 4882. The acpi max value is 15
With the acpi_backlight=vendor in the grub, you will have to see what folders are in the /sys/class/backlight folder, and a quick way is to use this in terminal

Code: Select all

for interface in /sys/class/backlight/*; do echo $interface; done
my guess is that you need

Code: Select all

echo 1600 | sudo tee /sys/class/backlight/intel_backlight/brightness
to make any change now

Is there an echo command in /etc/rc.local
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:
Sgt Peppermint wrote:Apologies - been away for a week on business.

Where should I try the echo command? I tried it in the grub (using a value of 1400) but booting halted with a syntax error message.

After amending the grub and letting it boot up, I've tried echo 8 > /sys/class/backlight/acpi_video0/brightness in the Terminal window. It made no difference.

As far as the incremental change in brightness is concerned, I've tried using the CTRL+arrows and holding it down but nothing appears to be changing.

The Intel max value is 4882. The acpi max value is 15
With the acpi_backlight=vendor in the grub, you will have to see what folders are in the /sys/class/backlight folder, and a quick way is to use this in terminal

Code: Select all

for interface in /sys/class/backlight/*; do echo $interface; done
{/quote]

/sys/class/backlight/acpi_video0
/sys/class/backlight/intel_backlight

my guess is that you need

Code: Select all

echo 1600 | sudo tee /sys/class/backlight/intel_backlight/brightness
to make any change now

Is there an echo command in /etc/rc.local

Code: Select all

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# echo 1600 > /sys/class/backlight/intel_backlight/brightness
chmod a+w /sys/class/backlight/*/brightness

exit 0
The echo command here is the one I entered from earlier in this thread and subsequently commented out (though I may have changed the value)
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Wow, had to read this thing over again to see where things stood. Have you tried the LM17 CInnamon RC yet? The hotkeys might work in LM17 and there are a couple new grub options to fix backlight

I still can't find why you don't have a sony interface under backlight when your hotkeys are sony. What do you see in /sys/module/video/parameters? Is sony_laptop in your lsmod list? lsmod | grep sony

Something like this might work

Code: Select all

GRUB_CMDLINE_LINUX="quiet splash acpi_osi=\"!Windows 2009\""
User avatar
ashtonford
Level 2
Level 2
Posts: 83
Joined: Thu Aug 11, 2011 2:55 pm

Re: Screen brightness on Sony Vaio running M16

Post by ashtonford »

why do this the hard way? just go into system settings and under power management just set the brightness slider to the screen brightness you want and it will stay at that setting. dont need to use the keyboard to adjust the brightness. I have a sony and thats all that was needed. Always try the simple solution first. adding files and editing files etc should be a last resort.
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

SGT Peppermint, if you try lm17 rc and like it, but want to keep programs and such, read this post about upgrading without formatting your partition by austin.texas
http://forums.linuxmint.com/viewtopic.p ... 17#p865140

I used what he called "method 4" in his original post, it worked but took a few hours and I doubt his method takes anywhere close to that long
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

ashtonford wrote:why do this the hard way? just go into system settings and under power management just set the brightness slider to the screen brightness you want and it will stay at that setting. dont need to use the keyboard to adjust the brightness. I have a sony and thats all that was needed. Always try the simple solution first. adding files and editing files etc should be a last resort.
If the brightness hotkeys hadn't worked on this laptop Linux Mint would have never been installed because this laptop would boot LM16 to a backlight setting of 0. I don't think the LM splash logo would even show
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

ashtonford wrote:why do this the hard way? just go into system settings and under power management just set the brightness slider to the screen brightness you want and it will stay at that setting. dont need to use the keyboard to adjust the brightness. I have a sony and thats all that was needed. Always try the simple solution first. adding files and editing files etc should be a last resort.
If you read my initial post in this thread you'll see it says:
I've gone into settings and adjusted the brightness slider there but again it has no effect.
I wouldn't put myself (or Jeremy B!) through all this pain if there was already a simple solution.

Always read the thread first. Adding suggestions which have already been discounted should be a last resort. ;)
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:SGT Peppermint, if you try lm17 rc and like it, but want to keep programs and such, read this post about upgrading without formatting your partition by austin.texas
http://forums.linuxmint.com/viewtopic.p ... 17#p865140

I used what he called "method 4" in his original post, it worked but took a few hours and I doubt his method takes anywhere close to that long
Thanks, I'll give that a try and see what I get :)

OK, installed, but... the brightness buttons and the slider control under power management have no effect.

In /sys/module/video/parameters I have 'allow duplicates', 'brigtness_switch_enabled' and 'use_native_backlight'.
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Sgt Peppermint wrote:
JeremyB wrote:SGT Peppermint, if you try lm17 rc and like it, but want to keep programs and such, read this post about upgrading without formatting your partition by austin.texas
http://forums.linuxmint.com/viewtopic.p ... 17#p865140

I used what he called "method 4" in his original post, it worked but took a few hours and I doubt his method takes anywhere close to that long
Thanks, I'll give that a try and see what I get :)

OK, installed, but... the brightness buttons and the slider control under power management have no effect.

In /sys/module/video/parameters I have 'allow duplicates', 'brigtness_switch_enabled' and 'use_native_backlight'.
I see icons with the values under those files, allow duplicates says n, brightness switch enabled is yes and use native backlight is -1

Does LM 17 fix the backlight issue?
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:
Sgt Peppermint wrote:
JeremyB wrote:SGT Peppermint, if you try lm17 rc and like it, but want to keep programs and such, read this post about upgrading without formatting your partition by austin.texas
http://forums.linuxmint.com/viewtopic.p ... 17#p865140

I used what he called "method 4" in his original post, it worked but took a few hours and I doubt his method takes anywhere close to that long
Thanks, I'll give that a try and see what I get :)

OK, installed, but... the brightness buttons and the slider control under power management have no effect.

In /sys/module/video/parameters I have 'allow duplicates', 'brigtness_switch_enabled' and 'use_native_backlight'.
I see icons with the values under those files, allow duplicates says n, brightness switch enabled is yes and use native backlight is -1

Does LM 17 fix the backlight issue?
Sadly, nope.
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Try

Code: Select all

video.use_native_backlight=1
in grub
And see if the /usr/share/X11/xorg.conf.d/20-intel.conf file is there, if there isn't one just copy the info from my post-about 12 posts earlier
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:Try

Code: Select all

video.use_native_backlight=1
in grub
And see if the /usr/share/X11/xorg.conf.d/20-intel.conf file is there, if there isn't one just copy the info from my post-about 12 posts earlier
Just did a clean install of 17 and put that code in the grub. This time it's done the trick - all working as it should!

Thanks very much for all your help and perseverance - I've learned a few other things I can do in Linux as part of this, even if they didn't get to the bottom of the problem!
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Great
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

Just one little thing...

I've done this by editing at start-up - how do I insert this so it's there permanently?
JeremyB
Level 21
Level 21
Posts: 13771
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Code: Select all

gksudo gedit /etc/default/grub
enter password, and add the command to the line with

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
inside of the quotes and you might have something other than "quiet splash". Save and exit gedit and use

Code: Select all

sudo update-grub
and you should be set
Locked

Return to “Hardware Support”