Fedora: 64 bit vmware error

Error
unable to change virtual machine power state: failed to connect to peer process


run vmware-config.pl and get the following warning:
$ sudo vmware-config.pl 
The following libraries could not be found on your system:
libXtst.so.6


Install libXtst.so.6 and problem fixed.
yum install libXtst-1.0.3-3.fc9.i386

Fedora 9 x86_64: use flash-plugin with firefox.i386 ro firefox.x86_64

I tried both firefox.i386 and firefox.x86_64 with flash-plugin from Adobe. I prefer the x86_64, because I found it:
  • it runs faster than i386 version.
  • it pulls in fewer i386 packages (61 vs 78).
  • I had issues update firefox.i386 once in a while due to the mixed i386 and x86_64 repos.
Here are the instructions on

Installing firefox.i386 on FC9 x86_64 and adding flash-plugin to both firefox.i386 and firefox.x64_64.

However there seems to be a memory leak with the npviewer.bin that comes with one of the nspluginwrapper.

Vmware Guest Clock Issue

The following article explains how to correct it.

Host Power Management Causes Problems with Guest Timekeeping on Linux Hosts

1. turn on sync time with host in vmware tools

2. add the following lines in /etc/vmware/config (2000000 is my machine's highest CPU frequency).
host.cpukHz = 2000000
hostinfo.noTSC = TRUE
tools.syncTime = TRUE

Sample .conkyrc good with xfce

A conkyrc file used my my dell laptop.
alignment top_right
background no
border_width 2
update_interval 5
no_buffers yes
out_to_console no
own_window yes
own_window_type desktop
own_window_hints below,skip_taskbar
own_window_transparent yes
stippled_borders 0
uppercase no
use_spacer no
show_graph_scale no
show_graph_range no
pad_percents 3
gap_x 10
gap_y 10
use_xft yes

TEXT
${color grey}Frequency (in MHz):$color $freq
${color grey}RAM Usage:$color $memperc% ${membar 6}
CPU Usage:$color $cpu% ${cpubar 7}
${color #cccccc}Batt:$color ${battery_bar 6,72 BAT0} $color ${battery_bar 6,72 BAT1} ${color grey}Temp:$color $i8k_cpu_temp
$hr
${color grey}Name PID CPU% MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
$hr
Eth0 Up:$color ${upspeed eth0} k/s${color grey} - Down:$color ${downspeed eth0} k/s
Wifi0 Up:$color ${upspeed wifi0} k/s${color grey} - Down:$color ${downspeed wifi0} k/s

Fedora 9: Mixed fc7 and fc8 Packages

When upgraded from fc7 to fc8, there were hundreds of packages still there from fc7 and some from fc6. Most of the them are duplicated. I had several repo's, and upgraded one by one. I wonder if that was the problem.

For fc9, I update all the yum repo's to release 9 before running yum update.
Right now for fc9, I only have handful of fc7 and fc8 packages.

Also run:
package-cleanup --cleandupes

CPU Speed Governor and Stepping

cpufreq-info      cpufreq-selector  cpufreq-set       cpuspeed
$ cpufreq-info
cpufrequtils 003: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@lists.linux.org.uk, please.
analyzing CPU 0:
driver: powernow-k8
CPUs which need to switch frequency at the same time: 0 1
hardware limits: 1000 MHz - 2.00 GHz
available frequency steps: 2.00 GHz, 1.80 GHz, 1000 MHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1000 MHz and 2.00 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 2.00 GHz (asserted by call to hardware).
analyzing CPU 1:
driver: powernow-k8
CPUs which need to switch frequency at the same time: 0 1
hardware limits: 1000 MHz - 2.00 GHz
available frequency steps: 2.00 GHz, 1.80 GHz, 1000 MHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1000 MHz and 2.00 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 2.00 GHz (asserted by call to hardware).

$ cat /etc/sysconfig/cpuspeed
### SCALING THRESHOLDS ###
# Busy percentage threshold over which to scale up to max frequency
# default value: empty (use governor default)
UP_THRESHOLD=50
# Busy percentage threshold under which to scale frequency down
# default value: empty (use governor default)
DOWN_THRESHOLD=

Cpu Temperature, Fan speed

$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp: +36.0°C
Core1 Temp: +44.0°C

dme1737-i2c-0-2e
Adapter: SMBus nForce2 adapter at 4c00
V5stby: +0.01 V (min = +0.00 V, max = +6.64 V) ALARM
Vccp: +1.36 V (min = +0.00 V, max = +2.99 V)
V3.3: +3.31 V (min = +0.00 V, max = +4.38 V)
V5: +4.98 V (min = +0.00 V, max = +6.64 V)
V12: +11.86 V (min = +0.00 V, max = +15.94 V)
V3.3stby: +3.36 V (min = +0.00 V, max = +4.38 V)
Vbat: +0.00 V (min = +0.00 V, max = +4.38 V)
CPU_Fan: 2671 RPM (min = 0 RPM)
Fan2: 1208 RPM (min = 0 RPM)
Fan4: 0 RPM (min = 0 RPM)
RD1 Temp: +38.5°C (low = -127.0°C, high = +84.0°C)
Int Temp: +41.2°C (low = -127.0°C, high = +84.0°C)
CPU Temp: +41.6°C (low = -127.0°C, high = +84.0°C)
cpu0_vid: +1.550 V

Fedora: lose my mouse with NODUSM3 SR2177CL

Can not remember if it is related to the motherboard or the graphics card which is GeForce 6150 LE. Add the following line in xorg.conf fixed it
Section "Device"
Identifier "Generic Video Card"
Driver "nvidia"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "SyncMaster"
DefaultDepth 24
Option "UseDisplayDevice" "DFP"
Option "OnDemandVBlankInterrupts" "True" #power saving
Option "Coolbits" "1" #enable overclocking
Option "HWCursor" "Off"
SubSection "Display"
Depth 24
Modes "1680x1050"
EndSubSection
EndSection

Note: HWCursor OFF is no longer required in Fedora 10, in fact it cause problem with the cursor with compiz.

For compiz, I added the following lines:

ModulePath "/usr/lib64/xorg/modules/extensions/nvidia"
ModulePath "/usr/lib64/xorg/modules/extensions"
ModulePath "/usr/lib64/xorg/modules"

Option "XAANoOffscreenPixmaps"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
Option "AllowGLXWithComposite" "true"

CentOS 5: install GeForce4 440 GO on Inspiron 8200

The nv driver from CentOS is very slow, firefox 3 is almost unusable. Xorg spikes the CPU up and the fan is going crazy. The driver from nvidia speed it up significantly. Here is how to install.
1.
sudo ./NVIDIA-Linux-x86-96.43.07-pkg1.run


2. add Option "UseDisplayDevice" "DFP" in /etc/X11/xorg.conf to fix the black screen problem, looks like (note the line option "NvAGP "1" enables suspend and hibernate, with agpart it does not wake up correctly)
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
Option "UseDisplayDevice" "DFP"
Option "NvAGP" "1"
EndSection
If you get an error like below, you can blacklist agpgart or in newer kernel pass agp=off in the kernel parameter.

Kernel: NVRM: not using NVAGP, an AGPGART backend is loaded!
$cat /proc/driver/nvidia/agp/status
Status: Disabled



There is a performance difference when NvAGP is enabled (glxgears -info):
    Option         "NvAGP" "0"
6991 frames in 5.1 seconds = 1382.975 FPS

Option "NvAGP" "1"
9940 frames in 5.0 seconds = 1987.856 FPS

options nvidia NVreg_EnableAGPFW=1 NVreg_EnableAGPSBA=1 in modprobe.conf (breaks suspend to ram)
28095 frames in 5.0 seconds = 5618.965 FPS

Finally, cpu load is much lower, would not spike as before (even idling). The load average was 0.3 even when idling.
$ uptime
09:36:32 up 35 min, 3 users, load average: 0.00, 0.02, 0.07


Also download the driver from Nvidia and ftp://download.nvidia.com/XFree86/

Here is a FAQ for Inspiron 8200.

Below is the complete working xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder57) Wed Jul 2 12:30:48 PDT 2008

# Xorg configuration created by pyxf86config

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Synaptics" "CorePointer"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Synaptics"
Driver "synaptics"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "Emulate3Buttons" "yes"
Option "LeftEdge" "120"
Option "RightEdge" "830"
Option "TopEdge" "120"
Option "BottomEdge" "650"
Option "FingerLow" "14"
Option "FingerHigh" "15"
Option "MaxTapMove" "110"
Option "VertScrollDelta" "20"
Option "HorizScrollDelta" "20"
Option "MinSpeed" "0.3"
Option "MaxSpeed" "0.75"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 30.0 - 110.0
VertRefresh 50.0 - 150.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "nvidia"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "UseDisplayDevice" "DFP"
Option "NvAGP" "1"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

CentOS 5: Install i8kutils

Install i8kutils and gkrellm from fc6.

$ sudo rpm -ivh i8kutils-1.25-11.fc6.i386.rpm gkrellm-2.2.9-10.fc6.i386.rpm


$ cat ~/.i8kmon
set config(0) {{0 0} -1 68 -1 70}
set config(1) {{1 1} 55 75 55 75}
set config(2) {{2 1} 65 85 65 85}
set config(3) {{2 2} 75 128 75 128}


$ i8kctl
1.0 A08 757JG21 61 1 0 6180 0 1 0
$ i8kctl temp
62
$ i8kctl fan
1 0
$ i8kctl speed
6180 0

$ i8kmon -t 10 -d &

manual fan control
$ i8kfan 2 2

CentOS Selinux

Install setroubleshoot.noarch to show selinux error messages:
 yum install setroubleshoot-server.noarch setroubleshoot.noarch


Allow Apache to listen to a different port and check which port is selinux allowed:

semanage port -a -t http_port_t -p tcp 81

semanage port -l


selinux also prevent mysqld to start after relocate /var/lib/mysql to /home/mysql:
 chcon -R -t mysqld_var_run_t /home/mysql 
ll -Z .
-rw-rw---- mysql mysql user_u:object_r:mysqld_var_run_t ibdata1
-rw-rw---- mysql mysql user_u:object_r:mysqld_var_run_t ib_logfile0
-rw-rw---- mysql mysql user_u:object_r:mysqld_var_run_t ib_logfile1
drwx------ mysql mysql user_u:object_r:mysqld_var_run_t mysql
drwx------ mysql mysql user_u:object_r:mysqld_var_run_t test

Allow mysqld to use /home/mysql

# cat /tmp/avc
host=tortoise type=AVC msg=audit(1221459330.317:413): avc: denied { create } for pid=7642 comm="mysqld" name="forum_db" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:mysqld_var_run_t:s0 tclass=dir
# audit2allow -M local < /tmp/avc
******************** IMPORTANT ***********************
To make this policy package active, execute:

semodule -i local.pp

# semodule -i local.pp

#audit2allow -M local -i /var/log/audit/audit.log

httpd access denial, change type to httpd_sys_content_t
chcon -R -t httpd_sys_content_t /var/www/html/

CentOS 5: Grub problem after installing

A black screen with a blinking cursor. It was working previously with Fedora 9. Late found that the boot order was changed in the BIOS, the hd1 was in front was hd0, but hd1 does not have a boot sector. It works after I changed boot order to boot from hd0 first. But I do not understand how the boot order was altered during the installation.

MySQL

Show Databases
mysql> show databases;

Show Status/variables
mysql> show status;

mysql> show variables;
$ mysqladmin variables
$ mysqladmin processlist extended-status -i5

Delete database
mysql> drop database vanilla_db;

Change default mysql database location.
 /etc/my.cnf

Backup
mysqldump -u root -p my_db > my_db.sql

Restore
mysql -p -u root  my_db < my_db.sql

QCache and exam qcache_lowmem_prunes
show  status like "ques%";

show status like "qcache%";

Installing Vanilla Forum

First set up mysql, follow the instructions here.
MySQL Server:  localhost
MySQL Database: vanilla_db
MySQL User: guest
MySQL Password: XXXXXXX

Cookie Domain: www.server.com

Set up mysql server

Installing:
yum install mysql mysql-server php-mysql

Chkconfig
chkconfig --level 345 mysqld on

Manual start
/etc/init.d/mysqld start
...
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h tortoise password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation
...

Run /usr/bin/mysql_secure_installation and accept all defaults.
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
- Dropping test database...
ERROR 1010 (HY000) at line 1: Error dropping database (can't rmdir './test', errno: 13)
... Failed! Not critical, keep moving...
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
... Success!

Cleaning up...



All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


Add vanilla_db and guest user (used for vanilla forum):

mysql -u root -p

mysql> create database vanilla_db;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on vanilla_db.* to guest@localhost identified by 'XXXXXXXX';
Query OK, 0 rows affected (0.00 sec)

Slow Internet / DNS with Fedora

Generally disabling IPv6 should fix it.

In
my case, it did not. Later, I found out that it was a problem with my
DSL 604+ router (with DSN relay enabled that causes cache overflow).
After I disabled DNS relay on the router or add the DNS servers
manually to /etc/resolv.conf, the browser and internet connection
became very fast.

Fedora 9: pirut

It is replaced with packagekit in fc9. When I upgrade to fc9, pirut
stayed in fc8. When I removed it and reinstalled it, packagekit got
installed instead.

Fedora 9: WPC 11 v3 (ver 3)

Should use the orinoco_cs driver (works in F13).
/sbin/lspcmcia
Socket 0 Bridge: [yenta_cardbus] (bus ID: 0000:02:01.0)
Socket 0 Device 0: [orinoco_cs] (bus ID: 0.0)
Socket 1 Bridge: [yenta_cardbus] (bus ID: 0000:02:01.1)


manually bring it up, and other useful commands (as root)
ifup eth0
iwconfig eth0
iwlist eth0 scan


I found fedora 9 is somewhat slow on this dell inspiron 8200 pentium 4 1.8G. (This is related to nv driver issue I found later, see my other post here for detail).

Fedora 9: scim not working in XFCE after upgrading

scim was working in XFCE when I upgraded from fc6 to fc7, and from fc7 to fc8. But is not working when I upgraded to fc9.

solution:
yum install imsettings-xfce


General scim setup help, check out http://runab.livejournal.com/9375.html

Yum Slow or timeout?

Install yum-fastestmirror.noarch which sorts each repository's mirrorlist by connection speed:
 yum install yum-fastestmirror.noarch

Fedora 9: Upgrade with PreUpgrade

I have had two Linux machines running Fedora 8 for a while now. I decided to upgrade them to Fedora 9 so I can get firefox 3. In the past, I did this with yum. After I read a couple of articles on PreUpgrade, I wanted to give it a try.

I followed the instruction on Upgrade Your Desktop From Fedora 8 To Fedora 9 With PreUpgrade, everything went well until after the reboot. It failed to start X server. Yum also fails with error message about loading libnss3.so (cannot open shared object file: No such file or directory), I could not find this library in /lib.

After a couple of hours trying different things, I fixed it with the following procedure.
  1. Download Fedora 9 distribution disk (Fedora 8 would not work).
  2. Boot with Fedora 9 distribution disk to rescue mode (choose to enable network for yum upgrade, but you can always do this later).
  3. Do the following after you get to the shell prompt:

cp /lib/* /mnt/sysimage/lib/
chroot /mnt/sysimage
yum -y update
reboot


Everything worked fine afterwards.