Tag Archive: debian squeeze


Working with a notebook, by default, it might be difficult to work with it on the battery more than two hours. It is not very helpful when you can not plug in to AC power nearby.

There are several ways to optimize your notebook’s battery life. All the tips provided have been tested on a HP Pavilion dm4 Notebook PC running Debian Squeeze 6.0.3. In this part, I will show you three utilities : gnome-power-preferences, xbacklight and xrandr.

gnome-power-preferences is part of the GNOME desktop. It helps you configuring basic actions whether your notebook runs on battery or on AC power. Below are screenshots showing my own settings :


xbacklight may be used as well to control backlight brightness using RandR extension.

To get the actual value :

fool@localhost~:$ xbacklight -get

100.000000

to dim this value by 50 percent for instance :

fool@localhost:~$xbacklight -dec 50.00

More information : xbacklight -help

Last but not least, here is the well-known xrandr. With this program, we can collect all the information concerning the video outputs of the notebook. Some graphics card may activate all its video outputs by default. For sure, you do not use of all them in the same time. Desactivating the non-used ones may help your battery feel better :-)

fool@localhost:~$xrandr -q

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1366×768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1366×768       60.1*+   40.1  
   1360×768       59.8     60.0  
   1024×768       60.0  
   800×600        60.3     56.2  
   640×480        59.9 

LVDS output stands for your LCD panel. Do not desactivate it. If no cable is connected from your VGA output, desactivate it with the following command :

fool@localhost:~$ xrandr –output VGA –off

These are basic tools to make a better use of your notebook’s battery. In the next parts, a few other tools will be presented with a much better tuning capability.

Oracle released a new version of VirtualBox a few days ago.

Please find below all the fixes applied and all new features added :

  • Mac OS X hosts: fixed incompatibility with recent Mac OS X versions in 64-bit mode (bug #8474)
  • Mac OS X hosts: fixed incompatibility with hosts with more than 16 cores (bug #8389)
  • Mac OS X hosts: fixed painting corruptions on a second monitor in 64-bit mode (bug … (closed)” href=”http://www.virtualbox.org/ticket/7606″>#7606)
  • GUI: restored functionality to set an empty host key to disallow any host key combination (4.0.6 regression; bug Fixed in SVN (closed)” href=”http://www.virtualbox.org/ticket/8793″>#8793)
  • VBoxManage: added controlvm screenshotpng subcommand for saving the screenshot of a running VM in PNG format
  • VBoxHeadless: fixed potential crash during shutdown (Windows hosts only)
  • NAT: built-in services use the correct Ethernet addresses in Ethernet header and in ARP requests
  • Host-only networking: fixed adapter reference counting
  • E1000: fixed rare guest crashes with Linux SMP guests (bug Fixed in SVN (closed)” href=”http://www.virtualbox.org/ticket/8755″>#8755)
  • SATA: fixed guest disk corruption under rare circumstances (only relevant for guests with more than 2GB RAM; bug Fixed in SVN (closed)” href=”http://www.virtualbox.org/ticket/8826″>#8826)
  • Storage: fixed data corruption after a snapshot was taken with asynchronous I/O enabled (bug #8498)
  • Floppy: several improvement
  • HPET: another fix for time jumps (bug Fixed … (closed)” href=”http://www.virtualbox.org/ticket/8707″>#8707)
  • USB: removed assumption that string descriptors are null-terminated (Windows hosts only)
  • 3D support: fixed a potential crash when resizing the guest window
  • 3D support: fixed GNOME 3 rendering under Ubuntu 11.04 and Fedora 15
  • Snapshots: fixed another bug which could lose entries in the media registry when restoring a snapshot (bug #8363)
  • Shared Folders: don’t stop mounting the other valid folders if one host folder is inaccessible (4.0.6 regression)
  • Linux Additions: check whether gcc and make are installed before building kernel modules (bug #8795)
  • Solaris Additions: added support for X.Org Server 1.10
  • Guest Additions: fixed inappropriate Guest Additions update notification when using vendor-specific version suffixes (bug #8844)

For more information for installing it :

Download VirtualBox 4.0.8

If you encounter the following errors while playing a multimedia file with mplayer :

AO: [pulse] Init failed: Connection terminated
Failed to initialize audio driver ‘pulse’
waitpid(): No child processes
[AO_ALSA] alsa-lib: pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Internal error
[AO_ALSA] Playback open error: Connection refused
Failed to initialize audio driver ‘alsa’
[AO OSS] audio_setup: Can’t open audio device /dev/dsp: No such file or directory
[AO_ALSA] alsa-lib: pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Then, you have to install the following Debian package to make use of PulseAudio  as the default sound server for all applications like mplayer. Beforehand, most of them were using Alsa as the default audio output.

root@localhost:~#apt-get install pulseaudio-module-x11

To take the modification into account, log out from your current session and log in again. You can be able to play any multimedia files with PulseAudio as the default sound server.

More details about this additional PulseAudio module : pulseaudio-module-x11

I am not able to see the content of my MP3 player. (MPMAN TK250)
When I connect it to my PC, here is the output I get from /var/log/syslog :

fool@localhost:~$ tail -f /var/log/syslog

usb 1-4: new high speed USB device using ehci_hcd and address 19
kernel: [34983.036040] usb 1-4: new high speed USB device using ehci_hcd and address 20
kernel: [34983.556034] usb 1-4: new high speed USB device using ehci_hcd and address 21
kernel: [34984.100043] usb 1-4: new high speed USB device using ehci_hcd and address 22
kernel: [34984.988039] usb 2-2: new full speed USB device using ohci_hcd and address 6
kernel: [34985.031471] usb 2-2: New USB device found, idVendor=1cae, idProduct=4efc
kernel: [34985.031479] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: [34985.031484] usb 2-2: Product: TK250
kernel: [34985.031487] usb 2-2: Manufacturer: RockChip
kernel: [34985.031491] usb 2-2: SerialNumber: USBV1.00
kernel: [34985.031669] usb 2-2: configuration #1 chosen from 1 choice
kernel: [34985.035532] scsi4 : SCSI emulation for USB Mass Storage devices
kernel: [34985.041634] usb-storage: device found at 6
kernel: [34985.041639] usb-storage: waiting for device to settle before scanning
kernel: [34990.041679] usb-storage: device scan complete
kernel: [34990.048284] scsi 4:0:0:0: Direct-Access     TK250                     1.00 PQ: 0 ANSI: 0
kernel: [34990.093337] sd 4:0:0:0: [sda] 15941632 512-byte hardware sectors: (8.16 GB/7.60 GiB)
kernel: [34990.276034] usb 2-2: reset full speed USB device using ohci_hcd and address 6
kernel: [34990.344354] sd 4:0:0:0: [sda] Test WP failed, assume Write Enabled
kernel: [34990.366530] sd 4:0:0:0: [sda] Attached SCSI removable disk
kernel: [34993.321810] sd 4:0:0:0: [sda] 15941632 512-byte hardware sectors: (8.16 GB/7.60 GiB)
kernel: [34993.504035] usb 2-2: reset full speed USB device using ohci_hcd and address 6
kernel: [34993.572858] sd 4:0:0:0: [sda] Test WP failed, assume Write Enabled
kernel: [34993.594861] sda: detected capacity change from 8162115584 to 0
kernel: [34995.323160] sd 4:0:0:0: [sda] 15941632 512-byte hardware sectors: (8.16 GB/7.60 GiB)
kernel: [34995.504043] usb 2-2: reset full speed USB device using ohci_hcd and address 6
kernel: [34995.572180] sd 4:0:0:0: [sda] Test WP failed, assume Write Enabled

Here is what lsusb gives :

root@localhost:~# lsusb

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 1cae:4efc
Bus 002 Device 002: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

uname -r : 2.6.30-2-686

With modinfo , you can check the parameters available for a given module.

root@localhost:~# modinfo scsi_mod

modinfo scsi_mod
filename:       /lib/modules/2.6.30-2-686/kernel/drivers/scsi/scsi_mod.ko
license:        GPL
description:    SCSI core
depends:
vermagic:       2.6.30-2-686 SMP mod_unload modversions 686
parm:           dev_flags:Given scsi_dev_flags=vendor:model:flags[,v:m:f] add black/white list entries for vendor and model with an integer value of flags to the scsi device info list (string)
parm:           default_dev_flags:scsi default device flag integer value (int)
parm:           max_luns:last scsi LUN (should be between 1 and 2^32-1) (uint)
parm:           scan:sync, async or none (string)
parm:           max_report_luns:REPORT LUNS maximum number of LUNS received (should be between 1 and 16384) (uint)
parm:           inq_timeout:Timeout (in seconds) waiting for devices to answer INQUIRY. Default is 5. Some non-compliant devices need more. (uint)
parm:           scsi_logging_level:a bit mask of logging levels (int)

All the lines beginning with “parm” are all the parameters available.
I created a file in which I put the following lines (as a matter of test) :

options scsi_mod maxluns=254
options scsi_mod scan=sync
options scsi_mod inq_timeout=10

This file, named module_scsi_mod.conf, is located in /etc/modprobe.d.
To take it into account, relaunch udev :

root@localhost:~# service udev restart

The problem still remains.

I have looked through the web for tips, some troubleshooting but nothing interesting.
If you have any ideas, feel free to post your comments here.

Follow

Get every new post delivered to your Inbox.