Ubuntu:Feisty ja/Hardware

From

Jump to: navigation, search

Contents

ハードウェア

マウス

FireFoxでマウスの側面ボタンを有効にするには

Firefoxでマウスの側面ボタンを有効にするにはxorg.confに2行を追加するだけです。この設定は多くの5ボタンマウスで動作するでしょう。この説明書で動作するマウスのリストは以下の通りです。

  • Logitech MX310
  • Logitech MX510
  • Logitech MX518
  • Logitech MX700
  • Logitech MX Revolution
  • Intellimouse Explorer (first edition)
  • Razer Copperhead


Backup X.org configuration file X.org設定ファイル(xorg.conf)のバックアップをとります。

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

Modify the X.org configuration file X.org設定ファイルを変更します(下記の例ではgeditで編集する場合です)。

gksudo gedit /etc/X11/xorg.conf

Find the Input Device section for your mouse and add two lines as shown below. You may also increase the number of buttons if your mouse has more than 7, just fix the rest of the section based upon the number of buttons (remember back/forward, wheel click & tilt left/right all count as buttons) マウスのためのInput Device セクションを探し、Option "Emulate3Buttons" "true"以下に2行を追加してください。7つ以上のボタンを持つマウスをお持ちなら、残りのセクションをボタンの数と同じく修正し、ボタンの数を増やすことが出来ます(戻る/進む,ホイールのクリック,ホイールの左右の傾きがボタンとしてカウントされることを覚えておいてください)。

この記述を

Section "InputDevice"
	Identifier "Configured Mouse"
	Driver "mouse"
	Option "CorePointer"
	...
	Option "Protocol" "ExplorerPS/2"
	...
	Option "Emulate3Buttons"       "true"
EndSection

以下のように変更します

Section "InputDevice"
       Identifier "Configured Mouse"
       Driver "mouse"
       Option "CorePointer"
       Option "Device" "/dev/input/mice"
       Option "Protocol" "ExplorerPS/2"
       Option "ZAxisMapping" "4 5"
       Option "Emulate3Buttons" "true"
       Option "Buttons" "7"
       Option "ButtonMapping" "1 2 3 6 7"
EndSection

Buttons still won't work in Nautilus unless you install the imwheel dameon. Nautilusではimwheelデーモンをインストールしない限りボタンは動作しません。

IMWheelをインストールし設定するには

  • IMWheelをインストールする
sudo apt-get install imwheel
  • IMWheel設定ファイルを変更する
gksudo gedit /etc/X11/imwheel/imwheelrc
  • 設定ファイルの最後に以下の記述を追加します
".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right 

"(null)"
None, Up, Alt_L|Left
None, Down, Alt_L|Right


  • IMWheel用のスタートアップスクリプトを作成します
sudo mkdir /home/login
gksudo gedit /home/login/mouse
  • 新規作成した/home/login/mouseファイルに以下の行を追加します
#!/bin/sh
exec xmodmap -e "pointer = 1 2 3 6 7 4 5" &
exec imwheel -k -b "67" &
exec $REALSTARTUP
  • 全てのユーザに先のスクリプトを実行可能な権限を与えます
sudo chmod +x /home/login/mouse
  • スタートアップでこのスクリプトが実行されるよう設定します
    1. ツールバーで'システム' > '設定' > 'セッション'を選択します
    2. '自動起動するプログラム'タブをクリックします
    3. '新規(N)'ボタンをクリックし表示されたダイアログの'コマンド(C)'フィールドに以下のように入力します: /home/login/mouse
    4. 'OK(O)'ボタンを押しダイアログを終了し、セッションウィンドウを'閉じる(C)'で閉じます。
  • コンピュータかGnomeデスクトップ環境を再起動し、マウスの'戻る/進む'ボタンがNautilus上で動作するかテストしてください。

(Dont know why but the above worked flawlessly for me with Dapper but not with Feisty, to get it to work in Feisty had to enter a space between 6 and 7 on the line exec imwheel -k -b "67" & hope this helps) (Dapparでは上記の記述で完全に動作しますがFeisty(7.10)では動作しません。Feistyで動作させるにはexec imwheel -k -b "67" &と記述する必要があります。)

Apple Mighty Mouseを設定するには

Apple Mighty Mouse works out of the box, this how to should cover setting up of horizontal scrolling using ball and sidebuttons. Apple Mighty Mouse の動作は報告されていません。ボールと側面ボタンを利用して水平スクロールを設定する方法についてカバーされる予定です。

This is placeholder only. Please, provide working howto. ここは場所取りのために作られています。誰か動作報告を提供ください。

タッチパッド

キーボードタイプ中にタッチパッドを無効にするには

The utility syndaemon can be used to temporarily disable a Synaptic touchpad while typing. キーボードタイプ中に"Synaptic touchpad"を無効にするためにsyndaemonユーティリティを一時的に利用することが出来ます。

First you must edit /etc/X11/xorg.conf to allow the syndaemon utility to access the touchpad's settings. まず、/etc/X11/xorg.confを編集しsyndaemonユーティリティがタッチパッドの設定にアクセスできるようにします。 Make a backup of the file, then: xorg.confファイルのバックアップを行い、以下のとおり入力して編集します:

sudo gedit /etc/X11/xorg.conf

Find the touchpad section: タッチパッドにについてのセクションを探します:

Section "InputDevice"
    Identifier     "Synaptics Touchpad"
    Driver         "synaptics"
    Option         "SendCoreEvents" "true"
    Option         "Device" "/dev/psaux"
    Option         "Protocol" "auto-dev"
    Option         "HorizScrollDelta" "0"
    Option         "SHMConfig"
EndSection

Add the SHMConfig option if it does not already exist. もしSHMConfigのオプション設定がなければ追加します。

After you restart X (log out and log in again), you will be able to run syndaemon. X.orgの再起動後(ログアウトし再ログインする)、syndaemonを実行することができます。

syndaemon -t -d

Use syndaemon -h to view additional options. syndaemon -hをターミナル上で実行し、オプションを確認してください。

To have syndaemon start up automatically when you log on, add the command as a new startup program (System -> Preferences -> Sessions -> Startup Programs). ログイン時に自動的にsyndaemonを起動するには、システム -> 設定 -> セッションの自動起動するプログラムにsyndaemonの実行コマンドを追加してください。

Adjust touchpad sensitivityタッチパッドの感度を調節するには

Although gsynaptics allows you to adjust sensitivity, it still isn't sensitive enough for all users. This allows for greater fine tuning of touchpad sensitivity. First you must edit /etc/X11/xorg.conf. Make a backup of the file, then:

sudo gedit /etc/X11/xorg.conf

Find the touchpad section:

Section "InputDevice"
    Identifier     "Synaptics Touchpad"
    Driver         "synaptics"
    Option         "SendCoreEvents" "true"
    Option         "Device" "/dev/psaux"
    Option         "Protocol" "auto-dev"
    Option         "HorizScrollDelta" "0"
    Option         "SHMConfig"
EndSection

Add the following after SHMConfig:

Option		"MinSpeed"		"1.0"
Option		"MaxSpeed"		"1.3"
Option		"AccelFactor"		"0.3"

Modify the values to personal taste. After you restart X (log out and log in again), you will using the new sensitivity settings.

Enable vertical, horizontal and circular scrolling

This howto will explain the procedure to setup a Synaptics touchpad for vertical, horizontal and circular scrolling (The same procedure may work for other touchpads, but has not been confirmed)

  • First: Install gsynaptics
sudo apt-get install gsynaptics

Second you have to edit your /etc/X11/xorg.conf to allow gsynaptics to access the the touchpad's settings

  • Second: Backup /etc/X11/xorg.conf
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
  • Third: Allow gsynaptics access to the touch pads settings
sudo gedit /etc/X11/xorg.conf

Find the touchpad section:

Section "InputDevice"
    Identifier     "Synaptics Touchpad"
    Driver         "synaptics"
    Option         "SendCoreEvents" "true"
    Option         "Device" "/dev/psaux"
    Option         "Protocol" "auto-dev"
    Option         "HorizScrollDelta" "0"
    Option         "SHMConfig"
EndSection

Add the SHMConfig option if it does not already exist.

After you restart X (log out and log in again), from the Gnome menu goto System > Preferences > Touchpad

From the Touchpad window you can modify you touchpads settings

グラフィックス・カード

How to setup nvidia drivers in 7.04

System > Administration > Restricted Devices Manager

Enable Driver

Apply Changes

Insert Ubuntu 7.04 Feisty Fawn CD-ROM

or

Cancel > Close

Applications > Add/Remove Applications

(Add / Remove apps will load up checking dependencies)

Click Preferences next to help in the bottom left of the add / remove applications windows.

Uncheck the "CD ROM With Ubuntu 7.04..." option from the list of installable CD-ROM volumes.

There, now every time you use the add / remove applications program to install things, it goes onto the internet to get the packages instead of the discs. The idea behind this is to get the LATEST updates.

Close the options, close the next box, then click OK to exit out of add / remove applications and save the changes we just made.

Make sure the Nvidia glx is downloaded and installed from either the internet or the install CD, or the next step wont work, as the command will have nothing to execute. thats right, you really need NVIDIA GLX. :)

With the Nvidia Driver enabled in the restricted devices manager, we can safely go into the console and mess with the newly loaded drivers' settings to get a nice looking desktop with an acceptable resolution, color depth and refresh rate. These drivers also let us adjust the positioning of multiple monitors much like the forceware drivers in windows, but totally not like windows at the same time. You'll see what I mean when you see the layout and complexity of the panel! Now we must reboot.

System > Quit > Restart

Now we got to the console...

Load up Applications > Accessories > Terminal

If you haven't already done so you may right click on Terminal under Applications > Accessories > Terminal and then add the application to the panel, to make the terminal easier to access in the future.

Load up the terminal, and type in...

sudo nvidia-settings

Then type in your root password (whatever that is)

SHAZAAM!

See that?! See that!?!?! Tweak to your hearts content, but don't be too foolhardy or blow up your monitor by accident by cranking the rez or refresh too high.

If you want to enabled dual monitors then try playing around with twinview.

How to setup Dual Monitors with NVidia in Feisty Fawn

From Dual Monitors with NVidia in Ubuntu - Ubuntu Geek

  • Install nvidia-glx driver
sudo apt-get install nvidia-glx
  • Make a backup of xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
  • Edit xorg.conf
sudo gedit /etc/X11/xorg.conf
    • Under the "Module" section, replace "nv" with "glx"
    • Under the "Device" section, make sure that "Driver" says “nvidia”
    • Under the "Screen" section, add the following line:
Option "RenderAccel" "true"
  • Save xorg.conf
  • Restart X with Ctrl+Alt+Backspace
    • If X will not start, type the following to restore xorg.conf to working status:
sudo cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

and reboot.

  • Assuming everything went well, we’re quite close to having dual screens working. Edit xorg.conf again
sudo gedit /etc/X11/xorg.conf
  • Under the "Screen" section, add these lines:
##This turns on NVidia’s TwinView
Option "TwinView"
##Here I’m setting the resolution to the individual monitors.
Option "MetaModes" "1280×1024 1280×1024"
  • Restart X with Ctrl+Alt+Backspace

You should now have dual monitors


How to align monitors left-to-right

Method 1:

  • Edit xorg.conf
  • Under the "Screen" heading, add:
##Orientation Options are: LeftOf, RightOf, Below, Above, or Clone
Option “TwinViewOrientation” “LeftOf”
  • Save xorg.conf
  • Restart X with Ctrl+Alt+Backspace


Method 2:

  • Run nVidia Settings
gksudo nvidia-settings
  • In X Server Display Configuration, drag the visible displays around
  • Apply and Save to X Configuration File when you're happy with the settings


How to change primary display from CRT to LCD

From: First display on TwinView - nV News Forums

  • Get the nVidia driver working, as per the howto above
  • Run nVidia Settings
gksudo nvidia-settings
  • Click the Save to X Configuration File button to tidy up the config
  • Restart X with Ctrl+Alt+Backspace
  • Backup xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
  • Open xorg.conf in an editor
sudo gedit /etc/X11/xorg.conf
  • Add the following line at the bottom of the "Screen" section:
Option      "TwinViewXineramaInfoOrder" "DFP"
  • Save xorg.conf
  • Restart X with Ctrl+Alt+Backspace

ベータ版のグラフィックスドライバをインストールするには (NVIDIA)

  • Thanks to Alberto Milone
sudo gedit /etc/apt/sources.list
  • Add ONE of the following lines based on your architecture
deb http://www.albertomilone.com/drivers/edgy/latest/32bit binary/
deb http://www.albertomilone.com/drivers/edgy/latest/64bit binary/
deb http://www.albertomilone.com/drivers/edgy/newlegacy/32bit binary/
deb http://www.albertomilone.com/drivers/edgy/newlegacy/64bit binary/
  • 編集したファイルを保存してください。
  • Add the GPG key
wget http://albertomilone.com/drivers/tseliot.asc
gpg --import tseliot.asc
gpg --export --armor albertomilone@alice.it | sudo apt-key add -
  • 更新とインストール
sudo apt-get update
sudo apt-get install nvidia-glx
sudo apt-get upgrade
  • The upgrade should update your linux-restricted-modules & linux-restricted-modules-common packages.
sudo nvidia-xconfig
  • Add a menu option for nVidia Settings
sudo gedit /usr/share/applications/NVIDIA-Settings.desktop
  • Insert these lines in the new file and save
[Desktop Entry]
Name=NVIDIA Settings
Comment=NVIDIA Settings
Exec=nvidia-settings
Icon=
Terminal=false
Type=Application
Categories=Application;System;
  • 新しいドライバのインストール後にコンピュータの再起動を行わなければなりません
  • 2つのプログラムによってインストールの確認を行います。
glxinfo
glxgears


標準のX.org NVIDIAドライバでPivot(画面の回転)を設定するには

  • Some LCD monitors are equipped with the pivot feature, to take advantage of it the display has to be rotated 90 degrees. The default nVidia drivers shipped with X.org ("nv") support software screen rotation. Note that it's unaccelerated and can be slow, read #How to install Graphics Driver (NVIDIA) if you decide to install the proprietary driver.
  • To rotate the screen find the "Device" section for the "nv" driver in the /etc/X11/xorg.conf file:
Section "Device"                                                                
       Identifier      "NVIDIA Corporation NV34 [GeForce FX 5200]"
       Driver          "nv"
  • Add the following options to this section:
       Option "Rotate" "CW"

Where the "Rotate" option has two possible values (depending on the orientation of the monitor):

  1. CW - rotate the display clockwise (right).
  2. CCW - rotate the display counterclockwise (right).

X.org標準のNVIDIAドライバでPivot機能を設定するには

  • Some LCD monitors are equipped with the pivot feature, to take advantage of it the display has to be rotated 90 degrees. The proprietary nVidia drivers support hardware rotation with the Xrandr extension.
  • To enable rotation support find the "Device" section for the "nvidia" driver in the /etc/X11/xorg.conf file:
Section "Device"                                                                
       Identifier      "NVIDIA Corporation NV34 [GeForce FX 5200]"
       Driver          "nvidia"
  • Add the following option to this section:
       Option          "RandRRotation" "on"
  • Then the display can be rotated (direction depends on the orientation of the monitor) by:
  1. Setting the "Rotation" property to either "Left" or "Right" in the "System > Preferences > Screen Resolution" dialog.
  2. Issuing either "xrandr -o left" or "xrandr -o right" command.

How to disable NVIDIA graphics logo on GNOME startup

  • The easy way
sudo nvidia-xconfig --no-logo
  • Alternative method
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf
  • Find this section
 ...
Section "Device"
	Identifier	"NVIDIA Corporation NV11 [GeForce2 MX/MX 400]"
	Driver		"nvidia"
	BusID		"PCI:1:0:0"
...
  • Add the following line below it
   Option		"NoLogo"

How to configure dual head on NVIDIA based cards

  • Install binary driver
  • Make a backup of xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  • Edit xorg.conf
sudo nano /etc/X11/xorg.conf
  • Add these lines to the "Device" section
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf"   
Option "UseEdidFreqs" "True"
Option "MetaModes" "1280x1024,1280x1024; 1024x768,1024x768"
Option "UseDisplayDevice" "string" #replace 'string' with either 'DFP' (Digital flat panel connected via DVI port), 
   'CRT' (any monitor that is connected via VGA ports), or 'TV'
  • Save and close xorg.conf
  • Restart X-Windows or reboot
  • This was tested on an NVIDIA FX 5200 and known to work using "CRT" as an option for the second monitor
  • If you run into trouble where X is hosed and can get back to the command line, replace xorg.conf with the backup copy
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf

How to install Graphics Driver (ATI)

How to Correct the Graphics Resolution (Intel)

  • Intel 915g, 945g, etc. graphics chipsets only have a limited set of resolutions initially installed, despite the correct driver being detected.
  • Install the resolution altering tool:
sudo apt-get install 915resolution
  • Run the following to see the availible modes:
915resolution -l
  • Choose a resolution you don't need and replace, for example the following changes 1920x1440 to 1920x1200
915resolution 5c 1920 1200
  • Restart X-Windows.
  • To confirm resolution change look at the "System>Preferences>Screen Resolution" tool.
  • If it works correctly then you can make the change permanent:
sudo gedit /etc/default/915resolution
  • Find this lines:
MODE=Auto
XRESO=
YRESO=
BIT=
  • And replace with the following lines:
mode=5c
XRESO=1920
YRESO=1200
BIT=24
  • Save and restart your computer to confirm it works.


  • Another way to get the resolution you want is to do this(doesn't always work):
sudo apt-get install xserver-xorg-video-intel
  • With this you don't need the 915resolution anywhere in your Feisty as your resolution will now be handled by X, the windowing system in Linux.

How to show nvidia GPU temperature (nvidia-settings)

At a terminal, type

nvidia-settings

How to detect CPU temperature, fan speeds and voltages (lm-sensors)

sudo apt-get install lm-sensors

Create file called mkdev.sh, and paste in the following

#!/bin/bash

# Here you can set several defaults.

# The number of devices to create (max: 256)
NUMBER=32

# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600

# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses devfs."
exit;
fi
fi

i=0;

while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i || exit
chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
i=$[$i + 1]
done
#end of file

Make this file executable, then run it

sudo chmod +x mkdev.sh
sudo ./mkdev.sh

Now detect sensors, and answer "y" to all questions.

sudo sensors-detect

To load the manual modules, type

sudo /etc/init.d/module-init-tools

Load the modules into kernel with

sudo sensors -s

And check the output

sudo sensors

How to control fan speed (lm-sensors)

Install and config lm-sensors first, see section above. Then run pwmconfig to test your fans

pwmconfig

If you can control fan speeds, great. Now creat a file called /etc/init.d/fancontrol, and paste in the following

#!/bin/sh
#
# Fancontrol start script.
#

set -e

# Defaults
DAEMON=/usr/sbin/fancontrol
PIDFILE=/var/run/fancontrol-pid
PATH=/sbin:/bin:/usr/sbin:/usr/bin

test -f $DAEMON || exit 0

. /lib/lsb/init-functions


case "$1" in
       start)
               log_begin_msg "Starting fancontrol daemon..."
               start-stop-daemon --start -o -q -m -b -p $PIDFILE -x $DAEMON
               log_end_msg $?
               ;;
       stop)
               log_begin_msg "Stopping fancontrol daemon..."
               start-stop-daemon --stop -o -q -p $PIDFILE
               log_end_msg $?
               ;;
       force-reload|restart)
               sh $0 stop
               sh $0 start
               ;;
       *)
               log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload}"
               log_success_msg "  start - starts system-wide fancontrol service"
               log_success_msg "  stop  - stops system-wide fancontrol service"
               log_success_msg "  restart, force-reload - starts a new system-wide fancontrol service"
               exit 1
               ;;
esac

exit 0

Make it excutable

sudo chmod +x /etc/init.d/fancontrol

Test it

/etc/init.d/fancontrol start

and

/etc/init.d/fancontrol stop

If it works fine, autoload it when you reboot. Insert the following line into /etc/rc.local, before "exit 0"

/etc/init.d/fancontrol start

How to monitor CPU, GPU temperatures, fan speeds and voltages (GKrellM)

  • Install hddtemp first to monitor hard drive temperatures
sudo apt-get install hddtemp

GKrellM is a hardware monitor that can display CPU and GPU temperatures, fan speeds, voltages, CPU load, network load, disk activity, disk temperature, memory usage, and swap usage. The installation is very easy, and configuration is just a few mouse-clicks. You can set alerts to warn you if the CPU is too hot or there is a fan failure. The hddtemp utility works with GKrellM to allow it to sense the disk temperature, as keeping your disks cool (e.g. less than around 40C) will allow them to last longer than if they run continually at higher temperatures (e.g. above 50C).

sudo apt-get install gkrellm

To run the program

Click Applications -> System Tools -> GKrellM

To configure the settings,

Right click on GKrellM -> Configuration

I was struggling with lm_sensors before, but it doesn't detect all of the sensors on my computer. Later I found "GKrellM". It displays the GPU temperature on my nVidia 6600 GT out of the box. GKrellM also has plugins that show weather info, set reminders, etc.

Add an audio alert (optional Step): Here is how to play an audio message when the CPU is too hot or a fan fails. First you need to find or record your own audio alert files. (I use Audacity to record my own.) Then go to:

Configuration -> Builtins folder (Left side)-> Sensors -> Temperatures folder (Right side)-> CPU -> Alerts Button

Paste ONE of the following lines into a Terminal window first to test the sound. If you have two sound cards, you can use "-ao oss:/dev/dsp1" option to route the sound to the second sound card. Modify the file path and name so it points to the correct file. If you can hear the sound, then copy that line to a command line text field on the GKrellM's Alerts window.

mplayer /home/myfolder/alert_messages/heat_alert.mp3
mplayer -ao oss:/dev/dsp1 /home/myfolder/alert_messages/heat_alert.mp3

How to detect CPU temperature, fan speeds for Dell Laptops and install Gkrellm plugin (i8kutils, gkrellm-i8k)

Install i8k utilities

apt-get install i8kutils gkrellm-i8k

To load the module automatically run the following in a terminal window

sudo gedit /etc/modules

Add the following to the end of the file

i8k force=1

Load the module by restarting or

modprobe i8k
  • To monitor with Gkrellm,

Load Gkrellm, goto Gkrellms configuration page, enable the Dell i8k Plugin in the Plugins section. You should now see a new section on the Gkrellm panel with fan controls, CPU temperature, service tag etc

CPU

How to enable your CPU's Power Saving/Frequency Scaling features

  • Check whether or not you already have working power-save (it should install automatically!)

Open a Terminal window (in Applications > Accessories) and type,

cat /proc/cpuinfo

Look for the reference to "cpu MHz" and compare it to the official MHz of your processor. If it is considerably lower, e.g. a 2.0 GHz processor reporting as 1.0 GHz, then the power-save frequency scaling is probably already working. You can further test this by running a cpu intensive process, e.g. glxgears, and then retesting the cpu speed -- if it has increased to the official MHz then the automatic scaling is already working. (Note: the instructions below can also allow you to manually set the cpu speed.)

  • Step 1: Enable BIOS Support

Enter your BIOS at boot and make sure both ACPI and Cool'n'Quiet (AMD) or SpeedStep (Intel) are enabled. Some BIOSes may not have option at all. If that is the case it is probably enabled by default. Other BIOSes may have the option but it is listed as another name altogether. If that is the case check your BIOS manual for more info.

  • Step 2: Remove Userspace Scaling Software

powernowd

sudo apt-get remove powernowd

cpudyn

sudo apt-get remove cpudyn
  • Step 3: Install CPU Module

Identify your cpu type by running the command

cat /proc/cpuinfo

You can also Check the following links AMD CPU Chart - [[1]] Intel CPU Chart - [[2]]

AMD Sempron/Athlon/MP ( K7 )

Socket Types: A, Slot A

sudo modprobe powernow-k7

AMD Duron/Sempron/Athlon/Opteron 64 ( K8 )

Socket Types: 754, 939, 940, S1 ( 638 ), AM2 ( 940 ), F ( 1207 )

sudo modprobe powernow-k8

Intel Core Duo

sudo modprobe speedstep-centrino

Intel Pentium M

sudo modprobe speedstep-centrino

Intel Pentium 4

sudo modprobe p4_clockmod

Others (Unknown)

I'm not entirely sure which cpus are supported using this module. If your cpu doesn't work with one of the above methods try this one.

sudo modprobe acpi-cpufreq
  • Step 4: Scaling Modules
sudo modprobe cpufreq_conservative
sudo modprobe cpufreq_ondemand
sudo modprobe cpufreq_powersave
sudo modprobe cpufreq_stats
sudo modprobe cpufreq_userspace
  • Step 5: Testing/Configuration

Show Available Governors

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

You should see output similar to

powersave conservative ondemand performance
  • Step 6: Load Modules at Boot

Add the following lines to the end of /etc/modules

cpufreq_conservative
cpufreq_ondemand
cpufreq_powersave
cpufreq_stats
cpufreq_userspace
Also add the module you selected in Step 3
  • Step 7: Install cpufrequtils

This is a simple, effective tool for using the modules from the command line.

sudo apt-get install cpufrequtils

Test that it's working.

cpufreq-info
  • Step 8: Select a governor

The different governors control how the CPU speed is scaled. Your choices are:

ondemand

CPU frequency is scaled based on load.

conservative

The CPUfreq governor "conservative", much like the "ondemand" governor, sets the CPU depending on the current usage. It differs in behaviour in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU. This behaviour more suitable in a battery powered environment.

performance

CPU only runs at max frequency regardless of load.

powersave

CPU only runs at min frequency regardless of load.

See [[3]] for more details.

I typically use ondemand. You get a very slight performance hit and save a lot of power (and produce a lot less heat when idle).

Try it out:

cpufreq-set -g ondemand

On systems with more than one CPU you need to repeat the last command for every other CPU you have with specifying the parameter -c (CPU). To set the governor for the second CPU write:

cpufreq-set -c 1 -g ondemand

To see how many CPUs you have type:

ls /sys/devices/system/cpu/ 
  • Step 9: Configure cpufrequtils to automatically set this governor on boot

Edit the file /etc/default/cpufrequtils. Change the line:

ENABLE="false"

to

ENABLE="true"

Set the GOVERNOR value to the governor name you chose in Step 8.

Sources: [[4]] [[5]]

Modems / Network

How to identify Modem chipset

wget -c http://easylinux.info/uploads/scanModem.gz
gunzip -c scanModem.gz > scanModem
chmod +x scanModem
sudo cp scanModem /usr/bin/
  • To identify Modem chipset
sudo scanModem
gedit Modem/ModemData.txt

How to install Windows Wireless Drivers (Ndiswrapper)

  • Read #General Notes
  • In order to install ndiswrapper you need a copy the windows drivers for your Wireless ethernet device.
  • This is only meant to be installed if your card isn't supported by Ubuntu, check Ubuntu's list of natively supported wireless cards.
  • Check ndiswrapper's list of supported wireless cards if your card isn't supported natively, please visit Ndiswrapper's official supported cards list
  • If your card is supported by ndiswrapper, you can install and configure it via a gui tool (ndisgtk) very easily. Use the Add/Remove Applications tool and search for "Ndiswrapper driver installation tool". Once installed, you can configure the wireless connection by going to System -> Administration -> Windows Wireless Drivers. Some more information on this here.


To Install manually follow the steps below:

  • Find out if you have acx module loaded. Because acx module interferes with windows driver, we need to remove it if it is found.
lsmod | grep acx
  • Remove the acx module if found. It could also be acx_pci or similar. Please Note: New kernel updates will auto load the acx module again. So repeat the following two commands every time the kernel is updated.
sudo rmmod acx
sudo nano /etc/modprobe.d/blacklist
  • Add a new list at the end of the file like this:
# drivers wireless ACX
blacklist acx
  • Install ndiswrapper and drivers (due to a bug in Edgy, you need to specify ndiswrapper-utils-1.8)
sudo apt-get install ndiswrapper-utils-1.8
sudo ndiswrapper -i /location_of_your_wireless_driver/your_driver.inf
sudo ndiswrapper -l
sudo modprobe ndiswrapper
  • Set ndiswrapper to load on startup
sudo ndiswrapper -m
gksudo gedit /etc/modules
  • Add the following module to the list
ndiswrapper
  • Now you can configure your wireless card with ifconfig and iwconfig.
e.g. Supposing wlan0 is your wireless device.
sudo iwconfig wlan0 essid "AP" key ababababababababab mode Managed
iwconfig
  • You sould now be able to see the MAC address of the access point and signal rate.
  • Please note that certain card drivers have re-association errors when used with ndiswrapper. This means that whenever you restart Ubuntu, your internet connection does not work, even if it is set to load on startup. To combat this, use this line in the terminal (also assuming wlan0 is your wireless device).
sudo iwconfig wlan0 essid x mode Managed

Ndiswrapper for Broadcom 43xx wireless chipset

  • The Broadcom 43xx (bcm43xx) wireless chipset is one of the most common chipsets, so special scripts have been written for it.
  • Only follow this if you have a bcm43xx device. To check in the Terminal type:
lspci | grep Broadcom\ Corporation

If it displays a line similar to this,

0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

you have a Broadcom wireless chipset. Please proceed with the instructions.

  • Put the Ubuntu CD that you installed Ubuntu with in the CD drive.
  • Download this to the desktop (the Firefox default, so if you haven't changed it, that's where it went/will go).

Note - you will have to register to get this file. Registration is free so please don't report a broken link.

  • In a terminal type
cd ~/Desktop (or wherever you downloaded the file)
tar -xf bcm4318*.tar.gz
sudo ./ndiswrapper_setup

Your wireless chipset should now work. Try rebooting if you have problems. Please see this thread if you have problems: http://ubuntuforums.org/showthread.php?t=197102&highlight=install+ndiswrapper

Edit : The above guide did not work for me (Pete) on 64 bit ubuntu. My lspci output read:

 03:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

However I found a much easier way to install the drivers, this will probably work on 32 bit as well (someone please confirm).

Edit: I (Dun) confirm this. In my Feisty it worked but when I tested the same method in Edgy it did not work as in Feisty.

Code in terminal :

sudo apt-get install bcm43xx-fwcutter

fwcutter asks if you would like it to extract the firmware as part of the setup. Say yes. After this type:

sudo modprobe bcm43xx

Unplug you Wired connection, wait 30-60 seconds and then enjoy wireless using network manager by the clock.

Note: I (mobius) found the fwcutter method to work well, except at a very limited speed (100kb/s max, as opposed to the 6.75mb/s max in a G network). Ndiswrapper is a bit less reliable, but gives much greater speeds at the moment.

How to enable WPA with Ndiswrapper driver

Make sure on your own that the Ndiswrapper driver works by itself without encryption.

  • Create a file called /etc/wpa_supplicant.conf, and paste in the following. Modify the ssid and psk values.
ctrl_interface=/var/run/wpa_supplicant
 network={
   ssid="YourWiFiSSID"
   psk="YourWiFiPassword"
   key_mgmt=WPA-PSK
   proto=WPA
   pairwise=TKIP
 }


  • Run the following code to test it and make sure your router is broadcasting its SSID.
sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd

(If your wireless interface is not named "wlan0", replace "-iwlan0" with "-i[name-of-your-wireless-interface]". E.g. "-ieth1")


  • If your WPA works, change your configuration file so Ubuntu automatically connects you to your network. Run:
gksudo gedit /etc/network/interfaces

In the editor, change your wlan0 (or whatever your wireless interface is) section to the following:

If you are using static IP:

auto wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

or this, if you are using dhcp.

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant


  • Reload your network configuration:
sudo /etc/init.d/networking restart

Alternately, you can follow the instructions in /usr/share/doc/wpasupplicant/README.modes.gz to configure roaming WPA authentication.

How to install Modem Driver (SmartLink)

uname -r (must be 2.6.10-5-386)
wget -c http://easylinux.info/uploads/sl-modem-modules-2.6.10-5-386_2.9.9a-1ubuntu2+2.6.10-34_i386.deb
sudo dpkg -i sl-modem-modules-*.deb
sudo apt-get install sl-modem-daemon

Using mobile phone/GPRS/EDGE as Internet modem

"GPRS Easy Connect" (GPRSEC) is a free program for Linux which configures and manages Internet connection via mobile phones. GPRSEC supports COM, USB, IrDA and Bluetooth connections on GPRS, EDGE and UMTS technologies.

Palm

How to configure PalmOS Devices

gksudo gedit /etc/udev/rules.d/10-custom.rules
  • Insert the following line into the new file
BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", NAME{ignore_remove}="pilot", MODE="666"
  • Save the edited file
  • Add the pilot-applet to the Taskbar by Right-Clicking on an empty spot
  • Follow the instructions on screen

Hard Drive

Please note the disks utility mentioned below does not exist anymore. It was part of GNOME and has now been removed in the newer versions. Ie. there is no System -> Administration -> Disks. There are however 2 alternate tools that should in conjunction with each other be able to accomplish the same tasks that one may use "Disks" for.

Code in terminal

sudo apt-get install pysdm
sudo apt-get install gparted

To run Gparted

System -> Administration -> GNOME Partition Editor

To run pysdm open terminal and type

sudo pysdm 

Please note - Both of these applications have the ability (if used incorrectly) to destroy all your data forever.

Please take care when using them.

How to list partition tables

sudo fdisk -l
  • You can also use System -> Administration -> Disks

How to list filesystem disk space usage

df -Th
  • You can also use System -> Administration -> Disks

How to list mounted devices

mount

How to remount /etc/fstab without rebooting

sudo mount -a

How to install software RAID

Many users who are converting over to Ubuntu from the Windows world are accustomed to using the "RAID" implementations on their motherboards, only to learn that these controllers are considered 'fake RAID' in the Ubuntu world and are not generally supported. Fortunately, if you are planning/willing to do a fresh install, it is easy to implement RAID drives under Ubuntu using the existing (and very stable) software RAID drivers. Also, note that many people say that the Ubuntu software RAID is just as fast -- if not faster -- than the 'fake RAID' implementations were under Windows.

The general technique is to install using the "Alternate" Ubuntu CD which uses a text-based installer but also includes additional setup options. The steps below demonstrate setting-up a 2 drive mirror:

  1. Start the install and, when asked about disk partitioning, select "Manual"
  2. If there are any existing partitions, select and delete each of them
  3. Select Free Space and create a 'partition' of Type = "physical disk for RAID". For the partition which will eventually be the main "\" root, also set it as bootable.
  4. You will need to do this repeatedly, for each desired partition (see suggestion below) and again on the other(s) hard drive
    FYI - the simplest partition setup would start with one partition equal to the entire disk less 1 or 2GB (for eventual "\" root), plus a second partition for the final 1 or 2GB (for eventual "swap")
  5. Select the menu option, "Configure Software RAID"
  6. Create a multi-disc partition, aka "md", and assign the matching partition from each drive. For the main partition, set the Format = "Ext3" and set Type = "\ root". For the swap partition, set Format = "swap".
  7. Now you can simply continue the installation as usual!

USB

How to list USB devices

lsusb

Workaround for random device disconnections

Random disconnection is a kernel bug that is not fixed yet. Some users report randomly disconnecting USB devices, especially external hard drives. One solution is to start the system with the option "irqpoll" in grub, but this doesn't work for everybody, and is believed to make the whole system slower. The other solution is to disable USB 2.0. This will result in way slower read/write, but the connection remains stable.

To disable USB 2.0, type this in the terminal:

sudo modprobe -r ehci_hcd

Test if the copy/write process is stable, and if you want to disable USB 2.0 upon boot, type:

sudo sh -c 'echo blacklist ehci_hcd > /etc/modprobe.d/blacklist-ehci'
sudo update-initramfs -u -k `uname -r`

Optical Drives

How to speed up CD/DVD-ROM

e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM
sudo hdparm -d1 /dev/cdrom
sudo cp /etc/hdparm.conf /etc/hdparm.conf_backup
gksudo gedit /etc/hdparm.conf
  • Append the following lines at the end of file
/dev/cdrom {
    dma = on
}
  • Save the edited file

How to mount/unmount CD/DVD-ROM manually, and show all hidden and associated files/folders

e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
  • To mount CD/DVD-ROM
sudo mount /media/cdrom0/ -o unhide
  • To unmount CD/DVD-ROM
sudo umount /media/cdrom0/

How to forcefully unmount CD/DVD-ROM manually

e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
sudo umount /media/cdrom0/ -l


Monitors / Displays

How to enable Large Widescreen Support

  • 24/23" widescreen monitors sometimes have issues running 1920x1200.
  • Examples include: Dell 2405, HP 2335 or an Apple Cinema Display.
sudo gedit /etc/X11/xorg.conf
  • CAUTION: Feisty has something called Desktop Effects which can reconfigure your xorg.conf file automatically. If you manually edit the file Desktop Effects may not work properly. (Always make a copy of the xorg.conf file before editing. cp /etc/X11/xorg.conf /etc/X11/xorg.conf.A)
  • Add the following line to the appropriate "Monitor" section
Modeline	"1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235
  • For example the HP2335 should now look like:
Section "Monitor"
	Identifier	"hp L2335"
	Option		"DPMS"
	Modeline	"1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235
EndSection

How to enable CRT output (external monitor/projector) for notebooks (Intel)

Note: Valid for Intel® graphics controller-based products only

sudo apt-get install i810switch

Turn on CRT output

i810switch crt on

Turn off CRT output

i810switch crt off

Sound

How to make sound works with Intel Integrated Sound Cards

  • Edit the file /etc/modprobe.d/alsa-base:
gksudo gedit /etc/modprobe.d/alsa-base
  • Add the following line to the end of the file, replacing '3stack' with your flavor (see below)
options snd-hda-intel model=3stack

How to setup the surround speakers (5.1 and others) with ALSA

  • Edit the ~/.asoundrc file, create it if it doesn't exist:
gedit ~/.asoundrc
  • Enter the following section:
pcm.!default {
    type plug
    slave.pcm "surround51"
    slave.channels 6
    route_policy duplicate
}
  • This will allow to play the surround output and duplicate the stereo output to all 6 channels (not only front ones).


How to change default soundcard

  • View available soundcards
sudo asoundconf list
  • You should get something like this
Names of available sound cards:
  Live
  V8237
  • Switch soundcard with 'example' being the name of the preferred soundcard
sudo asoundconf set-default-card example

How to setup PulseAudio Sound Server

  • What Is It?

PulseAudio, previously known as Polypaudio, is a sound server for POSIX and Win32 systems. A sound server is basically a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.

PulseAudio has been tested on Linux, Solaris, FreeBSD, Windows 2000 and Windows XP. It should also run on all other POSIX and Windows systems, but may require new backends to handle their sound systems.

But first, some motivation. Why use a sound server these days? Doesn’t ALSA work now? Well, there’s 3 main reasons to rig up PulseAudio:

1. Here’s the main one - PulseAudio can seamlessly play audio on any networked PC, regardless of what computer you’re actually at. What does this mean? Basically, you can hit play on your laptop and have the audio come out of the speakers attached to the desktop.

2. Old programs that use OSS can be rigged to work correctly while having other sounds playing at the same time

3. This one hasn’t been realized yet, but it’s also a very cool feature: audio can be manipulated per-application. While controlling this manually can already be done, it gets really cool when this is automatic based on the class of audio - for example, the music being turned down automatically when a VOIP phone call comes in. Someone worked on this as a Google SoC project, but he didn’t get very far (his implementation was a bit farfetched imo anyways)

http://pulseaudio.org/

  • Installation

Type the following in a terminal:

sudo apt-get install "pulseaudio-*" paman padevchooser paprefs pavucontrol

Optionally you may want to install gst-pulse, a GStreamer 0.10 plugin for the PulseAudio sound server.

sudo apt-get install gst-pulse

If you have Flash Player 9:

wget http://pulseaudio.vdbonline.net/libflashsupport/libflashsupport_1.0~2219-1_i386.deb
sudo dpkg -i libflashsupport_1.0-2219-1_i386.deb

here is a mirror for the package in case the link above dies:

libflashsupport_1.0-2219-1_i386.deb

Then, edit the ALSA configuration file using the command:

sudo mv /etc/asound.conf /etc/asound.conf.backup
sudo gedit /etc/asound.conf

Add this to the asound.conf:

pcm.pulse {
 type pulse
}
ctl.pulse {
 type pulse
}
pcm.!default {
 type pulse
} 
ctl.!default {
 type pulse
}

Go to System->Preferences->Sounds and check “Enable Software Mixing”

http://apollo.divshare.com/apollo2/files/2007/04/22/454225/pulseaudio1.jpg

Then either Applications->Sound & Video->PulseAudio Preferences or in a terminal type:

paprefs

Set the following settings:

http://apollo.divshare.com/apollo2/files/2007/04/22/456554/pulseaudio2.jpg

Make sure that Multicast/RTP is off or else you’ll have problems with skipping and latency. Reboot or in a terminal type:

pulseaudio

then Applications->Sound & Video->PulseAudio Device Chooser and if you have more than one PC with this setup, you’ll be able to choose which computer to send the audio to.

Add everyone to the pulse-access group. To do this, go to System->Administration->Users and Groups, click on “Manage Groups”, scroll down to “pulse-access”, Properties, then check everyone in the list. Otherwise, you’ll get weird “no-sound” errors and lockups.

http://apollo.divshare.com/apollo2/files/2007/04/22/456555/pulseaudio3.jpg

To control the volume go to Applications->Sound & Video->PulseAudio Volume Control

http://apollo.divshare.com/apollo2/files/2007/04/22/456557/pulseaudio4.jpg

  • Final Notes

Unfortunately while you can definitely get this to work, it’s a bit of a hassle and kind of buggy - PulseAudio isn’t very bullet-proof quite yet and you might have to do some haggling. Skype in particular is annoying; it’s usually better to killall pulseaudio before trying to make a Skype call although I did get it working through OSS and padsp.

  • Credits

The Perfect Setup Revolution Linux wiki http://blog.paulbetts.org

Misc

How to list PCI devices

lspci


How to install a Wacom tablet

For a detailed guide with screenshots about how to configure the "Extended input devices" in your graphic applications, please follow the official Dapper guide at https://wiki.ubuntu.com//Wacom

With the version of the Linux Wacom driver (0.7.2) in Ubuntu 6.06 Dapper Drake, if you unplug you tablet, it won't function when you plug it back in and you will have to restart X. For this reason, it is best to leave the tablet plugged in. This limitation will be removed when the 0.7.4 version of the driver is included in Ubuntu.

  • 1. Using Synaptic package manager, check if the packages xserver-xorg-input-wacom and wacom-tools are already installed - if not, install them. If you prefer using the command line, you can also execute :
     sudo apt-get install xserver-xorg-input-wacom wacom-tools
  • 2. Save a copy of your /etc/X11/xorg.conf :
      sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  • then edit it with the command line :
      gksudo gedit /etc/X11/xorg.conf
  • and change all /dev/wacom occurences into /dev/input/wacom (created by wacom-tools udev scripts), then save the file.
  • You should be ready to go after you have restarted X. Remember to configure the "Extended input devices" in your graphic applications (Gimp, Inkscape), however you can already check if it's working by moving your stylus on the tablet : the mouse cursor should go through the whole screen.


How to fix strange mouse behavior when using a KVM switch

On using (cheap) 2-way KVM switches (Keyboard-Video-Mouse switches allow you to share these peripherals between different machines) with ps/2 connectors for keyboard and mouse it is possible that the mouse does not behave properly anymore when switching machines. E.g. it will jump around on the screen and randomly clicks while you only move the mouse.

This is caused by the fact that the kernel mouse driver psmouse first talks to the mouse in a basic (base) mode (only moving + 2 mousebuttons) and checks to see if it can set the mouse to 'advanced' mode (activate scrollwheel and extra buttons) so it from then on informs the kernel of events using the ImPS/2 (imps) or ExplorerPS/2 (exps) protocol. When switching between machines power to the mouse is lost for an instant causing the mouse to revert to basic mode. Since the kernel still expects the advanced mode signals the messed up behavior occurs. A way to solve this is the following:

  • Read #General Notes
  • Check whether your psmouse kernel driver supports the options needed
      modinfo psmouse
  • Look for the line reading "parm: resetafter:Reset(...)". You can set this and the other parameters by editing the /etc/modprobe.d/options file. The resetafter parameter tells the mouse driver how many bad packets are accepted before the mouse is told again which protocol to use. In this case you want to change that from the default (= never) behavior. So edit the options file:
      gksudo gedit /etc/modprobe.d/options
  • Add the following line:
      options psmouse resetafter=1
  • Save and exit. You can now restart the mousedriver for the changes to take effect:
      sudo modprobe -r psmouse
      sudo modprobe psmouse

Solution originally stated by Matti Kurkela.

Personal tools
Sponsor
   CuBox