Brightness of Lenovo S10-3 (GMA 3150 video) on Linux
Posted by Luis Gallardo in Linux on 31/08/2010
The new netbook architecture comes with a Intel GMA 3150 graphic card, which it’s not supported completely by the kernel because it doesn’t show any information in the /sys/class/backlight directory. This means you won’t be able to adjust your LCD brightness with the function keys (ACPI), or use any plugin for that matter, or set the brightness with third-party applications such as laptop-mode-tools.
I did a research on Internet and I found a solution to the brightness adjustment problem, which consist in setting the value to the PCI device on the bus directly, as shown here:
setpci -s 00:02.0 f4.b=55
Where 00:02.0 is the PCI id on the bus, and 55 is a hexadecimal value between 0 and FF, which modifies the display’s brightness.
In order to konw which device id to write on, you can query the PCI bus:
mundungus:~# lspci 00:00.0 Host bridge: Intel Corporation N10 Family DMI Bridge 00:02.0 VGA compatible controller: Intel Corporation N10 Family Integrated Graphics Controller 00:02.1 Display controller: Intel Corporation N10 Family Integrated Graphics Controller 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
As you cans see the device id for the graphic card on the PCI bus is 00:02.0.
Setting laptop-mode-tools
Commonly laptop-mode-tools writes on a file into the /sys/class/backlight directory, as I wrote in previous post, but in this case you have to put the following:
BATT_BRIGHTNESS_COMMAND="setpci -s 00:02.0 f4.b=55" LM_AC_BRIGHTNESS_COMMAND="setpci -s 00:02.0 f4.b=77" NOLM_AC_BRIGHTNESS_COMMAND="setpci -s 00:02.0 f4.b=77" BRIGHTNESS_OUTPUT="/dev/null"
Notice you have to set the variable BRIGHTNESS_OUTPUT withe the value /dev/null, otherwise it won’t run properly.
References
Partitions on Lenovo IdeaPad S10-3
Posted by Luis Gallardo in Linux on 27/08/2010
I sold my Lenovo IdeaPad S10 to upgrade it to a Lenovo IdeaPad S10-3. As it happened with my sister’s S10-2 netbook, the partitions scheme looks like the ones shown above: A small partition (I assume to boot Windows), a 100 GB partition for Windows 7, another partition with 30 GB for backups, and 150 GB of rescue and driver for Windows.
Because my disk is mine, I decided to erase the two last partitions (I backup-ed its content first) and change the size of Windows 7 partition in order to make room for two Linux (Debian and Ubuntu), another partition for 1 GB of swap, and the remaining for /home, as is shown in the following picture:
Collateral damage
The only side effect is that some applications supplied by Lenovo, like the OneKey Recovey, won’t work properly because the partitions had been deleted. The solutions is to make the rescue disks before erase those partitions, or live with those partitions but resizing them to make room (this what’s I did on my sister’s netbook, a Lenovo S10-2).
Warning
Before resizing the Windows partition you better defragment the disk. You should also check that Windows 7 boots properly after resizing the partition, if not you can recovery it by using one of those partitions provided by Lenovo. I did the mistake of erasing them, so I had to borrow a Windows 7 recovery disk, because I didn’t want to wait for a recovery disc shipped from USA.
Ubuntu Software Center on Debian
Posted by Luis Gallardo in Linux on 17/08/2010
Some people yelled: what the heck is doing Debian by including Ubuntu Software Center in its repositories? The true is, like it or not, this package is available with the name Software Center, and I have to admit it’s an option for installing software, even more easier than Synaptic does. But it’s not only a graphical interface for installing packages, sol let’s install it and see what else it has to offer.
Installing Software Center
In a terminal you can type the following:
aptitude install software-center
This will install Software Center and its compounds.
Software Center
In order to use Software Center, which is depicted in the above image, you must got to Applications > System > Software Center:
From there you can search, instal and uninstall applications in the system as you would do from a terminal or graphically in Synaptic, but in a really easy way.
Update Manager
The Update Manager notifies users about new updates, the same way Ubuntu does.
This can be really useful for helping out forgetful people to keep their system up to date (from example if they use Debian testing).
Software Sources
You can also set the system’s repositories from the Software Sources utility. In my case I have some internal repositories with apt-cacher in my local network, which appear in the Third-Party Software Tab:
This application in the end just modifies the /etc/apt/sources.list file or the files in the /etc/apt/sources.list.d folder.
Compatibility with aptitude
My big concern was if this application would integrate with aptitude, I mean, if it were capable of uninstall unused dependency packages of a particular application. So far I’ve tested and it appears so!!
Using ssh as a network share
Posted by Luis Gallardo in Linux on 14/08/2010
You can use ssh as a secure ftp (sftp), so all your data will be encrypted throughout the network. To do so you can use some file browsers like Gnome’s Nautilus or KDE’s Dolphin, just by typing the remote path in the address bar as follow:
ssh://lgallard@192.168.1.30:/home/lgallard
Where lgallard is the user account at the server, 192.168.1.30 is the server’s IP address and /home/lgallard is the remote directory to map.
But what if your file browser doesn’t support the ssh protocol (like Xfce’s Thunar)?…A possible solution is to map the directory using sshfs and fuse as if it were another mount-point on the system.
Installing sshfs for fuse
In Debian you can install the sshfs package to provide this functionality:
mundungus:~# aptitude install sshfs
You must create the mount-point directory. I’m old-fashioned, so I like to make it in the /mnt/ folder as root:
mundungus:~# mkdir /mnt/moody mundungus:~# chmod 777 /mnt/moody
Now you must add the user who will map the network share into the fuse group:
adduser lgallard fuse
Using sshfs
Now as a normal user you can map the remote location using the sshfs command:
lgallard@mundungus:~$ sshfs lgallard@192.168.1.30:home /mnt/moody/
This will let you see your “network share” as if it were a local directory. Be careful!!
Unmonting the network share
In order to unmount the network share just type the following in a terminal:
lgallard@mundungus:~$ fusermount -u /mnt/moody/
You can check if it was unmounted using the mount command.
Switching to Gnome Desktop on Ubuntu Netbook Edition
Posted by Luis Gallardo in Linux on 10/08/2010
In the previous version of Ubuntu for netbooks (Ubuntu Netbook Remix)you could switch from the netbook environment to the complete Gnome. This was possible due to a package called desktop-switcher which gives that option. At first sight I thought users of this version were more restricted, but after seeing all option of gdm (the login manager) I realized that package is not needed any more because that option in included in the session selection. I think it makes sense because the Ubuntu Netbook Edition environment is Gnome with different settings to fix small displays.
Choosing the Gnome environment
In order to switch to the complete Gnome just do this:
- If you already logged in, select “Close session” on the menu you use to shutdown your netbook.
- Provide your user name.
- After typing your user name, choose the Gnome session.
- Provide you password
- After logging in you will see your complete Gnome environment loaded.
Choosing the Ubuntu Netbook Edition environment
If you want to go back to your Ubuntu Netbook Edition environment,you can repeat the procedure an select Ubuntu Netbook Edition or Ubuntu Netbook Edition 2D session.
Some issues
While testing this option I switched to Gnome and later to the Ubuntu Netbook Edition one more time, and although the latter loads witho problems, the Gnome‘s panel also does. The only way I found to load the Ubuntu Netbook Edition environment was by restarting the graphic server (if it sounds weird or you don’t know how to do it, by rebooting you netbook will be enough).
Using SSH
Posted by Luis Gallardo in Linux on 05/08/2010
If you are working in a networking environment, more likely you’ll need servers, run commands or copy files remotely and safely. For this you count on with the ssh protocol which allows you exchange data between devices through a secure channel, using public key cryptography to authenticate remote computers and users. Some features that offers ssh are:
- It allows you to mange computer remotely.
- It can be used as an FTP alternative (using SFTP).
- It the replacement of the r commands (rcp, rsh, rlogin and telnet).
- It allows you to redirect ports and tunneling.
- It can be used to run commands on remote servers.
- It allows to run graphical applications in a remote server and display them in the local computer.
- By default it listens on the TCP port 22.
Installing SSH
On Debian you can install the server and the client as follow:
aptitude install openssh-client openssh-server
Accessing remote servers
In order to access a remote server using an IP address, you can do the following:
ssh user@server.com ssh user@192.168.1.30
Where server.com must be a address associated to an IP address by and DNS or through the /etc/hosts file. In the other hand, if the current account exists in server and client, you can omit the user name and the current working user will be assumed:
ssh 192.168.1.30
Running commands remotely
In order to run a command remotely, you can use this syntax:
ssh user@server.com command ssh user@192.168.1.30 command
Where command refers to the command or absolute path of the program to run. Examples:
ssh user@server.com /usr/local/bin/backup ssh user@192.168.1.30 ls > listing.tx
Running graphical applications remotely
Sometimes you need to run graphical applications on remote server but display them on locally. You can achieve this with ssh by using the -X switch:
ssh -X user@server.com application ssh -X user@192.168.1.30 application
For instance, if you want to run Firefox from a remote server you can type the following:
ssh -X lgallard@192.168.1.30 firefox
Note: In order to display graphical applications remotely, the client must enable the following option in the /etc/ssh/sshd_config file:
X11Forwarding yes
Copying files remotely
Sooner or later you will need to copy files among working stations and, to avoid copy them on temporary media (like pendrives), you can copy directly from one device to another. To do so, follow this syntax:
Copy from a local computer to a remote server:
scp /local/path/to/file user@server.com:/remote/path scp /local/path/to/file user@192.168.1.30:/remote/path
Example:
scp /etc/passwd lgallard@192.168.1.30:/home/lgallard/Desktop
Copying from a remote server to a local computer::
scp user@server.com:/remote/path/to/file /local/path scp 192.168.1.30:/remote/path/to/file /local/path
Example:
scp root@192.168.1.30:/etc/shadow .
References
- Secure Shell en Wikipedia
- man ssh
API for forw.me released
Posted by Luis Gallardo in Off-Topic, Programming on 04/08/2010

Few days ago I commented about forw.me, a url shortener that lets you save room for posting in services like twitter or identi.ca. One of its TODOs was the publishing of an API to be able to develop plugins and applications based on the service. Well, they has released the API!!
In order to use the service visit http://forw.me.You can also contact the developer through his twitter account @forwme, or via email forwme@zava.com.ve
How to upgrade your PSP to firmware 6.31
Posted by Luis Gallardo in PSP on 31/07/2010
Sony has released the new PSP’ firmware 6.31, which has reliability “improvements” in some titles. If you are interested in upgrading to official firmware 6.31 on your PSP, here you are the instructions…
Warning
This is an official upgrade, meaning that this procedure will revert anything you’ve done to your console, for instance, it will revert any hacking. In other words, You will NOT be able to play backup games from the memory stick, you will NOT be able to run homebrew, and you will NOT be able to downgrade your PSP to a lower version unless your PSP is 100% hackable. The Patapon 2 demo exploit has been patched, so the HBL by m0skit0 and Wololo won’t run either…
Do it at your own risk.
Upgrading to 6.31
- Download the official firmware 6.31.
- Copy the 631.PBP file into ms0:/PSP/GAME/UPDATE on your MS. Create any folder if necessary.
- Rename 631.PBP file to EBOOT.PBP
- Remove your PSP safely.
- Now go to the XMB, go to game menu and run the update as is shown on the video.
Adding Ubuntu repo to apt-cacher
Posted by Luis Gallardo in Linux on 30/07/2010
I have already set an internal mirror on Debian to avoid downloading the same packages twice, and I did the same thing by adding the VirtualBox’s repo, so it lets me save bandwidth and time because all updated packages will be available on that internal mirror.
Now I installed Ubuntu Netbook Edition on my sister’s netbook and she told me that sometimes the updates can last so long, because her Internet connection is from a USB modem, and at some times it could be a nightmare to browse the net and update the system at the same time. Therefore, I decided to add the Ubuntu repo to my internal mirror, as is shown in the above picture.
Setting the Ubuntu repo in apt-cacher
In order to set the Ubuntu’s repository, edit the /etc/apt-cacher/apt-cacher.conf file. Find the path_map parameter and add the following:
path_map = debian http://ftp.us.debian.org/debian/ ; multimedia http://www.debian-multimedia.org ; virtualbox http://download.virtualbox.org/virtualbox/debian ; ubuntu http://ve.archive.ubuntu.com/ubuntu/
Setting up the Ubuntu clients
On the Ubuntu PCs you have to edit the /etc/apt/sources.list, commenting all its content and adding the following lines:
deb http://192.168.2.100:3142/ubuntu/ lucid main restricted deb http://192.168.2.100:3142/ubuntu/ lucid-updates main restricted deb http://192.168.2.100:3142/ubuntu/ lucid universe deb http://192.168.2.100:3142/ubuntu/ lucid-updates universe deb http://192.168.2.100:3142/ubuntu/ lucid multiverse deb http://192.168.2.100:3142/ubuntu/ lucid-updates multiverse deb http://192.168.2.100:3142/ubuntu/ lucid-security main restricted deb http://192.168.2.100:3142/ubuntu/ lucid-security universe deb http://192.168.2.100:3142/ubuntu/ lucid-security multiverse
Note: I also commented the deb-src repos because I know my sister won’t need them but if you do, adapt them using your internal mirror’s IP address.
As a final step, update the package list and upgrade the system from a terminal:
aptitude update aptitude safe-upgrade
Or use the graphical package manager to do the same.
Best Ubuntu mirror
Posted by Luis Gallardo in Linux on 25/07/2010
When you install Ubuntu you’ll never be asked about the mirror from where the packages will be downloaded because Ubuntu select a mirror according to your location or country. Therefore, after installing Ubuntu Netbook Edition the default mirror was http://ve.archive.ubuntu.com. If you come from Debian you will try to install apt-spy to find your best mirror, but Ubuntu doesn’t have such a tool, so how do you set a best mirror according to the best response?
Selecting the best mirror
Go to System > Software Sources. There click on Download from, and select Other. A new window will appear from where you can choose a new server, or click on the Select Best Server button as is shown in the above picture. By clicking that button Ubuntu will performance a test to determine your best server. In my case it was one located in USA.
Does it really work?
To update my Ubuntu Netbook Edition with the Venezuelan server it said it will last an hour and forty five minutes, but using the new server it lasted just 21 minutes!!














Planeta Linux