View Full Version : Computer Freezes
Aries202
07-24-2011, 08:16 PM
My pc freezes as soon as I try to enter the game during the character selection screen. When it loads, 25% through it my whole pc freezes and I have to manually turn it off. Happened for the first time today.
-Kalid-
07-24-2011, 08:29 PM
/me casts winter stroke on Aries PC
Aries202
07-24-2011, 09:20 PM
That's why that skill is overpowered! :rale:
Cuchulainn
07-24-2011, 09:22 PM
If your swap is turned off, turn it on. With 2 GB RAM or even less the RO client crashs sometimes pretty bad without swap.
Aries202
07-24-2011, 09:27 PM
Swap?:confused:
Cuchulainn
07-24-2011, 09:34 PM
It makes much sense to use a swap partition under linux. Use any partition tool and check if you have one. You could use the program gparted to check if the swap partition exists and if it is turned on.
If the swap partition is included in the /etc/fstab file, it will be mounted automatically after every reboot.
Aries202
07-24-2011, 09:47 PM
I have no idea what you're talking about, but I am researching it now. Trying to "turn on the swap". Feel free to keep explaining though.
Cuchulainn
07-24-2011, 09:53 PM
just find out if you have a swap partition. If you have one you can turn it on with the command:
swapon /dev/sdaX as root or with sudo in which sdaX has to be the correct partition.
to check if you use a swap:
swapon -s
Aries202
07-24-2011, 10:36 PM
Doesn't seem like I do have one.
Cuchulainn
07-24-2011, 11:08 PM
Then create one :D
Use any partition utility. If you have to decrease any partition, save your important data of this partition on a different storage media first or at least on a different partition than the one you resize (but usually it is rather safe to decrease a partition size, if there is enough space left). Or you could also use a USB flash drive for swap (if you have more than you need). About 2 GB swap capacity should be enough, maybe even 1 GB.
Did you choose a manual partition setup during installation or was your configuration for partitions set automatically? I'm wondering why you don't have a swap partition.
Aries202
07-25-2011, 01:14 AM
Okay, I lied I do have partitions installed. From what I see I have three partitions, with more then enough space. I still don't understand how this can cause an issue in my pc freezing while trying to load Regnum.
Cuchulainn
07-25-2011, 08:27 AM
is any of this three types a swap partition? You can check it with the command
fdisk /dev/sda or possibly hda instead of sda.
To list the partition table enter p. If you have a swap, it should say "Linux Swap / Solaris" at one partition. To quit enter q. You can also use any other partition utilities you like. Or take a look to the file /etc/fstab. If your system uses a swap, it should be listed in this file.
Regnum Online needs a lot of RAM. If you have 2 or less GB, it will happen more often that your computer freezes when you play or load Regnum, if you don't have a swap.
My system has 2 GB RAM and I experienced the same system crashs without swap, if I have also applications like Regnum+web browser+feedreader+gmplayer etc open.
Did someone else install your Linux or did you install it yourself?
Aries202
07-25-2011, 04:27 PM
Okay, I did what you asked, and yes I do have a partition called "Linux Swap / Solaris"
I also installed linux by myself.
Cuchulainn
07-25-2011, 04:41 PM
ok nice. You can check if it's turned on with the command "swapon -s". It should be listed.
Aries202
07-25-2011, 04:56 PM
When I do such command it comes out blanked, don't think it is on...
Cuchulainn
07-25-2011, 06:48 PM
ok then edit the /etc/fstab file of your linux.
Add a line like this:
/dev/sda3 swap swap defaults 0 0
In the above example sda3 is the swap. In your case it's maybe different. Just look again to the partition table via fdisk if you don't know the right device path. Afterwards reboot and the swap should be on. You can also turn it on with "swapon /dev/sda3", but after reboot it will be off again if it was not added to the fstab file.
Oh and if you enter a wrong path in fstab, it's possible that your linux will not boot correctly. But if you have a Linux live CD or another linux on your computer you can easily correct the line afterwards.
hawk0xad9
07-25-2011, 06:52 PM
You can also run this in a terminal to see if your swap is on:
free -m
It'll produce an output like this:
total used free shared buffers cached
Mem: 7981 1660 6321 0 78 559
-/+ buffers/cache: 1022 6959
Swap: 2047 0 2047
If your swap is loaded, you should see a number other than 0 in the total column on the swap row.
EDIT: Just realized 'swapon -s' achieves the same purpose, ah well.
Aries202
07-25-2011, 07:04 PM
You can also run this in a terminal to see if your swap is on:
free -m
It'll produce an output like this:
total used free shared buffers cached
Mem: 7981 1660 6321 0 78 559
-/+ buffers/cache: 1022 6959
Swap: 2047 0 2047
If your swap is loaded, you should see a number other than 0 in the total column on the swap row.
EDIT: Just realized 'swapon -s' achieves the same purpose, ah well.
When I enter the command, the total is 0.
I wasn't able to edit the fsab file, or I'm approaching it the wrong way.
PS: I am not sure how to post my terminal log, I think it'll make it easier if you can see what I am seeing.
Cuchulainn
07-25-2011, 08:17 PM
you have to edit your fstab file as root. It could be that it is called fstab.conf in some distros.
to open it from terminal you can enter:
nano /etc/fstab
mousepad /etc/fstab
gedit /etc/fstab
as root. So either put "sudo " (Ubuntu/Debian default way) preceding to it or use "su -".
Depending on which texteditors you have installed. To close the nano editor press ctrl+x
instead you can also use this command in terminal:
sudo echo '/dev/sda3 swap swap defaults 0 0' >> /etc/fstab
Aries202
07-25-2011, 08:36 PM
How do I know which swap to turn on? I edited it, but I strongly believe I have no idea what I'm doing... Simplier if someone showed me step by step, or if someone did it for me.
Cuchulainn
07-25-2011, 09:01 PM
to know more about the fstab configuration file you can read here (https://wiki.archlinux.org/index.php/Fstab) (the Arch Linux wiki is pretty interesting for such things).
instead of /dev/sda3 you can also put in the UUID number of the swap partition. You can find out the UUID number of your swap with "blkid" command. But don't ask me if this has advantages.
with the blkid command you can see the path of the device, the UUID and the partition type e.g. swap.
hawk0xad9
07-25-2011, 09:32 PM
K, let's move back a bit. First, start with this (you'll need to use sudo or su for the examples that have root@laptop):
[root@laptop:~]# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d4297
Device Boot Start End Blocks Id System
/dev/sda1 63 157292414 78646176 5 Extended
/dev/sda2 * 157292415 576717434 209712510 7 HPFS/NTFS/exFAT
/dev/sda3 576717435 976768064 200025315 7 HPFS/NTFS/exFAT
/dev/sda5 126 115346699 57673287 83 Linux
/dev/sda6 115346763 153099449 18876343+ 83 Linux
/dev/sda7 153099513 157292414 2096451 82 Linux swap / Solaris
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00062463
Device Boot Start End Blocks Id System
/dev/sdb1 63 734009849 367004893+ 5 Extended
/dev/sdb2 734009850 976768064 121379107+ 7 HPFS/NTFS/exFAT
/dev/sdb5 126 734009849 367004862 83 Linux
Here you can see a bunch of partitions. The one we want is the one that is Linux swap / Solaris, indicated in red. Make a note of what device it is (/dev/sda7 in this example), and run this:
[root@laptop:~]# swapon -v /dev/sda7
swapon on /dev/sda7
swapon: /dev/sda7: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/sda7: pagesize=4096, swapsize=2146762752, devsize=2146765824
Output should be similar (the -v argument gives a more verbose output). It looks like it turned the swap on successfully, let's check to be sure (these don't need su/sudo permissions):
[user@laptop:~]$ swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 2096444 0 -1
[user@laptop:~]$ free -m
total used free shared buffers cached
Mem: 7981 1853 6128 0 98 596
-/+ buffers/cache: 1158 6823
Swap: 2047 0 2047
If something like this shows up, your swap was turned on successfully. Let's at least try to get this working first before we handle /etc/fstab.
EDIT: *One other thing... if you don't actually have a swap partition, let me know. It would probably be easier to make a swap file in that scenario.
Aries202
07-25-2011, 09:46 PM
total used free shared buffers cached
Mem: 748 608 139 0 15 176
-/+ buffers/cache: 416 331
Swap: 0 0 0
This is what happens when I do the "free -m" command, doesn't seem like I have one placed.
PS: I don't know how to post the log from the terminal.
hawk0xad9
07-25-2011, 09:50 PM
PS: I don't know how to post the log from the terminal.
Select and press Ctrl+Shift+C (this won't work on xterm though if you use that).
EDIT: Also, could you say what distro and desktop environment you use? That way I can give you advice that could be more specific to it.
Aries202
07-25-2011, 10:09 PM
Not sure how to tell, but Gmone Kernel Linux.... hope that's what you're looking for.
Tigerious
07-25-2011, 10:28 PM
What are you trying to do, it is regnum online game forum, not Linux users one.
Everyone that using Linux must know what is a swap...
Sorry to be rude but there is enough documentation on internet about it.
Aries202
07-25-2011, 10:35 PM
Too bad this is the Technical Support Linux section. By the way, I'm still new to Linux, but I guess that could never be a factor.. being new to something. I am having a problem that doesn't allow me to run Regnum, so I think it is suitable to ask here.
hawk0xad9
07-25-2011, 10:39 PM
Could you post the output of the commands I posted before (print screens are fine if you can't copy+paste)?
HidraA
07-25-2011, 10:42 PM
What are you trying to do, it is regnum online game forum, not Linux users one.
Everyone that using Linux must know what is a swap...
Sorry to be rude but there is enough documentation on internet about it.
Tigerr...this support section.....so he can ask what he want.If ppl there are ppl that can help no problem with this.
Anyway i had compputer freez but was not related to swap partition.
Try to run from terminal the game...when cpu look like he is frozen press ctrl+alt+F1 or F2Tel me if switch TTY or he stay frozen.
If he switch then your are able to login send command killall to rolauncher.
Aries202
07-25-2011, 10:54 PM
Could you post the output of the commands I posted before (print screens are fine if you can't copy+paste)?
I used a link to help me out http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ Great news is, I set it up, but I can't save it in the fstab file.
Game worked successfully, but I still need to save it, so it's stacked there everytime I log on. It gives me an error when I try the website's command.
HidraA
07-25-2011, 11:04 PM
I used a link to help me out http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ Great news is, I set it up, but I can't save it in the fstab file. Going to try if I can run the game now.
Copy your fstap somewhere else.
cp /etc/fstab /home/$USER/Desktop
Now give rights to wfite to copyed file
cd /home/$USER/Desktop
chmod 777 fstab
Edit your fstab and save.
After copy saved file and replace old one.
[code]cp fstab /etc
hawk0xad9
07-25-2011, 11:22 PM
I used a link to help me out http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ Great news is, I set it up, but I can't save it in the fstab file.
Game worked successfully, but I still need to save it, so it's stacked there everytime I log on. It gives me an error when I try the website's command.
Good to hear. They have you using vi, which is pretty hard to use if you don't know how to use it. Try this instead (need root permissions like before):
cp /etc/fstab /etc/fstab~
echo "/swapfile1 swap swap defaults 0 0" >> /etc/fstab
The first line simply creates a backup of your existing fstab.
Tigerious
07-25-2011, 11:43 PM
Tigerr...this support section.....so he can ask what he want.If ppl there are ppl that can help no problem with this.
Anyway i had compputer freez but was not related to swap partition.
Try to run from terminal the game...when cpu look like he is frozen press ctrl+alt+F1 or F2Tel me if switch TTY or he stay frozen.
If he switch then your are able to login send command killall to rolauncher.
Well I can help a bit there, I doubt it is related to swap partition, it is used only when needed and when you are out of memory (RAM) this way it act like a virtual memory by using free hard drive space.
I suggest to him to install "strace" and post us the output of it (better use pastebin because stream will be huge).
/me points in a missing library or network related troubles
Aries202
07-25-2011, 11:57 PM
It keeps giving me "permission denied".
hawk0xad9
07-26-2011, 12:02 AM
It keeps giving me "permission denied".
Make sure to use 'sudo' in front of those commands.
Aries202
07-26-2011, 12:36 AM
I am, don't understand why though it's giving me the error.
hawk0xad9
07-26-2011, 01:09 AM
Made a mistake, my bad. Try this instead:
echo "/swapfile1 swap swap defaults 0 0" | sudo tee -a /etc/fstab > /dev/null
Carahs
07-26-2011, 01:10 AM
O:
asdfghjk
Aries202
07-26-2011, 01:13 AM
Okay, I did that, but what exactly was that supposed to do? Entered it, typed my password and nothing happened.
hawk0xad9
07-26-2011, 01:26 AM
Okay, I did that, but what exactly was that supposed to do? Entered it, typed my password and nothing happened.
Just appends that line to your /etc/fstab file. (Example, you don't need to type these in)
$ echo "# test" | sudo tee -a /etc/fstab > /dev/null
Password:
$ tail /etc/fstab
/dev/sda5 / ext4 defaults 0 1
/dev/sda6 /var reiserfs defaults 0 1
/dev/sda7 swap swap defaults 0 0
/dev/sdb5 /home ext4 defaults 0 1
/dev/sda2 /media/Win7 ntfs ro,user,noauto,noexec 0 0
/dev/sda3 /media/Data1 ntfs user 0 0
/dev/sdb2 /media/Data2 ntfs user 0 0
# test
You can test to see if what you typed in works by rebooting and seeing if your swap has been loaded automatically.
Aries202
07-26-2011, 01:34 AM
Thank you sir, it worked. It's saved in my system. Question, Should I add more? You have multiple ones, compared to me it just lists one.
hawk0xad9
07-26-2011, 03:25 AM
Thank you sir, it worked. It's saved in my system. Question, Should I add more? You have multiple ones, compared to me it just lists one.
You shouldn't need to; my hard drives have multiple partitions (both for Linux and for Windows), so I have multiple entries to suit them. If your system boots up all good, you should be good to go. Glad I could help. :)
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.