NP535U3C, xUbuntu 12.10 and backlight/brightness

Discussions about Linux installation and configuration on Samsung laptops
San
Newbie
Newbie
Posts: 10
Joined: 30/03/2013, 14:07

NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby San » 30/03/2013, 14:41

Hi there!

I've been looking for informations for long, long time how to fix

1. backlight controll (brigh)
2. backlight on after sleep
3. wifi on after sleep

I installed two Ubuntus - first it was Kubuntu 12.10 (luckily i did not brick my PC!).
There was nothing working. After update to 3.5.0-26-generic kernel (or some update with apt), my backlight after suspend became usable! but after some time it made some problems with audio, so i installed (as multiinstallation)...

xUbuntu 12.10.
and there was nothing working too!
after some research i added acpi_backlight=vendor and found brightness working.

then i installed samsung-laptop and bind to "Win+F4" samsung-laptop -b toggle. and it works. i can turn on and off backlight. it even worked once after sleep, but not anymore (i think i did not change anything at this time...).

as i can not check anything with wifi at the moment i do nothing about, but it looks like jupiter can do some work for us, but.. later.

so i tried almost anything i found (even some ridicculous ideas...)
there was some stuff with rmmod before sleep and modprobe after awake, recover status and so on, so on...

Code: Select all

san@sammie:/sys$ cat /etc/pm/sleep.d/2*

=== 22_samsung-backlight ===

#!/bin/bash

case ${1} in
   resume|thaw)
      dbus-send --system --print-reply=literal --dest='org.voria.SamsungTools.System' '/' org.voria.SamsungTools.System.RestoreDevicesLastStatus
      ;;
esac

exit 0#!/bin/bash

case ${1} in
   resume|thaw)
      samsung-tools -b on
      mkdir /home/san/debug
      cat /sys/class/backlight/samsung/bl_power > /home/san/debug/bl_power
      cat /proc/acpi/button/lid/LID/state > /home/san/debug/lid
      #dbus-send --system --print-reply=literal --dest='org.voria.SamsungTools.System' '/' org.voria.SamsungTools.System.RestoreDevicesLastStatus
      ;;
esac

exit 0

=== 22_samsung-backlight ===

# !/bin/bash
#
# This script restores screen backlight on resume from suspend
# on Samsung NP900X3B/C.
#
case "$1" in
  suspend|hibernate)
    # do nothing
  ;;

  resume|thaw)
    # brightness value is not always accurate.  Set to actual_brightness
    # to restore brightness as it was before suspend.
    #echo `cat  /sys/class/backlight/intel_backlight/actual_brightness` > /sys/class/backlight/intel_backlight/brightness

    # Toggle to activate the screen backlight
#    echo 1 > "/sys/class/backlight/intel_backlight/bl_power"
#    echo 0 > "/sys/class/backlight/intel_backlight/bl_power"

    echo 1 > "/sys/devices/platform/samsung/backlight/samsung/bl_power"
    echo 0 > "/sys/devices/platform/samsung/backlight/samsung/bl_power"
  ;;
  *)
     exit 1
esac
exit 0


yes, i know, it is amd, but:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force acpi_os_name=\"Microsoft Windows XP\" intel_idle.max_cstate=0 acpi_osi=Linux acpi_backlight=vendor intel_iommu=off i915.modeset=1 i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 i915.semaphores=1"


acpi=noirq
causes keyboard and mouse to not respond. BUT, theese GRUB modification gives me drop of energy-rate from 18-20W to 9(!)-12W (at the moment). forget it, i was on ac...

interfaces seems to be ok, lid is always opened.
after sleep lid is opened and backlight turned on (states os)
huge delay with AC.

Code: Select all

san@sammie:/sys$ for interface in /sys/class/backlight/*; do echo $interface; cat $interface/max_brightness; cat $interface/actual_brightness; cat $interface/brightness; done
/sys/class/backlight/samsung
8
8
8

cat /sys/module/video/parameters/brightness_switch_enabled
Y

cat /sys/module/video/parameters/brightness_autoswitch_via_bios
N

cat /etc/modprobe.d/blacklist.conf:
(...)
blacklist samsung-backlight
blacklist samsung-laptop

cat /etc/rc.local
(...)
modprobe samsung-laptop
modprobe samsung-backlight
exit 0


and dmesg:
http://paste.ubuntu.com/5661295/

That's all folks!
Thanks in advance!

edit.
and modprobe samsung-backlight does not work

Code: Select all

sudo modprobe samsung-backlight
[sudo] password for san:
FATAL: Error inserting samsung_backlight (/lib/modules/3.5.0-26-generic/updates/dkms/samsung-backlight.ko): No such device

San
Newbie
Newbie
Posts: 10
Joined: 30/03/2013, 14:07

Re: NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby San » 30/03/2013, 18:25

http://wiki.colar.net/ubuntu_12_04_on_s ... nos_laptop

ehci_hcd, xhci_hcd workaround didn't help

San
Newbie
Newbie
Posts: 10
Joined: 30/03/2013, 14:07

Re: NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby San » 30/03/2013, 23:21

I see this forum a bit dying, but since it was a bit help for me, i will left my info 'for the children'.

I want at least three things to setup:

1. Backlight on after suspend
2. Backlight regulation
3. WiFi after suspend

I'am in about half of the way:

for the 1st one, we need to install ATI drivers from the webside (you may try any other, maybe it will work - post here your info if it does!), so:

SOURCE: http://ubuntuxtreme.com/news/amd-cataly ... rformance/

0. Remove fglrx if you installed any

Code: Select all

sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
sudo rm /etc/X11/xorg.conf


1. Install packages:

Code: Select all

sudo apt-get install build-essential cdbs dh-make dkms
sudo apt-get install execstack dh-modaliases fakeroot libqtgui4


# If you are 64 bit, install these too

Code: Select all

sudo apt-get install ia32-libs ia32-libs-multiarch:i386
sudo apt-get install lib32gcc1 libc6-i386
cd /usr ; sudo ln -svT lib /usr/lib64


2. extract and chmod +x your amd-installer
chmod +x amd-driver-installer-catalyst-13.2-beta3-linux-x86.x86_64.run


3. Create packages and install:

Code: Select all

sudo sh ./amd-driver-installer-catalyst-13.2-beta3-linux-x86.x86_64 --buildpkg Ubuntu/precise
sudo dpkg -i fglrx*.deb #i made precise but i have quantanal xD


4. Reconfigure xorg:

Code: Select all

udo aticonfig --initial -f


Code: Select all

#TODO
#remove 'AMD Testing use only' logo (it is simple, so later...)


And now backlight after suspend DOES work. Woohoo!
But fn of light does not... (even if it was)

Second!

Luckily it is not a driver/kernel issue since (as root: sudo su)

Code: Select all

echo 4 > /sys/class/backlight/samsung/brightness

does change light

Code: Select all

#TODO
#create script to bind to fn+f2/3


http://forums.bodhilinux.com/index.php? ... s-scripts/ will be a good start!

Third!
Have no idea by now. samsung-tools and jupiter does not work...

As a side note
jupiter seems to make something useful, if you want to try:

Code: Select all

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter


and definetly samsung-tools helps!:

Code: Select all

SAMSUNG-TOOLS
sudo add-apt-repository ppa:voria/ppa
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install samsung-tools


wifi key does not work at all (no xinput)
fan works like a charm
audio keys are ok
touchpad lock works
screen switch - not checked
bright - todo
f1 - have no idea what to hell it is, and it definetly won't work.

Regards!

San
Newbie
Newbie
Posts: 10
Joined: 30/03/2013, 14:07

Re: NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby San » 30/03/2013, 23:42

1. Acchieved!

Edit the ati signature file:

Code: Select all

sudo nano /etc/ati/signature


and just replace the "UNSIGNED" line with the following code

Code: Select all

9777c589791007f4aeef06c922ad54a2:ae59f5b9572136d99fdd36f0109d358fa643f2bd4a2644d9efbb4fe91a9f6590a145:f612f0b01f2565cd9bd834f8119b309bae11a1ed4a2661c49fdf3fad11986cc4f641f1ba1f2265909a8e34ff1699309bf211a7eb4d7662cd9f8e3faf14986d92f646f1bc


it was simplier than i ever thought!

Source: http://askubuntu.com/a/216730

San
Newbie
Newbie
Posts: 10
Joined: 30/03/2013, 14:07

Re: NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby San » 31/03/2013, 17:45

2. Achieved!

i do not know how...
i connected hdmi output, rebooted and started to mess around with those scripts.

i made

Code: Select all

sudo chmod go+w /sys/class/backlight/acpi_video0/backlight


and it works now!

San
Newbie
Newbie
Posts: 10
Joined: 30/03/2013, 14:07

Re: NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby San » 31/03/2013, 17:55

I know!

I removed whole GRUB kernel parameters including acpi_brightness=vendor.

And it does work including even wireless.

berlinomat
Newbie
Newbie
Posts: 2
Joined: 04/04/2013, 18:19

Re: NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby berlinomat » 05/04/2013, 11:19

Did the sleep mode work without any tricks?

My NP535U3C shows a black screen after sleep...

San
Newbie
Newbie
Posts: 10
Joined: 30/03/2013, 14:07

Re: NP535U3C, xUbuntu 12.10 and backlight/brightness

Postby San » 05/11/2013, 14:43

It sometimes hang and gets hot.

Anyway on (?)ubuntu 13.10 it stopped to work (since there are no samsung-tools).
We have to wait...


Return to “Linux On My Samsung”

Who is online

Users browsing this forum: No registered users and 3 guests