Page 8 of 8 FirstFirst ... 678
Results 71 to 74 of 74

Thread: Lenovo Ideapad Y500 LiveUSB Problem

  1. #71
    Join Date
    Sep 2013
    Beans
    3

    Re: Lenovo Ideapad Y500 LiveUSB Problem

    Quote Originally Posted by jonashendrickx View Post
    This my personal work. It's clearly based upon the idea in this thread. My script is synchronized with the brightness slider. This is the final and correct solution what we needed I am still looking for a way to do it without nvidiabl. I believe we dont need nvidiabl at all since I can control brightness from nvidia-settings. Don't forget to give me credits for my solution if you post it elsewhere !

    How it works? /sys/class/backlight/nvidia_backlight/brightness contains the brightness value when the brightness keys are pressed. But the brightness doesn't change. I noticed this value has a range of 0-15. But the range of the nvidiabl is 0- 127. with some quick math I came with a formula y=15+8x where x represents the brightness value of the keys, and y is the actual brightness./sys/class/backlight/nvidia_backlight/max_brightness contains the maximum brightness, actually I can use this in my script and use remainders and few other things to make my script universal. It's very easy actually. I did not make it universal since I like to have every bit of performance.





    1. Install latest nvidiabl debian package from https://github.com/guillaumezin/nvidiabl/downloads
    2. Now open the terminal and type
      Code:
      $ sudo gedit /etc/acpi/events/lenovo_backlight_up
      Enter
      Code:
      event=video LCD 00000086 00000000
      action=/etc/acpi/lenovo_backlight.sh
      And now save and close the file.


      Code:
      $ sudo gedit /etc/acpi/events/lenovo_backlight_down
      Enter
      Code:
      event=video LCD 00000087 00000000
      action=/etc/acpi/lenovo_backlight.sh
      And now save and close the file.


      Code:
      $ sudo gedit /etc/acpi/events/lenovo_backlight.sh
      Enter
      Code:
      #!/bin/bash
      test -f /sys/class/backlight/nvidia_backlight/brightness || exit 0
      NEW_VALUE=`cat /sys/class/backlight/acpi_video0/brightness`
      let BRIGHTNESS=$NEW_VALUE*8+7
      echo -n $BRIGHTNESS > /sys/class/backlight/nvidia_backlight/brightness
      And now save and close the file.
    3. Now let's set the necessary permissions for all the files we need to access
      Code:
      $ sudo chmod +x /etc/acpi/lenovo_backlight.sh
      sudo chown YOURUSERNAME /sys/class/backlight/nvidia_backlight/brightness
    4. Now let's load nvidiabl at boot time, in terminal type:
      Code:
      sudo gedit /etc/modules
      add to the bottom:
      Code:
      nvidiabl
      close and save.
    5. reboot




    This is the best method, Now the brightness is synchronized with the brightness slider applet.


    Don't forget to buy me a beer if you like it
    donation link
    AND

    Originally Posted by beatgeekFor those who are having a problem with maximum brightness, which version of the NVIDIA driver are you using? When I tried the most recent version (313.26 I think), I had problems with the brightness being too low (and it kept switching between high and low brightness on its own for no reason). I switched back to version-current-updates (304.88... I'm actually running linux mint 13, based on ubuntu precise) and it works perfectly.



    OK I was having the low-brightness problem too. I'm on 319.49 and nvidiabl 0.81. Anyways, to get my brightness back up, try experimenting with the max:

    sudo modprobe -r nvidiabl #removes the module
    sudo modprobe nvidiabl max=20000 #experiment with this number

    then:
    cd /sys/class/backlight/nvidia_backlight
    echo 127 | sudo tee brightness

    If it's bright enough, then great. Otherwise, start at the beginning, and up the max. It takes some experimenting; for me, I had to put like 100000 to get the brightness up.

    I just can't thank all of those who help to answer in this thread, and especially to both of those quoted. You guys just make my day.
    So here is how I combine the work and finding of both the guys above and get a decent solution to Fn key to adjust brightness in the IdeaPad Y500

    As first, I followed jonashendrickx for his guide and set up the event-listeners and the .sh file. It would work okay at first since the brightness did change accordingly and it utilised the indicator at the top right corner. But I find that, since he used the relation between the brightness in acqui-video to give a new value of brightness in nvidia_backlight, I thought to myself why not do the same. I also found out that the value of brightness in folder acpi_video0 varies from 0 to 100 with an interval of 6, while the brightness in folder nvidia_backlight has a maximum value of 127. So I changed his formula inside the lenovo_backlight.sh as followed:
    Code:
    let BRIGHTNESS=$NEW_VALUE*8+7
    into
    Code:
    let BRIGHTNESS=$NEW_VALUE*127/100
    I know this would give me integer division but the number should be close enough to be functional. Then I combine the condition of comparison for the BRIGHTNESS value with the value stored in nvidia_backlight/max_brightness and set it to be equal to that value if it gets bigger (which is not likely according to the formula). And so with that I had a smooth change of brightness with the Fn key.

    But then the issue hasn't stopped. The maximum brightness is capped and to some people, the screen is just not bright enough. Here's where
    colby2 comes to save the day with his findings.

    By experimenting with the value, I obtain 143000 to be a suitable max, since when the brightness indicator gets to 94%, 1 more increment (1 more hit of Fn+Up) doesn't change the brightness anymore. That's when I know the brightness is maxed out.

    And so I have for myself a smooth change in brightness with maximum range (as I like to convince myself that).

    With credits to
    jonashendrickx and rorschachwalter here is the code for lenovo_backlight.sh:
    Code:
    #!/bin/bashtest -f /sys/class/backlight/nvidia_backlight/brightness || exit 0
    NEW_VALUE=`cat /sys/class/backlight/acpi_video0/brightness`
    MAX=`cat /sys/class/backlight/nvidia_backlight/max_brightness`
    let BRIGHTNESS=$NEW_VALUE*$MAX/100
    if [$BRIGHTNESS -gt $MAX]; then
        BRIGHTNESS=$MAX
    fi
    
    
    echo -n $BRIGHTNESS > /sys/class/backlight/nvidia_backlight/brightness
    Then after that I ran snippet from colby2

    sudo modprobe -r nvidiabl #removes the module
    sudo modprobe nvidiabl max=143000 #actually the calculated value was 142880

    then:
    cd /sys/class/backlight/nvidia_backlight
    echo 127 | sudo tee brightness


    HOWEVER, I still haven't been able to make this permanent, since everytime I reboot, the maximum brightness is reset and I have to do the above to get the max brightness right again. So how can I make it permanent, how do I change the setting of nvidiabl?


    Edit2: I figured that if I wrote in /etc/modules with the line

    nvidiabl max=143000

    then when I reboot I can have the max brightness as I wanted.
    ------
    I'm using driver 3.13 nvidia with kernel 3.8.0.30-generic.
    Y500, SLI GT650M with 16Gb SSD and 1Tb HDD
    I can boot to Ubuntu and Window 8. But my Boot Mode is set to LEGACY MODE with UEFI FIRST and I use GRUB as default bootloader.

    I just used Ubuntu approximately 24 hours, but I had tried and failed for like 3 days in a row. Thanks to these posts and contributions I was able to dual boot and enjoy Ubuntu while still having Win 8 for gaming (which to me is a BIG achievement since I'm super new to Linux)
    Last edited by ngthnhan93; September 9th, 2013 at 02:15 PM.

  2. #72
    Join Date
    Sep 2013
    Beans
    2

    Re: Lenovo Ideapad Y500 LiveUSB Problem

    ngthnhan93,


    Thank you for your detailed analysis of the brightness issue. It sounds like you fixed your problem by adding that line to /etc/modules (sorry I didn't mention that in my post).

    I'm just curious: do you also have a problem keeping the brightness down when you open certain applications? For example, I like to keep my screen around 50% brightness. When I open some applications (like iceweasel or gnome settings), it resets my brightness to max, and blinds me! I have to re-run the sudo tee command to get it back down.

    My other question: how are you able to edit the nvidia_backlight/brightness file with your user? When I first log in, and try to reduce the brightness, of course I can't. I have to first chown the file before changing the value. Have you found a solution to this?

    Thanks!! I'm really hoping nVidia gets their act together and releases a new driver that 'just works' with brightness control. Also, have you got the 319.49 driver to work with any kernels newer than 3.9? I think I'm stuck on 3.9 until they update.

  3. #73
    Join Date
    Sep 2013
    Beans
    3

    Re: Lenovo Ideapad Y500 LiveUSB Problem

    Quote Originally Posted by colby2 View Post
    ngthnhan93,


    Thank you for your detailed analysis of the brightness issue. It sounds like you fixed your problem by adding that line to /etc/modules (sorry I didn't mention that in my post).

    I'm just curious: do you also have a problem keeping the brightness down when you open certain applications? For example, I like to keep my screen around 50% brightness. When I open some applications (like iceweasel or gnome settings), it resets my brightness to max, and blinds me! I have to re-run the sudo tee command to get it back down.

    My other question: how are you able to edit the nvidia_backlight/brightness file with your user? When I first log in, and try to reduce the brightness, of course I can't. I have to first chown the file before changing the value. Have you found a solution to this?

    Thanks!! I'm really hoping nVidia gets their act together and releases a new driver that 'just works' with brightness control. Also, have you got the 319.49 driver to work with any kernels newer than 3.9? I think I'm stuck on 3.9 until they update.
    Yup, I also experience the problem of having brightness set back to default when I open certain applications (in my case, they are nvidia-settings and thunderbird.). However, since I have the Fn key that can adjust the brightness, it's not a problem for me.

    For the other question: I have to chown the file before I can actually modify the file. Since I'm only using 1 account, I am okay with doing that command chown once and for all.

    Right now, I'm using Ubuntu 13.10 with kernel 3.11.0-11-generic and nvidia driver 331.13 (I install from https://launchpad.net/~xorg-edgers/+archive/ppa. Just added the repository and go to Software Center to update my driver.) The driver works just fine for me so far. I haven't tested any graphic-heavy app yet (just updated to 13.10 this afternoon), however, before updating to Saucy, I was able to play dota 2 on my Lenovo Y500 smoothly with driver 325.15 with 3.8.0.31 kernel. Hope this information help!

  4. #74
    Join Date
    May 2007
    Beans
    810

    Re: Lenovo Ideapad Y500 LiveUSB Problem

    Wow this is a wealth of information. Currently I have Ubuntu running off a persistent 32GB thumb drive. I have been reluctant to take the plunge on my Y400 and wiping win8 and installing Linux.

Page 8 of 8 FirstFirst ... 678

Bookmarks

Posting Permissions

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