-
"unloadagp" needs to be used several times
Hello! Sorry for my poor English;)
"Unloading unneeded AGP modules..." works not correctly on my machine. Function "unloadagp" is included in /etc/init.d/xsession. In order to completely cleaning kernel from unneeded modules I need to run it several times.
It is conclusion from an experiment presented below:
$ lsmod|grep agp intel_agp 27420 0
amd64_agp 16772 0
sis_agp 12676 0
amd_k7_agp 12812 0
ali_agp 11136 0
via_agp 13952 1
agpgart 36044 7 intel_agp,amd64_agp,sis_agp,amd_k7_agp,ali_agp,drm ,via_agp
I copied "while" loop from "unloadagp" and executed it as root.
$ su
# while read m relax; do
> case "$m" in *_agp) rmmod "$m" >/dev/null 2>&1; ;; esac
> done </proc/modules
# lsmod|grep agp
amd64_agp 16772 0
amd_k7_agp 12812 0
via_agp 13952 1
agpgart 36044 4 amd64_agp,amd_k7_agp,drm,via_agp
# while read m relax; do case "$m" in *_agp) rmmod "$m" >/dev/null 2>&1; ;; esac; done </proc/modules
# lsmod|grep agp
amd_k7_agp 12812 0
via_agp 13952 1
agpgart 36044 3 amd_k7_agp,drm,via_agp
# while read m relax; do case "$m" in *_agp) rmmod "$m" >/dev/null 2>&1; ;; esac; done </proc/modules
# lsmod|grep agp
via_agp 13952 1
agpgart 36044 2 drm,via_agp
Now it's OK, there is only AGP drivers for my chipset. Next running loop does nothing.
# while read m relax; do case "$m" in *_agp) rmmod "$m" >/dev/null 2>&1; ;; esac; done </proc/modules
# lsmod|grep agp
via_agp 13952 1
agpgart 36044 2 drm,via_agp
# lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8235 PCI Bridge
00:06.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 0a)
00:06.1 Input device controller: Creative Labs SB Live! Game Port (rev 0a)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon RV250 If [Radeon 9000] (rev 01)
01:00.1 Display controller: ATI Technologies Inc Radeon RV250 [Radeon 9000] (Secondary) (rev 01)
# find /lib/modules/2.6.19/|grep agp
/lib/modules/2.6.19/kernel/drivers/char/agp
/lib/modules/2.6.19/kernel/drivers/char/agp/agpgart.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/ali-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/amd-k7-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/amd64-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/ati-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/efficeon-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/intel-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/nvidia-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/sis-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/sworks-agp.ko
/lib/modules/2.6.19/kernel/drivers/char/agp/via-agp.ko
BTW, I discovered "pcimodules".
-
Hi arctgx,
I also get into this today! While trying to optimize memory usage of my Knoppix 5.0.1, I realized that unloadagp() function in /etc/init.d/xsession was not doing the job well.
I suspect this is due to on-the-fly modification of /proc/modules while it is being scanned by the loop. In fact, while reading it you are running rmmod which in turn will affect the pseudo-file content.
I had no time to deeply review how read and bash redirection works in this case (is any guru out there with required wisdom?) but I think the file is not opened and closed at each iteration of the while loop causing the function to misbehave. To confirm this I made a copy of /proc/modules's content and run unloadagp() on it and, not surprisingly, what I got was the correct behaviour, with any unneeded _agp module behing removed from kernel.
I did't even have time to check if this has been fixed in new releases. I'll check and maybe post a bug report if appropriate.
Regards,
Andrea
-
After some more googling I found it was already reported here for 4.0.2 with a reasonable fix.
http://www.knoppix.net/wiki/Bugs/4.0.2CD #22
Andrea
-
Hello! Script modified by chris_startx works on my 5.1.0!
In /cdrom/knoppix.sh I added command
patch /etc/init.d/xsession.sh /usr/local/share/arctgx/unneeded_agp.patch
where unneeded_agp.patch is earlier extracted also by knoppix.sh from my arctgx.tbz (for myconfig=/dev/cdrom in kernel commandline) and consists of following lines:
96c96,98
< done </proc/modules
---
> done <<EOT
> $(lsmod | grep _agp)
> EOT
It is output of diff between original and changed (by chris_startx) xsession (for Knoppix 5.1.0) script.
Great thanks!
arctgx
Similar Threads
-
By oman in forum General Support
Replies: 0
Last Post: 08-03-2004, 06:44 PM
-
By Pokec in forum General Support
Replies: 2
Last Post: 12-07-2003, 07:39 PM
-
By oreo in forum General Support
Replies: 11
Last Post: 07-23-2003, 06:33 PM
-
By geebee2000 in forum Hardware & Booting
Replies: 9
Last Post: 05-21-2003, 07:29 PM
-
By Juny in forum General Support
Replies: 4
Last Post: 03-14-2003, 09:02 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

IBM System X3850-X5 Server w/4x Intel Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD
$1599.99

IBM 9307-RC4 42U 19in Freestanding Server Rack Cabinet 1000 lb Capacity
$100.00

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM
$179.99

IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU
$225.00

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES
$111.70

IBM X3650 M5 5462-AC1,2 X E5-2640V3 2.6GHZ 8C, 16 GB, DUAL 750W, 2 X 1TB SERVER
$349.99

IBM Power 720 8202-E4B Server - POWER7 4-Core 3GHz, 8GB, 2x 146GB HDD, 1725W PSU
$450.00

IBM x3550 M4 1x 3.50GHz Quad Core Xeon E5-2637v2 32GB RAM 8-Bay No HDDs - READ
$20.00

IBM System X3650 M3 Server Xeon E5620 2.4 GHz 16 GB Ram Raid M5015 No OS No HDD
$109.95

IBM X3650 M4 Server System Board 00MX553 00AM209 00Y8499 00Y8457 00D2888 00W2671
$230.00