LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-27-2010, 08:42 AM   #1
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Rep: Reputation: 0
Xubuntu Programs Randomly Closing


Hi all,

I'm running Xubuntu 10.10 via USB on a Dell Latitude D505.
Wireless card is a Netgear WPN111 and I'm using ndiswrapper to make it work.

My problem is this:
when I open any web browser and try to navigate to a page, the whole system freezes for a few min before crashing to desktop.
Using Task Manager during this time reveals that processor usage jumps to 100% and stays there until the program closes.

I've tried Xubuntu on another, faster machine and it was fine.
From this I conclude that it's related to the hardware, and I think it may be some hardware protection feature operating.

Is there anything I can do to sort it?

Specs:
Dell Latitude D505
256MB RAM
Integrated Graphics
Intel Celeron M 1.4GHz
 
Old 11-27-2010, 08:58 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
The Netgear WPN111 has an Atheros AR2414 chip set so you shouldn't need to use ndiswrapper to make it work.

http://www.wireless-driver.com/downl...nd-Chipset.htm

http://sourceforge.net/projects/madwifi/

Nevertheless that may not be the cause of your problem. It probably wouldn't hurt to use the native Linux code.

Your actual symptoms make me wonder if you are having a RAM swapping issue. How much RAM do you have and how big is your swap partition?

Does the problem happen only on certain web sites?

If yes do those web sites download large amounts of data such as video streaming?

Last edited by stress_junkie; 11-27-2010 at 09:01 AM.
 
Old 11-27-2010, 11:29 AM   #3
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
I'll give madwifi a go, hopefully it'll be slightly easier to setup than ndiswrapper etc

It's got 256MB RAM. As for the swap partition, I'm not sure?

Thanks for the advice so far...


EDIT: Just had a proper look on the madwifi website, it says it doesn't support USB wireless cards like the WPN111...thoughts?

Last edited by mbonwick; 11-27-2010 at 11:32 AM.
 
Old 11-27-2010, 12:50 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by mbonwick View Post
It's got 256MB RAM. As for the swap partition, I'm not sure?
You can see the swap space size by issuing the following command in a terminal window.
Code:
cat /proc/swaps
That will show you the location and size of the active swap files. The size is in kilobytes so multiply the size by 1024 to see the size in bytes. Here is mine.
Code:
$ cat /proc/swaps
Filename				Type		Size	Used	Priority
/dev/sda3                               partition	3903784	0	-1
I have a 4 GB swap partition (roughly). The /proc/swaps file says that my swap partition is 3903784 kilobytes so I multiply 3903784 by 1024 to see that my swap partition is 3,997,474,816 bytes.

Quote:
Originally Posted by mbonwick View Post
EDIT: Just had a proper look on the madwifi website, it says it doesn't support USB wireless cards like the WPN111...thoughts?
I'm sorry about that misdirection. I will investigate more. Unfortunately I don't have a WPN111 to use for testing information that I find.

Last edited by stress_junkie; 11-27-2010 at 01:01 PM.
 
Old 11-27-2010, 01:04 PM   #5
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
It seems it doesn't have a swap file;

Code:
ubuntu@ubuntu:~$ cat /proc/swaps
Filename				Type		Size	Used	Priority
ubuntu@ubuntu:~$
I guess I should create one, but how?
 
Old 11-27-2010, 01:28 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
The more I look for device support for your wireless NIC the more I find people using ndiswrapper. Here is the happiest post I've seen on the subject.
http://www.linuxquestions.org/questi...4/#post2907116

Coincidentally happens to be located here on LQ. I looked on other web sites via Google. Most of the things that I read suggested that people were frustrated.

Since you've already got it working then disregard all of the above.


Quote:
Originally Posted by mbonwick View Post
It seems it doesn't have a swap file;

Code:
ubuntu@ubuntu:~$ cat /proc/swaps
Filename				Type		Size	Used	Priority
ubuntu@ubuntu:~$
I guess I should create one, but how?
Yes it does seem that you are missing a swap partition. That is the key. The swap area is usually in a partition on the disk.

We should see if you have any spare space on the disk that is not already allocated to a partition. I like to use cfdisk because it shows you everything in an easy to read format.

Open a terminal window and enter the following command.
Code:
sudo cfdisk /dev/sda
That command presumes that you have only one disk drive in the computer. (/dev/sda)

The cfdisk display will show if you have any space that is not already allocated.

Do that and report back please.

Last edited by stress_junkie; 11-27-2010 at 01:40 PM.
 
Old 11-27-2010, 01:50 PM   #7
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Ran cfdisk, results below. sda is the main windows hard drive on this laptop, so I used sdb which is the flashdrive in question instead.

Code:
 cfdisk (util-linux-ng 2.17.2)

                              Disk Drive: /dev/sdb
                        Size: 16173236224 bytes, 16.1 GB
              Heads: 64   Sectors per Track: 32   Cylinders: 15424

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sdb1        Boot        Primary   W95 FAT32 (LBA)                  16173.24
Thanks,
 
Old 11-27-2010, 01:53 PM   #8
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by mbonwick View Post
Ran cfdisk, results below. sda is the main windows hard drive on this laptop, so I used sdb which is the flashdrive in question instead.
I'm guessing that Xubuntu is installed on /dev/sda along with Windows. This is the drive that interests us. We probably don't want to use a flash drive for swap space.

Give it another try showing /dev/sda.
 
Old 11-27-2010, 01:57 PM   #9
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
No, Xubuntu is installed on the flashdrive. Sorry, should have made that clear.

Don't think that affects creating a swap file/partition?
 
Old 11-27-2010, 02:05 PM   #10
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
That's okay. Since Xubuntu is installed on the flash drive then the flash drive is a good place to put the swap partition.

Now the question is how to do it. I don't know if Xubuntu has gparted installed and I don't know if gparted will resize a mounted partition.

Ideally we want to boot a live Linux CD and shrink the existing partition on the flash drive, then create a new partition that will be used for swap space, then tell Xubuntu to use that swap space automatically when it starts.

Did you install Xubuntu from a live CD? If you did then boot that, open a terminal window, and see if it has gparted by opening a terminal window and entering the following command.
Code:
which gparted
 
Old 11-27-2010, 02:12 PM   #11
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
I created the Xubuntu flashdrive with the USB Installer from pendrivelinux.com

I think the best course of action is to format and repartition the flash drive; ie. start afresh.

Am I right in thinking leaving 1GB of unallocated space (in windows), and then running gparted is the best course of action?
 
Old 11-27-2010, 02:15 PM   #12
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Yes that is a good choice. I recommend leaving 2 GB for swap space.
 
Old 11-27-2010, 02:36 PM   #13
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Ah, slight problem;

It's not possible to put more than one partiton on a USB flash drive. I guess I'm going to have to go for a swap file rather than partition.

Unless there's a way round this?
 
Old 11-27-2010, 02:50 PM   #14
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
We can make a swap file in the root directory of the Xubuntu file system. I've never made a swap file but I have manually configured a swap partition. It should be very similar.

Here are the steps:
1- create a 2 GB file in the root directory
2- mount that file as a loop device
3- format it
4- put a line in /etc/fstab to automatically mount the page file and activate swapping

Here are the commands:
1- create the 2 GB file in the root directory
Code:
sudo dd if=/dev/zero of=/swapfile bs=2048 count=1M conv=notrunc,noerror
2- mount that file as a loop device
Code:
losetup /dev/loop0 /swapfile
3- format it
Code:
mkswap /dev/loop0
4- put a line in /etc/fstab to automatically mount the swap file during system startup
Okay. Let's make a backup of the /etc/fstab file before we do anything.
Code:
sudo cp -v /etc/fstab /etc/fstab.original
Now we will add the line.
Code:
sudo echo "/swapfile	none	swap	sw    0   0" >> /etc/fstab
I have tested this. It works.

Restart Xubuntu, then cat /proc/swaps to see if the swap file is activated.

Last edited by stress_junkie; 11-27-2010 at 03:32 PM.
 
Old 11-27-2010, 03:33 PM   #15
mbonwick
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie View Post
2- mount that file as a loop device
Code:
losetup /dev/loop0 /swapfile
I sucessfully created the file, but when I come to mount it as above, terminal returns;
Code:
ubuntu@ubuntu:~$ sudo losetup /dev/loop0 /swapfile
losetup: /dev/loop0: device is busy
What am I doing wrong?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programs randomly closing jonohull Linux - General 1 08-29-2009 11:30 AM
Programs closing on their own bcjohnson Linux - Software 4 02-04-2009 11:25 AM
Closing programs with console john7343 Linux - Software 3 02-22-2006 05:15 PM
Restart X without closing programs 4of11 Linux - Software 1 08-17-2004 02:48 PM
Linux ports randomly closing? eric_marsh Linux - Software 1 07-11-2004 10:33 AM


All times are GMT -5. The time now is 04:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration