Results 1 to 4 of 4

Thread: "unloadagp" needs to be used several times

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Location
    Poland
    Posts
    2

    "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".

  2. #2
    Junior Member
    Join Date
    Oct 2006
    Posts
    5
    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

  3. #3
    Junior Member
    Join Date
    Oct 2006
    Posts
    5
    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

  4. #4
    Junior Member
    Join Date
    Feb 2007
    Location
    Poland
    Posts
    2
    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

  1. USR 56k PCI modem "busy"/"not found",rec
    By oman in forum General Support
    Replies: 0
    Last Post: 08-03-2004, 06:44 PM
  2. "modprobe ppa" before "home=scan" ??
    By Pokec in forum General Support
    Replies: 2
    Last Post: 12-07-2003, 07:39 PM
  3. "Connection Reset by Peer" or "hang"
    By oreo in forum General Support
    Replies: 11
    Last Post: 07-23-2003, 06:33 PM
  4. "Foreign" drive formats and "dd" command
    By geebee2000 in forum Hardware & Booting
    Replies: 9
    Last Post: 05-21-2003, 07:29 PM
  5. Locate Knoppix "group" in "K" menu
    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
  •  


Juniper EX2300-C 12 Port Compact Gigabit Switch EX2300-C-12p Discounted Cosmetic picture

Juniper EX2300-C 12 Port Compact Gigabit Switch EX2300-C-12p Discounted Cosmetic

$71.87



Juniper EX2300 12-Port Gigabit PoE+ Managed Network Switch P/N: EX2300-C-12P picture

Juniper EX2300 12-Port Gigabit PoE+ Managed Network Switch P/N: EX2300-C-12P

$149.99



Juniper Network QFX5100-48S-AFO 48x SFP/SFP+ 6x 40GbE QSFP+ Switch w/ Dual power picture

Juniper Network QFX5100-48S-AFO 48x SFP/SFP+ 6x 40GbE QSFP+ Switch w/ Dual power

$253.30



Juniper EX3400-24P 24-Port PoE+ GbE + 4-Port 1/10Gb SFP Switch picture

Juniper EX3400-24P 24-Port PoE+ GbE + 4-Port 1/10Gb SFP Switch

$245.00



Juniper EX4100-F-12P Switch 12x 1GbE PoE  2x 10GbE Uplinks 4x 10GbE Stack Ports picture

Juniper EX4100-F-12P Switch 12x 1GbE PoE 2x 10GbE Uplinks 4x 10GbE Stack Ports

$900.00



Juniper EX2300-C-12P 12 Port Gigabit PoE+ 2x10G SFP+ Managed Compact  Switch picture

Juniper EX2300-C-12P 12 Port Gigabit PoE+ 2x10G SFP+ Managed Compact Switch

$179.99



Juniper EX2300-C 12 Port Compact Gigabit Switch EX2300-C-12p picture

Juniper EX2300-C 12 Port Compact Gigabit Switch EX2300-C-12p

$89.99



NEW JUNIPER QFX5120-48Y-AFO-T 48x 10/25GbE SFP28 8x 40/100GbE Switch Dual AC PS picture

NEW JUNIPER QFX5120-48Y-AFO-T 48x 10/25GbE SFP28 8x 40/100GbE Switch Dual AC PS

$12750.00



Juniper Networks EX2300-48P 48-Port Gigabit PoE Managed Ethernet Switch picture

Juniper Networks EX2300-48P 48-Port Gigabit PoE Managed Ethernet Switch

$79.99



Juniper EX Series EX2300-C-12P - switch - 12 ports - managed picture

Juniper EX Series EX2300-C-12P - switch - 12 ports - managed

$311.95