Posted: . At: 9:22 AM. This was 2 years ago. Post ID: 15628
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Run the LarsWM window manager with this very useful .xsession file.


The stock Intel cooler that comes with a Core i3 530 CPU is much easier to install than the previous incarnations of cooling mountings like the one that I had on my old Celeron 2.4GHZ motherboard. That was extremely difficult to remove compared to the i3 cooler, things are getting easier and easier to install, although something like a Pentium CPU would not need too big a cooler and a 486 would hardly need much cooling at all. The future of CPU’s was predicted to require huge coolers as the temperature would approach the melting point of metal, but now we have relatively cool running i3 CPU’s that require only a stock cooler to run comfortably. The future, therefore, is with adding multiple cores and making the CPU run as efficiently as possible. I would love to run a Xeon CPU with eight cores, but a 4 core i3 is just fine. With the CPU Frequency Scaling support in the latest Linux Kernels you can run the CPU at 1.20GHZ and have it scale up to 2.93GHZ if needed. That is what I have configured in my 2.6.38-rc2 kernel, in the CPU Frequency Scaling section, you just enable the section shown below.

CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

Like this.

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
 
#
# CPUFreq processor drivers
#
CONFIG_X86_PCC_CPUFREQ=m
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_POWERNOW_K8=m
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
CONFIG_X86_P4_CLOCKMOD=m
 
#
# shared options
#
CONFIG_X86_SPEEDSTEP_LIB=m
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_INTEL_IDLE=y

This is good for saving a very small amount of power and still having some on reserve when you need it. The 2.6.38-rc2-12 kernel is performing very well indeed for a mainline kernel, it is very fast and smooth and I have had no problems with it at all. This is the best version of the kernel yet and my 64bit OpenSuse Linux system is faster and better than the Ubuntu systems I have used before, and more reliable too. I think I may have posted this before, but this is a little program I am working on that writes a text string to a file. I have got it to work perfectly and it compiles without errors using gcc -Wall.

testing.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/
 
/********************************************************************
* Description:
* Author:  <shoggoth>
* Created at: Wed Jan 19 13:06:21 EST 2011
* Computer: myhost
* System: Linux 2.6.33-ARCH on x86_64
*
* Copyright (c) 2011   All rights reserved.
*
********************************************************************/
 
#include <stdio.h>
#include <time.h>
 
#define format "At this time: %H:%M:%S"
#define text "OP is a Troll."
 
int lineofstars (void) {
	int x = 0;
	while (x < 64) {
		printf("*");
		x++;
		if (x == 31) {
			printf("<|>");
		} else if (x == 64) {
			printf("\n-\n");
		}
	}
	return 0;
}
 
int main (int argc, char** argv) {
 
	lineofstars();
 
	char *File;
	char String[60];
	struct tm *ptr;
	time_t tm;
	char length[60];
 
	tm = time(NULL);
	ptr = localtime(&tm);
	strftime(length, 100, format, ptr);
 
	File = "log.txt";
	snprintf(String, 100, "%s, %s\n", length, text);
 
	FILE *f;
	f = fopen (File, "a+");
 
	if (!f) {
		printf("Sorry, I cannot open the file %s.\n", File);
		return 0;
	}
 
	fprintf(f, String);
 
	fflush(stdout);
	fclose(f);
 
	return 0;
}

And this is the ~/.xsession file I am currently using when I want a minimal desktop. Larswm is the fastest desktop available for Linux and very minimal.

#!/bin/sh
 
#
# Copyright (c) 2004 Lars Bernhardsson, see README for licence details
#
# sample.xsession - Login script for larswm
#
 
# Clear root window settings and set background color
xsetroot && xsetroot -solid DarkSlateGrey
 
# 2nd screen
# xsetroot -display :0.1 && xsetroot -display :0.1 -solid lightgray
 
# Start a couple of tools
xload -geometry 96x48-0-0 &
xbiff -geometry 48x48-100-0 &
oclock -geometry 48x48-152-0 &
 
# Start a background job that feeds date/time to larswm
larsclock &
 
# Start wm.
exec larswm

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.