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

Screen brightness on Sony Vaio running M16 - SOLVED

Post by Sgt Peppermint »

I have a Sony VAIO SVE1711R1EB laptop which came with Windows 7 installed. Sadly the HDD failed one month after the guarantee... I reinstalled windows and all of the Sony gubbins I needed and all runs smoothly. I have now also dual booted wih Linux Mint 16 and it's all running smoothly too... except for one thing.

The display when running Linux appears to be at full brightness. The Fn+F5 and Fn+F6 keys should decrease and increase the brightness respectively - they do it fine in Windows, and when I try under Linux I do indeed get a graphic that appears on page to show the brightness setting going higher or lower, but it doesn't actually apply the change to the display. I've gone into settings and adjusted the brightness slider there but again it has no effect.

Is there something I can do here to get it working or do I have to try re-installing Linux (even though it may not work)?

Note that - new HDD aside - the computer spec is exactly the same as it was when I took it out of the box. I'm a relative newbie when it comes to Linux, but I do try to find solutions online before resorting to asking for help, but this one got me stumped. Any help gratefully appreciated!

Slightly off topic, I found a short while ago a keyboard shortcut which displayed hidden/system files in the 'explorer' view - can anyone remind me what it is? :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
JeremyB
Level 21
Level 21
Posts: 13876
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

https://wiki.ubuntu.com/Kernel/Debugging/Backlight

You might just need to add acpi_backlight=vendor to grub

To test, restart and when the grub screen appears, press e to edit and use the down arrow key to get to the line that starts with linux. Use the right arrow key to scroll past quiet splash and add acpi_backlight=vendor
Press F10 to continue booting

If it works you will need to add that command to /etc/default/grub and do update-grub
ClutchDisc

Re: Screen brightness on Sony Vaio running M16

Post by ClutchDisc »

Not the best of fixes, but this is what worked for me when I had the same problem. Try dimming the display with the FN keys before the OS loads up all the way. No, this won't make it so you can adjust the screen brightness after the OS loads up, nor will it save your brightness settings after a reboot. But I didn't mind, to me it isn't to hard to adjust it before the OS comes up every time. I don't reboot very often anyway.
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

Thanks - I'll try this when I get home and see if it works. I've already changed my grub so that it fires up the last used OS (rather than defaulting to Linux) so I'm fairly confident about tweaking it further...
ClutchDisc

Re: Screen brightness on Sony Vaio running M16

Post by ClutchDisc »

No problem, let us know what works for you!
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

OK, followed JeremyB's advice and edited the grub on the fly at boot. The edited line then read

/boot/vmlinuz-3.11.0-12-generic root=UUID=(DisinclinedToType) ro quiet splash acpi_backlight=vendor $vt_handoff

I also tried putting the acpi... command after the $vt_handoff statement. Unfortunately this only difference this seemed to make was that when I tried the function keys the brightness symbol which appeared only had a scale of full or one-less-than-full (if that makes sense).

Trying to dim the display on boot up didn't seem to do the trick either, sadly...

The /sys/class/backlight folder contains two subfolders - acpi_video0 and intel_backlight. Given that the latter exists I tried the bit which says:

s -la /sys/class/backlight/intel_backlight/ > lslabacklight

echo 8 > /sys/class/backlight/intel_backlight/brightness


This changed the brightness to the extent that the screen went almost black and no fiddling with the function keys or (after managing to identify the cursor) changing the display in the system settings. Thankfully on a reboot I got my extra bright screen back, but I still can't adjust it...

Slightly off topic, I found a short while ago a keyboard shortcut which displayed hidden/system files in the 'explorer' view - can anyone remind me what it is? :)
JeremyB
Level 21
Level 21
Posts: 13876
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Sgt Peppermint wrote:OK, followed JeremyB's advice and edited the grub on the fly at boot. The edited line then read

/boot/vmlinuz-3.11.0-12-generic root=UUID=(DisinclinedToType) ro quiet splash acpi_backlight=vendor $vt_handoff

I also tried putting the acpi... command after the $vt_handoff statement. Unfortunately this only difference this seemed to make was that when I tried the function keys the brightness symbol which appeared only had a scale of full or one-less-than-full (if that makes sense).

Trying to dim the display on boot up didn't seem to do the trick either, sadly...

The /sys/class/backlight folder contains two subfolders - acpi_video0 and intel_backlight. Given that the latter exists I tried the bit which says:

s -la /sys/class/backlight/intel_backlight/ > lslabacklight

echo 8 > /sys/class/backlight/intel_backlight/brightness


This changed the brightness to the extent that the screen went almost black and no fiddling with the function keys or (after managing to identify the cursor) changing the display in the system settings. Thankfully on a reboot I got my extra bright screen back, but I still can't adjust it...

Slightly off topic, I found a short while ago a keyboard shortcut which displayed hidden/system files in the 'explorer' view - can anyone remind me what it is? :)
I thought there was the show hidden files option in the view menu CTRL+H is the shortcut. Go to /sys/class/backlight/intel_backlight/ and take a peek at the max_brightness file and then change the 8 from the echo 8 > /sys/class/backlight/intel_backlight/brightness to something closer to the value in max_brightness. I actually see a change in the brightness file in acpi_video0 folder when I use the keyboard shortcut for brightness. Since you can change the lighting with the echo 8, just need to find out how to bind the keyboard shortcuts to the right commands

https://wiki.ubuntu.com/Hotkeys/Troubleshooting This should tell you if the keyboard shortcut is even noticed
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

OK, the max brightness is around 4880.

If I put 600 in the echo command it gives me a comforatable viewing brightness. Can I insert this into the grub somewher to set it as default?

Whilst I haven't been through the debugging the keypresses are recogniised in that the brightness adjustment icon appears on the screen (and even drives the slider left and right); it's just that there's no actual effect on the machine. Is it still worth going through the debugging or does the current behaviour tell you what you need to know?

F5 (reduce) and F6 (increase) are the Fn keys concerned...
JeremyB
Level 21
Level 21
Posts: 13876
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Sgt Peppermint wrote:OK, the max brightness is around 4880.

If I put 600 in the echo command it gives me a comforatable viewing brightness. Can I insert this into the grub somewher to set it as default?

Whilst I haven't been through the debugging the keypresses are recogniised in that the brightness adjustment icon appears on the screen (and even drives the slider left and right); it's just that there's no actual effect on the machine. Is it still worth going through the debugging or does the current behaviour tell you what you need to know?

F5 (reduce) and F6 (increase) are the Fn keys concerned...
Actuall you add to another file with

Code: Select all

sudo gedit /etc/rc.local
and add your

Code: Select all

echo 600 > /sys/class/backlight/intel_backlight/brightness
on a line above EXIT 0

Any line starting with a # is a comment and not a command
JeremyB
Level 21
Level 21
Posts: 13876
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Found a bug report, sounds like this issue started with the 13.10 kernel and still exists in the 13.14rc. I think LM16 released with 13.11

https://bugs.launchpad.net/ubuntu/+sour ... ug/1279282

You can check your graphics using lspci in terminal, lspci -v gives more detail

The info will be one close to the top starting with "00:02.0 VGA compatible controller"

You could try creating a file called

Code: Select all

20-intel.conf
containing this

Code: Select all

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

EndSection 
and saving it in

Code: Select all

/etc/X11/xorg.conf.d/
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:Found a bug report, sounds like this issue started with the 13.10 kernel and still exists in the 13.14rc. I think LM16 released with 13.11

https://bugs.launchpad.net/ubuntu/+sour ... ug/1279282

You can check your graphics using lspci in terminal, lspci -v gives more detail

The info will be one close to the top starting with "00:02.0 VGA compatible controller"

You could try creating a file called

Code: Select all

20-intel.conf
containing this

Code: Select all

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

EndSection 
and saving it in

Code: Select all

/etc/X11/xorg.conf.d/
The graphics info is as follows:

Code: Select all

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
	Subsystem: Sony Corporation Device 90ac
	Flags: bus master, fast devsel, latency 0, IRQ 44
	Memory at c4000000 (64-bit, non-prefetchable) [size=4M]
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 5000 [size=64]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: <access denied>
	Kernel driver in use: i915
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

I've created the file you suggested but it's sitting in the Home directory. I tried to cut and paste it to the location you suggest but found the folder didn't exist. I wanted to create the new folder in the X11 folder but the option to Create wasn't enabled. I'm at the limits of my knowledge now!

EDIT:
Scrub that - I worked out that if I opened as root I could create the folder, so it's now created and the new file inserted.
JeremyB
Level 21
Level 21
Posts: 13876
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Sgt Peppermint wrote:I've created the file you suggested but it's sitting in the Home directory. I tried to cut and paste it to the location you suggest but found the folder didn't exist. I wanted to create the new folder in the X11 folder but the option to Create wasn't enabled. I'm at the limits of my knowledge now!

EDIT:
Scrub that - I worked out that if I opened as root I could create the folder, so it's now created and the new file inserted.
Is there a xorg.conf.d folder in /usr/share/X11? If there is copy your file there also
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:
Sgt Peppermint wrote:I've created the file you suggested but it's sitting in the Home directory. I tried to cut and paste it to the location you suggest but found the folder didn't exist. I wanted to create the new folder in the X11 folder but the option to Create wasn't enabled. I'm at the limits of my knowledge now!

EDIT:
Scrub that - I worked out that if I opened as root I could create the folder, so it's now created and the new file inserted.
Is there a xorg.conf.d folder in /usr/share/X11? If there is copy your file there also
There may be, but when I tried to boot into Linux this morning I got an error message saying that something hadn't been set up properly, and I couldn't get in. I didn't have time to explore the options available so I'll have to look again later.

UPDATE:
I've tried booting up in recovery mode and (when prompted) chose the 'continue normal start up' option. I get the same message, which is "Failed to start the X server (your graphical interface). It is likely that it is not set up correctly. Would you like to view the X server output to diagnose the problem?"

Choosing 'No' (not least because I've no idea what to do if I press 'Yes) presents me with "The X server is now disabled. Restart MDM when it is configured correctly". I then get presented with a screen of actions that the OS is carrying out and it stops at 'Starting' (even though it says 'OK' at the end of that line). However, I notice that a couple of lines up from there it says "Restoring resolver state... /etc/rc.local: 13: /etc/rc.local: cannot create /sys/class/backlight/intel_backlight/brightness: Directory nonexistent."

The list doesn't get any further than 'Starting', by the way. It just hangs there and despite pressing Enter (and lots of other keys) I can't get it to boot up....
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

Following on from the above, at the 'Failed to start...' message I tried clicking 'Yes'. This displays a whole load of information, but I'm guessing the relevant bits are:

Code: Select all

(==) Using config directory: "/etc/X11/xorg.config.d"
(==) Using system config directory: "/usr/share/X11/xorg.conf.d"
As the latter is the directory you referred to above (which may or may not already exist - I can't check) I'm guessing this may be a clue as to what I need to do...

There then follows a load of statements regarding things Initializing, then it says:

Code: Select all

Loading extension GLX
(EE) Fatal server error:
(EE) No screens found(EE)
(EE)
Please consult the X.Org Foundation Support
        at http://wiki.x.org
 for help
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additio[nal info]
(EE)
(EE) Server terminated with error (1). Closing log file.
I then exit. I'm then asked if I would "like to view the detailed X server output as well?". I clicked 'Yes' and was going to type that out too but when I saw the list of text I lost the will to live as I didn't know which bits were going to be relevant.

Same result - I can't boot into Linux at all...
ClutchDisc

Re: Screen brightness on Sony Vaio running M16

Post by ClutchDisc »

Sgt Peppermint - I'm getting that same "failed to start X" message on a laptop that I was trying to install Mint on... I would love to be able to answer how to fix that!
JeremyB
Level 21
Level 21
Posts: 13876
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Sgt Peppermint wrote:Following on from the above, at the 'Failed to start...' message I tried clicking 'Yes'. This displays a whole load of information, but I'm guessing the relevant bits are:

Code: Select all

(==) Using config directory: "/etc/X11/xorg.config.d"
(==) Using system config directory: "/usr/share/X11/xorg.conf.d"
As the latter is the directory you referred to above (which may or may not already exist - I can't check) I'm guessing this may be a clue as to what I need to do...

There then follows a load of statements regarding things Initializing, then it says:

Code: Select all

Loading extension GLX
(EE) Fatal server error:
(EE) No screens found(EE)
(EE)
Please consult the X.Org Foundation Support
        at http://wiki.x.org
 for help
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additio[nal info]
(EE)
(EE) Server terminated with error (1). Closing log file.
I then exit. I'm then asked if I would "like to view the detailed X server output as well?". I clicked 'Yes' and was going to type that out too but when I saw the list of text I lost the will to live as I didn't know which bits were going to be relevant.

Same result - I can't boot into Linux at all...
Not too difficult to change back. Boot with the media you used to install Linux Mint, then double click on Computer on the screen and it should show your actual hard drive and its size, double click on it. Go to terminal and enter

Code: Select all

sudo nemo
and on the left side of the window you should see devices and one will have a string of numbers and letters and should be you installed version of Linux Mint. Go to /etc/rc.local and delete or comment out the echo command for the backlight. Then go to /etx/X11/ and delete the xorg.conf.d folder that was added. Then I would reboot to your hard drive and see if it works, if it doesn't work, reboot with the Live DVD or whatever media you used to install and delete the 20-intel.conf from /usr/share/X11/xorg.conf.d- you will have to double click on the computer icon and use sudo nemo to access your hard drive again with root privileges to do this- or you could delete this on the first attempt if you wish
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:Not too difficult to change back. Boot with the media you used to install Linux Mint, then double click on Computer on the screen and it should show your actual hard drive and its size, double click on it. Go to terminal and enter

Code: Select all

sudo nemo
and on the left side of the window you should see devices and one will have a string of numbers and letters and should be you installed version of Linux Mint. Go to /etc/rc.local and delete or comment out the echo command for the backlight. Then go to /etx/X11/ and delete the xorg.conf.d folder that was added. Then I would reboot to your hard drive and see if it works, if it doesn't work, reboot with the Live DVD or whatever media you used to install and delete the 20-intel.conf from /usr/share/X11/xorg.conf.d- you will have to double click on the computer icon and use sudo nemo to access your hard drive again with root privileges to do this- or you could delete this on the first attempt if you wish
OK, thanks. That's got me back to normal. When trying to get this sorted all I had done was get as far as creating the .conf file and creating the folder in /etc/X11/.

Obviously I still want to try and get the original issue sorted. Now that I'm back in I've had a look and there is indeed an xorg.conf.d folder in /usr/share/X11/. If I recreate the .conf file and put it in a new folder to replace the one I added before AND place it in ther /usr/... location too, should that work?

Also, now that I managed to get that graphics information (above), what do I need to do with it?

Thanks very much for your assistance so far, by the way - much appreciated!
JeremyB
Level 21
Level 21
Posts: 13876
Joined: Fri Feb 21, 2014 8:17 am

Re: Screen brightness on Sony Vaio running M16

Post by JeremyB »

Does your grub file contain acpi_backlight=vendor or did you just do the one test on the fly?

I wonder if it is actually using the intel backlight or acpi video

Code: Select all

cat /var/log/Xorg.0.log | grep backlight
Sgt Peppermint

Re: Screen brightness on Sony Vaio running M16

Post by Sgt Peppermint »

JeremyB wrote:Does your grub file contain acpi_backlight=vendor or did you just do the one test on the fly?

I wonder if it is actually using the intel backlight or acpi video

Code: Select all

cat /var/log/Xorg.0.log | grep backlight
Just on the fly - I didn't update the grub as it appeared to have no effect.

The cat instruction generated the following:

Code: Select all

[    17.327] (--) intel(0): found backlight control interface acpi_video0 (type 'firmware')
Locked

Return to “Hardware Support”