Results 1 to 4 of 4

Thread: "unloadagp" needs to be used several times

  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
  •  


[ Lot of 9 ] Intel i5-9500T SRF4D 2.20 GHZ PROCESSOR picture

[ Lot of 9 ] Intel i5-9500T SRF4D 2.20 GHZ PROCESSOR

$697.45



AMD Ryzen 9 5950X 16-core 32-thread Desktop Processor picture

AMD Ryzen 9 5950X 16-core 32-thread Desktop Processor

$319.99



Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc... picture

Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc...

$419.99



Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc... picture

Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc...

$619.99



Intel Xeon E5-2697A V4 2.6GHz CPU Processor 16-Core Socket LGA2011 SR2K1 picture

Intel Xeon E5-2697A V4 2.6GHz CPU Processor 16-Core Socket LGA2011 SR2K1

$39.99



Intel Core i7-13700K Processor (5.4 GHz, 16 Cores, LGA 1700) Tray -... picture

Intel Core i7-13700K Processor (5.4 GHz, 16 Cores, LGA 1700) Tray -...

$135.00



Intel Xeon E5-2680 v4 SR1N7 2.4GHz 14-Core 3.5MB 35MB Socket 2011-3 Server CPU picture

Intel Xeon E5-2680 v4 SR1N7 2.4GHz 14-Core 3.5MB 35MB Socket 2011-3 Server CPU

$11.99



Intel Core i5-8500 SR3XE 3.0GHz 6 Core LGA1151 9MB Processor CPU Tested picture

Intel Core i5-8500 SR3XE 3.0GHz 6 Core LGA1151 9MB Processor CPU Tested

$47.00



Intel Core i7-3770 3.40GHz 8MB Quad Core Socket LGA1155 CPU Processor SR0PK picture

Intel Core i7-3770 3.40GHz 8MB Quad Core Socket LGA1155 CPU Processor SR0PK

$35.00



Intel 16 Core i7-13700T DESKTOP processor TURBO Boost 4.90Ghz CM8071504820903 picture

Intel 16 Core i7-13700T DESKTOP processor TURBO Boost 4.90Ghz CM8071504820903

$269.00