Samsung NB30 Netbook - Brightness problem

Discussions about Linux installation and configuration on Samsung laptops
Yoshi
Newbie
Newbie
Posts: 1
Joined: 23 Feb 2010, 10:30

Samsung NB30 Netbook - Brightness problem

Post by Yoshi »

Hi everybody,

I just switched to Linux a couple of days ago when i got my new Samsung NB30 netbook. It runs on the 64bit desktop version of Ubuntu 9.10 with a ubuntu-netbook-remix package installed. Everything seems to be just fine (maybe less battery life...), but what bothers me is the problem about changing brightness. I have not found a way to do this whatsoever. I also installed the samsung-scripts, but it still does not work.

Has anyone an idea what i could do? I'm new to the linux world - so please be patient with me :D !

greetings - yoshi
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: Samsung NB30 Netbook - Brightness problem

Post by voria »

First of all, welcome on board. ;)
Please open a terminal and use the following commands:

Code: Select all

lspci -nn
sudo dmidecode -s system-product-name
and attach their output here. Also, which Fn keys work (if any) and which don't?
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
dodo
Newbie
Newbie
Posts: 5
Joined: 11 Mar 2010, 19:45

Re: Samsung NB30 Netbook - Brightness problem

Post by dodo »

Hi! I've just bought a Samsung NB30. I've installed Karmic UNR and everything I've tried so far seems to work fine except for the brightness control keys. Here you have the requested info:

lspci -nn

Code: Select all

00:00.0 Host bridge [0600]: Intel Corporation Pineview DMI Bridge [8086:a010]
00:02.0 VGA compatible controller [0300]: Intel Corporation Pineview Integrated Graphics Controller [8086:a011]
00:02.1 Display controller [0380]: Intel Corporation Pineview Integrated Graphics Controller [8086:a012]
00:1b.0 Audio device [0403]: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller [8086:27d8] (rev 02)
00:1c.0 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 [8086:27d0] (rev 02)
00:1c.1 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 [8086:27d2] (rev 02)
00:1c.2 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 [8086:27d4] (rev 02)
00:1c.3 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 [8086:27d6] (rev 02)
00:1d.0 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 [8086:27c8] (rev 02)
00:1d.1 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 [8086:27c9] (rev 02)
00:1d.2 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 [8086:27ca] (rev 02)
00:1d.3 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 [8086:27cb] (rev 02)
00:1d.7 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller [8086:27cc] (rev 02)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev e2)
00:1f.0 ISA bridge [0601]: Intel Corporation Tigerpoint LPC Controller [8086:27bc] (rev 02)
00:1f.2 SATA controller [0106]: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller [8086:27c1] (rev 02)
00:1f.3 SMBus [0c05]: Intel Corporation 82801G (ICH7 Family) SMBus Controller [8086:27da] (rev 02)
05:00.0 Network controller [0280]: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)
09:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller [11ab:4354]
sudo dmidecode -s system-product-name

Code: Select all

NB30
The following Fn keys work as expected:

Fn+Esc: Suspend
Fn+Right: Volume up
Fn+Left: Volume down
Fn+F6: Mute
Fn+F10: Trackpad toggle
Fn+F11: Numpad toggle

There are strange icons onto other Fx keys. I can post a picture of the keyboard if you wish.

The netbook comes with FW ver. 03JJ. I've seen Samsung has released an update (05JJ), but only for Windows XP/7 so... :S:S:S Dunno if it fixes anything, though.

BTW, the xbacklight/xrandr workaround suggested here and there for the NC10 does nothing on the NB30.

If you need something else, please let me know. Regards.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: Samsung NB30 Netbook - Brightness problem

Post by voria »

New packages on repository, they add support for Samsung NB30. Changelogs:

Code: Select all

linux (2.6.31-20.58~ppa2~loms~karmic) karmic; urgency=low
  ...
  * Fix FN keys release on following samsung models:
    N120, N130, N140, NB30, N150/N210/N220, N220, N310, N510, Q310, X120.
  * Apply 'libata-ata_piix-clear-spurious-IRQ.patch' to fix the
    SATA freezing problem on Samsung N130/N140.
  * Apply 'linux-phc-0.3.2.patch'.

Code: Select all

udev (147~-6.2~ppa12~loms~karmic) karmic; urgency=low

  * Add Samsung NB30 support to '95-keymap.rules'.

Code: Select all

samsung-backlight (2.6.31-20~ppa2~loms~karmic) karmic; urgency=low

  * Add support for Samsung NB30.
All the packages will be available in few hours for installation. For brightness control, install the 'samsung-backlight' package then reboot. If it does not work yet, then add the option 'acpi_backlight=vendor' to the GRUB kernel command line (if you need instructions on how to do this, just ask).

Let me know the results! ;)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
dodo
Newbie
Newbie
Posts: 5
Joined: 11 Mar 2010, 19:45

Re: Samsung NB30 Netbook - Brightness problem

Post by dodo »

Hi! I have installed this packages and backlight changing works perfectly now. So now there are these additional Fn keys working:

Fn+Up: Brighter screen
Fn+Down: Dimmer screen
Fn+F3: Shows battery information
Fn+F4: Launch the Screen Layout Editor
Fn+F5: Turn off (completely!) the screen
Fn+F7: Toggle bluetooth (this model doesn't have it, though...)
Fn+F8: Change CPU governor
Fn+F9: Toggle wifi (when off, the wifi led keeps on)

I still don't know what is Fn+F12 supposed to do (the icon looks like a padlock with a vertical double arrow inside), so...

Just two questions:

* Is there any option to turn off the backlight without turning off the screen completely? I think this is what Fn+F5 should do, right?
* Are you going to try to push this patches upstream?

Thank you very much for your work and help. Regards.

PS. If you need a Spanish translator for Samsung Tools or any other project just let me know.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: Samsung NB30 Netbook - Brightness problem

Post by voria »

Glad to know everything is working. :)
dodo wrote: I still don't know what is Fn+F12 supposed to do (the icon looks like a padlock with a vertical double arrow inside), so...
It's the scroll lock, more info here.
dodo wrote: * Is there any option to turn off the backlight without turning off the screen completely? I think this is what Fn+F5 should do, right?
Exactly. At the moment the 'samsung-scripts' use the 'vbetool' command line utility to turn off screen completely, it's the best we can have.
Also the Fn-F8 does not behave as it should. It should manage the CPU fan instead of CPU governors.
Both keys' behaviour is changed in 'Samsung Tools', now they work as they were meant to do, by using the 'easy-slow-down-manager' interface which provides control of the screen backlight, wireless toggling and cpu fan modes.
dodo wrote: * Are you going to try to push this patches upstream?
No, since kernels >= 2.6.32 manage FN keys in a different way, by fixing definitely the usual problems with them. My kernel patches are just a temporary workaround for kernel 2.6.31 shipped with ubuntu karmic.
dodo wrote: PS. If you need a Spanish translator for Samsung Tools or any other project just let me know.
Sure, this would be great. :)
I've added the Spanish template to the project, it's already available and ready to be translated through the Launchpad translations system.
Thank you very much for your support. :)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
rogerrushworth
Newbie
Newbie
Posts: 9
Joined: 18 Mar 2010, 16:54
Location: Edinburgh

Re: Samsung NB30 Netbook - Brightness problem

Post by rogerrushworth »

Hi, I have recently purchased 2 NB30's and installed Ubuntu 9.10 Netbook Remix on them. I read the posts on this website and installed the repository ppa:voria/ppa and updated the install.

It works very well apart from two problems: the screen brightness control and resumption after sleep

Screen Brightness.
If the power cable is connected on boot, the screen is fully bright. If on battery, the screen is fully dim which is usable but only just.
I installed the advised samsung-scripts, linux, udev and samsung-backlight and tried the acpi-backlight=vendor on the kernel GRUB line but still cannot vary the screen brightness. Is there anything else I can try?

After Sleep.
on a couple of occasions, on wake-up after sleep, the screensaver is frozen and I have to power down the machine. It restarts ok after fsck, but this is not good. I will disable the screensaver.
Also, on wake-up after sleep or hibernate, the Wireless network connections disappear and cannot be resumed - I have to reboot the machine to find them again. I cannot find any settings to restart the wifi network. Any advice gratefully received.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: Samsung NB30 Netbook - Brightness problem

Post by voria »

According to dodo's reports, problems should be fixed on NB30.
Concerning the screen brightness control, please make sure to use the correct option on the GRUB kernel command line, ie "acpi_backlight=vendor" (without quotes).

Regarding the freezes after waking up from sleep, I'm sorry but I don't know what is causing this, It's the first time I hear of this problem. Hoping dodo is yet checking this thread, can he confirm the same behaviour on his NB30?

For the wireless connection disabled after resume, does it happen every time the system is resumed? If so, please uninstall 'samsung-scripts' then try again and let me know if the problem is still there, thanks.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
rogerrushworth
Newbie
Newbie
Posts: 9
Joined: 18 Mar 2010, 16:54
Location: Edinburgh

Re: Samsung NB30 Netbook - Brightness problem

Post by rogerrushworth »

Hi,
Thanks for your suggestions but they did not work for me. I have however fixed the Wireless resume problem.

Wireless on Resume
Yes it appears to lose Wifi on every suspend-resume cycle. I yum removed samsung-scripts but get the same behaviour. I do not even get "Wireless Network\n disconnected" in the status menu.

On viewing the /var/log/pm-suspend.log, I see that there were errors previously
/usr/bin/samsung-scripts: line 114: [: !=: unary operator expected
This is fixed by adding double quotes arounf the env variables in lines 114, 115 and 116 but is merely a warning.

There are now errors for /etc/pm/sleep.d/20_samsung_scripts, because samsung_scripts are not found.

On left-clicking the wireless icon on the taskbar and ifconfig -a does not list an entry for wlan0, and lsmod does not list the r8192e_pci module, which is there after restart. This means that the module has been unloaded, I found that it is unloaded by /usr/lib/pm-utils/sleep.d/54r8192e_pci and so edited this to load adding
"""
resume|thaw)
modprobe -i r8192e_pci
;;
"""
and the wireless connection is now found correctly on resume.

Can you arrange for the script to be updated accordingly by the correct sources?


Screensaver
I have disabled the screensaver so I have not repeated that problem.


Screen Brightness
I tried adding acpi_backlight=vendor to the end of the line starting with kernel, both with the ESC key on grub startup temporarily and then permanently by editing the /boot/grub/menu.lst file but the FN+UP and FN+DOWN keys do nothing. The NB30 starts up in full brightness if the power cable is connected on power up (and remembers this through suspend resume cycles) or in lowest brightness if the power cable is disconnected on power up.
Any suggestions would be gratefully received. I am sooo close! I am now looking at "acpi_fakekey"...
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: Samsung NB30 Netbook - Brightness problem

Post by voria »

rogerrushworth wrote: On viewing the /var/log/pm-suspend.log, I see that there were errors previously
/usr/bin/samsung-scripts: line 114: [: !=: unary operator expected
This is fixed by adding double quotes arounf the env variables in lines 114, 115 and 116 but is merely a warning.
Thanks for reporting, I will fix it.
rogerrushworth wrote: There are now errors for /etc/pm/sleep.d/20_samsung_scripts, because samsung_scripts are not found.
Sorry, but I don't understand this sentence. Anyway, the pm script is '20_samsung-scripts', not '20_samsung_scripts'.
rogerrushworth wrote: On left-clicking the wireless icon on the taskbar and ifconfig -a does not list an entry for wlan0, and lsmod does not list the r8192e_pci module, which is there after restart. This means that the module has been unloaded, I found that it is unloaded by /usr/lib/pm-utils/sleep.d/54r8192e_pci and so edited this to load adding
"""
resume|thaw)
modprobe -i r8192e_pci
;;
"""
and the wireless connection is now found correctly on resume.
Fixed now in the latest 'samsung-wireless' package.
rogerrushworth wrote: Screen Brightness
I tried adding acpi_backlight=vendor to the end of the line starting with kernel, both with the ESC key on grub startup temporarily and then permanently by editing the /boot/grub/menu.lst file but the FN+UP and FN+DOWN keys do nothing. The NB30 starts up in full brightness if the power cable is connected on power up (and remembers this through suspend resume cycles) or in lowest brightness if the power cable is disconnected on power up.
Any suggestions would be gratefully received. I am sooo close! I am now looking at "acpi_fakekey"...
Since other users with the same netbook model have no problems with backlight control, I suspect it's because of a different BIOS version in use.
What BIOS are you using?
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
rogerrushworth
Newbie
Newbie
Posts: 9
Joined: 18 Mar 2010, 16:54
Location: Edinburgh

Re: Samsung NB30 Netbook - Brightness problem

Post by rogerrushworth »

hi,

please ignore the 20_samsung_scripts point, I have reinstalled them.

The bios in /var/lib/acpi-support/bios-version is "05JJ.M030,20100218.RHU".

How do I get an update to a later version?
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

Re: Samsung NB30 Netbook - Brightness problem

Post by voria »

According to samsung website, the latest bios for NB30 is version 06JJ (released 2010-03-26).

To perform the update you need a windows installation, unfortunately. :(
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
rogerrushworth
Newbie
Newbie
Posts: 9
Joined: 18 Mar 2010, 16:54
Location: Edinburgh

Re: Samsung NB30 Netbook - Brightness problem

Post by rogerrushworth »

Luckily, I installed one of my two NB30's as dual boot and I downloaded and updated the BIOS on it to the latest and the FN-UP and FN-DOWN keys still do not change the screen brightness under Ubuntu. Frustratingly,the buttons do work in XP!

I tried listening to /var/run/acpid.socket with the python script
"""
#!/usr/bin/env python

from socket import *
s = socket(AF_UNIX,SOCK_STREAM)
s.connect("/var/run/acpid.socket")
while 1:
data = s.recv(1024)
print len(data),"%s"%data
"""

and this gets data from pressing the FN-F1 keys and connecting and disconnecting the Power cable but not from the FN-UP and FN-DOWN keys. Nor does it get anything from the FN-LEFT and FN_RIGHT which DO work to adjust the volume. Strange!

I also have an Acer One and the command "sudo acpi_fakekey 224" and 225 work as expected under Ubuntu NBR 9.10

Is there anything else I can try? Thanks for any help you can give me.
rogerrushworth
Newbie
Newbie
Posts: 9
Joined: 18 Mar 2010, 16:54
Location: Edinburgh

Re: Samsung NB30 Netbook - Brightness problem

Post by rogerrushworth »

Oops. indent the last two lines in the "while 1:" loop. Copy and Paste!
rogerrushworth
Newbie
Newbie
Posts: 9
Joined: 18 Mar 2010, 16:54
Location: Edinburgh

Re: Samsung NB30 Netbook - Brightness problem

Post by rogerrushworth »

Workaround for the NB30 brightness problem

I discovered elsewhere on this site that the command
setpci -s 00:02.0 F4.B=FF
sets the screen brightness to full when run as root and so the script "/usr/bin/setbright" as follows:
"""
#!/usr/bin/env python

from Tkinter import *
import os,sys

master=Tk()
var = IntVar()
def set(v):
var.set(int(v))
os.system("setpci -s 00:02.0 F4.B=%x"%(int(v)*16))
def full():
set(15)
def low():
set(1)
if __name__=="__main__":
f=Button(master,text="Full",command=full)
f.pack(anchor=CENTER)
var.set(15)
w=Scale(master,from_=15,to=1,command=set,variable=var)
w.pack()
f=Button(master,text="low",command=low)
f.pack(anchor=CENTER)
q=Button(master,text="Quit",command=sys.exit)
q.pack(anchor=CENTER)
mainloop()
"""
works pretty well for the moment.

Adding the command "/usr/bin/gksu /usr/bin/setbright" to the Main Menu structure allows you to set the NB30 brightness from 15 levels from Low to Full.
Post Reply