Limitar processamento [RESOLVIDO]

1. Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 02/06/2014 - 23:26h

Basicamente o objetivo é limitar o processamento sobre um jogo específico para que ele não fique travando no meu computador que num é muito potente, aqui o programa:
http://www.spiralknights.com/play.xhtml

Tentei limitar a velocidade da internet para ver se isso resolvia, mas só fez atrazar e no final ficou travando de novo:
 trickle -u 2 -d 100 /home/denilson/spiral/spiral  


Achei agora um comando que pode ajudar, mas tem tanta coisa no man que é melhor perguntar se alguém já conseguiu usar direito ele:

Aqui o resultado do comando:
 man getrlimit  


Então, alguém sabe usar ele ai? Pode me dizer então como fazer?



GETRLIMIT(2) Linux Programmer's Manual GETRLIMIT(2)



NAME
getrlimit, setrlimit, prlimit - get/set resource limits

SYNOPSIS
#include <sys/time.h>
#include <sys/resource.h>

int getrlimit(int resource, struct rlimit *rlim);
int setrlimit(int resource, const struct rlimit *rlim);

int prlimit(pid_t pid, int resource, const struct rlimit *new_limit,
struct rlimit *old_limit);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

prlimit(): _GNU_SOURCE && _FILE_OFFSET_BITS == 64

DESCRIPTION
The getrlimit() and setrlimit() system calls get and set resource limits respectively. Each resource has an associated soft and hard limit, as
defined by the rlimit structure:

struct rlimit {
rlim_t rlim_cur; /* Soft limit */
rlim_t rlim_max; /* Hard limit (ceiling for rlim_cur) */
};

The soft limit is the value that the kernel enforces for the corresponding resource. The hard limit acts as a ceiling for the soft limit: an
unprivileged process may only set its soft limit to a value in the range from 0 up to the hard limit, and (irreversibly) lower its hard limit. A
privileged process (under Linux: one with the CAP_SYS_RESOURCE capability) may make arbitrary changes to either limit value.

The value RLIM_INFINITY denotes no limit on a resource (both in the structure returned by getrlimit() and in the structure passed to setrlimit()).

The resource argument must be one of:

RLIMIT_AS
The maximum size of the process's virtual memory (address space) in bytes. This limit affects calls to brk(2), mmap(2) and mremap(2), which
fail with the error ENOMEM upon exceeding this limit. Also automatic stack expansion will fail (and generate a SIGSEGV that kills the
process if no alternate stack has been made available via sigaltstack(2)). Since the value is a long, on machines with a 32-bit long either
this limit is at most 2 GiB, or this resource is unlimited.

RLIMIT_CORE
Maximum size of core file. When 0 no core dump files are created. When nonzero, larger dumps are truncated to this size.

RLIMIT_CPU
CPU time limit in seconds. When the process reaches the soft limit, it is sent a SIGXCPU signal. The default action for this signal is to
terminate the process. However, the signal can be caught, and the handler can return control to the main program. If the process continues
to consume CPU time, it will be sent SIGXCPU once per second until the hard limit is reached, at which time it is sent SIGKILL. (This lat&#8208;
ter point describes Linux behavior. Implementations vary in how they treat processes which continue to consume CPU time after reaching the
soft limit. Portable applications that need to catch this signal should perform an orderly termination upon first receipt of SIGXCPU.)

RLIMIT_DATA
The maximum size of the process's data segment (initialized data, uninitialized data, and heap). This limit affects calls to brk(2) and
sbrk(2), which fail with the error ENOMEM upon encountering the soft limit of this resource.

RLIMIT_FSIZE
The maximum size of files that the process may create. Attempts to extend a file beyond this limit result in delivery of a SIGXFSZ signal.
By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g.,
write(2), truncate(2)) fails with the error EFBIG.

RLIMIT_LOCKS (Early Linux 2.4 only)
A limit on the combined number of flock(2) locks and fcntl(2) leases that this process may establish.

RLIMIT_MEMLOCK
The maximum number of bytes of memory that may be locked into RAM. In effect this limit is rounded down to the nearest multiple of the sys&#8208;
tem page size. This limit affects mlock(2) and mlockall(2) and the mmap(2) MAP_LOCKED operation. Since Linux 2.6.9 it also affects the
shmctl(2) SHM_LOCK operation, where it sets a maximum on the total bytes in shared memory segments (see shmget(2)) that may be locked by the
real user ID of the calling process. The shmctl(2) SHM_LOCK locks are accounted for separately from the per-process memory locks estab&#8208;
lished by mlock(2), mlockall(2), and mmap(2) MAP_LOCKED; a process can lock bytes up to this limit in each of these two categories. In
Linux kernels before 2.6.9, this limit controlled the amount of memory that could be locked by a privileged process. Since Linux 2.6.9, no
limits are placed on the amount of memory that a privileged process may lock, and this limit instead governs the amount of memory that an
unprivileged process may lock.

RLIMIT_MSGQUEUE (Since Linux 2.6.8)
Specifies the limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process. This
limit is enforced for mq_open(3). Each message queue that the user creates counts (until it is removed) against this limit according to the
formula:

bytes = attr.mq_maxmsg * sizeof(struct msg_msg *) +
attr.mq_maxmsg * attr.mq_msgsize

where attr is the mq_attr structure specified as the fourth argument to mq_open(3).

The first addend in the formula, which includes sizeof(struct msg_msg *) (4 bytes on Linux/i386), ensures that the user cannot create an
unlimited number of zero-length messages (such messages nevertheless each consume some system memory for bookkeeping overhead).

RLIMIT_NICE (since Linux 2.6.12, but see BUGS below)
Specifies a ceiling to which the process's nice value can be raised using setpriority(2) or nice(2). The actual ceiling for the nice value
is calculated as 20 - rlim_cur. (This strangeness occurs because negative numbers cannot be specified as resource limit values, since they
typically have special meanings. For example, RLIM_INFINITY typically is the same as -1.)

RLIMIT_NOFILE
Specifies a value one greater than the maximum file descriptor number that can be opened by this process. Attempts (open(2), pipe(2),
dup(2), etc.) to exceed this limit yield the error EMFILE. (Historically, this limit was named RLIMIT_OFILE on BSD.)

RLIMIT_NPROC
The maximum number of processes (or, more precisely on Linux, threads) that can be created for the real user ID of the calling process.
Upon encountering this limit, fork(2) fails with the error EAGAIN.

RLIMIT_RSS
Specifies the limit (in pages) of the process's resident set (the number of virtual pages resident in RAM). This limit only has effect in
Linux 2.4.x, x < 30, and there only affects calls to madvise(2) specifying MADV_WILLNEED.

RLIMIT_RTPRIO (Since Linux 2.6.12, but see BUGS)
Specifies a ceiling on the real-time priority that may be set for this process using sched_setscheduler(2) and sched_setparam(2).

RLIMIT_RTTIME (Since Linux 2.6.25)
Specifies a limit (in microseconds) on the amount of CPU time that a process scheduled under a real-time scheduling policy may consume with&#8208;
out making a blocking system call. For the purpose of this limit, each time a process makes a blocking system call, the count of its con&#8208;
sumed CPU time is reset to zero. The CPU time count is not reset if the process continues trying to use the CPU but is preempted, its time
slice expires, or it calls sched_yield(2).

Upon reaching the soft limit, the process is sent a SIGXCPU signal. If the process catches or ignores this signal and continues consuming
CPU time, then SIGXCPU will be generated once each second until the hard limit is reached, at which point the process is sent a SIGKILL sig&#8208;
nal.

The intended use of this limit is to stop a runaway real-time process from locking up the system.

RLIMIT_SIGPENDING (Since Linux 2.6.8)
Specifies the limit on the number of signals that may be queued for the real user ID of the calling process. Both standard and real-time
signals are counted for the purpose of checking this limit. However, the limit is only enforced for sigqueue(3); it is always possible to
use kill(2) to queue one instance of any of the signals that are not already queued to the process.

RLIMIT_STACK
The maximum size of the process stack, in bytes. Upon reaching this limit, a SIGSEGV signal is generated. To handle this signal, a process
must employ an alternate signal stack (sigaltstack(2)).

Since Linux 2.6.23, this limit also determines the amount of space used for the process's command-line arguments and environment variables;
for details, see execve(2).

prlimit()
The Linux-specific prlimit() system call combines and extends the functionality of setrlimit() and getrlimit(). It can be used to both set and get
the resource limits of an arbitrary process.

The resource argument has the same meaning as for setrlimit() and getrlimit().

If the new_limit argument is a not NULL, then the rlimit structure to which it points is used to set new values for the soft and hard limits for
resource. If the old_limit argument is a not NULL, then a successful call to prlimit() places the previous soft and hard limits for resource in
the rlimit structure pointed to by old_limit.

The pid argument specifies the ID of the process on which the call is to operate. If pid is 0, then the call applies to the calling process. To
set or get the resources of a process other than itself, the caller must have the CAP_SYS_RESOURCE capability, or the real, effective, and saved
set user IDs of the target process must match the real user ID of the caller and the real, effective, and saved set group IDs of the target process
must match the real group ID of the caller.

RETURN VALUE
On success, these system calls return 0. On error, -1 is returned, and errno is set appropriately.

ERRORS
EFAULT A pointer argument points to a location outside the accessible address space.

EINVAL The value specified in resource is not valid; or, for setrlimit() or prlimit(): rlim->rlim_cur was greater than rlim->rlim_max.

EPERM An unprivileged process tried to raise the hard limit; the CAP_SYS_RESOURCE capability is required to do this. Or, the caller tried to
increase the hard RLIMIT_NOFILE limit above the current kernel maximum (NR_OPEN). Or, the calling process did not have permission to set
limits for the process specified by pid.

ESRCH Could not find a process with the ID specified in pid.

VERSIONS
The prlimit() system call is available since Linux 2.6.36. Library support is available since glibc 2.13.

CONFORMING TO
getrlimit(), setrlimit(): SVr4, 4.3BSD, POSIX.1-2001.
prlimit(): Linux-specific.

RLIMIT_MEMLOCK and RLIMIT_NPROC derive from BSD and are not specified in POSIX.1-2001; they are present on the BSDs and Linux, but on few other
implementations. RLIMIT_RSS derives from BSD and is not specified in POSIX.1-2001; it is nevertheless present on most implementations.
RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_RTPRIO, RLIMIT_RTTIME, and RLIMIT_SIGPENDING are Linux-specific.

NOTES
A child process created via fork(2) inherits its parent's resource limits. Resource limits are preserved across execve(2).

One can set the resource limits of the shell using the built-in ulimit command (limit in csh(1)). The shell's resource limits are inherited by the
processes that it creates to execute commands.

Ancient systems provided a vlimit() function with a similar purpose to setrlimit(). For backward compatibility, glibc also provides vlimit(). All
new applications should be written using setrlimit().

EXAMPLE
The program below demonstrates the use of prlimit().

#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>

#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \
} while (0)

int
main(int argc, char *argv[])
{
struct rlimit old, new;
struct rlimit *newp;
pid_t pid;

if (!(argc == 2 || argc == 4)) {
fprintf(stderr, "Usage: %s <pid> [<new-soft-limit> "
"<new-hard-limit>]\n", argv[0]);
exit(EXIT_FAILURE);
}

pid = atoi(argv[1]); /* PID of target process */

newp = NULL;
if (argc == 4) {
new.rlim_cur = atoi(argv[2]);
new.rlim_max = atoi(argv[3]);
newp = &new;
}

/* Set CPU time limit of target process; retrieve and display
previous limit */

if (prlimit(pid, RLIMIT_CPU, newp, &old) == -1)
errExit("prlimit-1");
printf("Previous limits: soft=%lld; hard=%lld\n",
(long long) old.rlim_cur, (long long) old.rlim_max);

/* Retrieve and display new CPU time limit */

if (prlimit(pid, RLIMIT_CPU, NULL, &old) == -1)
errExit("prlimit-2");
printf("New limits: soft=%lld; hard=%lld\n",
(long long) old.rlim_cur, (long long) old.rlim_max);

exit(EXIT_FAILURE);
}

BUGS
In older Linux kernels, the SIGXCPU and SIGKILL signals delivered when a process encountered the soft and hard RLIMIT_CPU limits were delivered one
(CPU) second later than they should have been. This was fixed in kernel 2.6.8.

In 2.6.x kernels before 2.6.17, a RLIMIT_CPU limit of 0 is wrongly treated as "no limit" (like RLIM_INFINITY). Since Linux 2.6.17, setting a limit
of 0 does have an effect, but is actually treated as a limit of 1 second.

A kernel bug means that RLIMIT_RTPRIO does not work in kernel 2.6.12; the problem is fixed in kernel 2.6.13.

In kernel 2.6.12, there was an off-by-one mismatch between the priority ranges returned by getpriority(2) and RLIMIT_NICE. This had the effect
that the actual ceiling for the nice value was calculated as 19 - rlim_cur. This was fixed in kernel 2.6.13.

Kernels before 2.4.22 did not diagnose the error EINVAL for setrlimit() when rlim->rlim_cur was greater than rlim->rlim_max.

SEE ALSO
dup(2), fcntl(2), fork(2), getrusage(2), mlock(2), mmap(2), open(2), quotactl(2), sbrk(2), shmctl(2), malloc(3), sigqueue(3), ulimit(3), core(5),
capabilities(7), signal(7)

COLOPHON
This page is part of release 3.35 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found
at http://man7.org/linux/man-pages/.



Linux 2011-09-10 GETRLIMIT(2)


  


2. Re: Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 02/06/2014 - 23:52h

Achei algo para ajudar:
http://www.vivaolinux.com.br/topico/Aceleracao-3D/placa-3d-intel-gm45#6

tinus escreveu:

Consegui resolver a questão, bom criei um arquivo chamado 20-intel.conf localizado em /usr/share/X11/xorg.conf.d com a seguinte descrição.

Section "Device"
Identifier "Configured Video Device"
Driver "intel"
Option "SwapbuffersWait" "false"
EndSection

A opção "SwapbuffersWait" "false" desabilita o vsync melhorando um pouco o desempenho da placa 3d da intel, resultado da alteração.

ticus@debian:~$ glxgears
5649 frames in 5.0 seconds = 1129.666 FPS
5858 frames in 5.0 seconds = 1171.580 FPS
5905 frames in 5.0 seconds = 1180.970 FPS
5911 frames in 5.0 seconds = 1182.091 FPS
5908 frames in 5.0 seconds = 1181.555 FPS
5851 frames in 5.0 seconds = 1170.008 FPS
5637 frames in 5.0 seconds = 1127.329 FPS



3. Re: Limitar processamento [RESOLVIDO]

Carlos APC
Carlos_Cunha

(usa Linux Mint)

Enviado em 03/06/2014 - 02:25h

Tentou o "renice" ??


4. Re: Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 03/06/2014 - 19:19h

PretooOO escreveu:

Tentou o "renice" ??


Tentei dar uma olhada no man dele, mas não entendi muito bem o que isso tem haver (talvez eu seja muito noob).

Se incomoda de explicar?

Tá aqui o que tava no manual:
 man renice  




RENICE(1) User Commands RENICE(1)

NAME
renice — alter priority of running processes

SYNOPSIS
renice [-n] priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]
renice -h | -v

DESCRIPTION
Renice alters the scheduling priority of one or more running processes.
The following who parameters are interpreted as process ID's, process
group ID's, or user names. Renice'ing a process group causes all pro&#8208;
cesses in the process group to have their scheduling priority altered.
Renice'ing a user causes all processes owned by the user to have their
scheduling priority altered. By default, the processes to be affected
are specified by their process ID's.

Options supported by renice:

-n, --priority
The scheduling priority of the process, process group, or user.

-g, --pgrp
Force who parameters to be interpreted as process group ID's.

-u, --user
Force the who parameters to be interpreted as user names.

-p, --pid
Resets the who interpretation to be (the default) process ID's.

-v, --version
Print version.

-h, --help
Print help.

For example,

renice +1 987 -u daemon root -p 32

would change the priority of process ID's 987 and 32, and all processes
owned by users daemon and root.

Users other than the super-user may only alter the priority of processes
they own, and can only monotonically increase their ``nice value'' (for
security reasons) within the range 0 to PRIO_MAX (20), unless a nice
resource limit is set (Linux 2.6.12 and higher). The super-user may
alter the priority of any process and set the priority to any value in
the range PRIO_MIN (-20) to PRIO_MAX. Useful priorities are: 20 (the
affected processes will run only when nothing else in the system wants
to), 0 (the ``base'' scheduling priority), anything negative (to make
things go very fast).

FILES
/etc/passwd to map user names to user ID's

SEE ALSO
getpriority(2), setpriority(2)

BUGS
Non super-users can not increase scheduling priorities of their own pro&#8208;
cesses, even if they were the ones that decreased the priorities in the
first place.
The Linux kernel (at least version 2.0.0) and linux libc (at least ver&#8208;
sion 5.2.18) does not agree entirely on what the specifics of the system&#8208;
call interface to set nice values is. Thus causes renice to report bogus
previous nice values.

HISTORY
The renice command appeared in 4.0BSD.

AVAILABILITY
The renice command is part of the util-linux package and is available
from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.

util-linux November 2010 util-linux



5. Re: Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 04/06/2014 - 22:07h

Bem gente cheguei a uma conclusão, meu problema é o Xorg, ele é muito pesado para o meu modo de uso do computador; Descobri que tem outras opções além dele, só não vem "de fábrica" com o Linux.

Tem o Xvesa:
http://www.vivaolinux.com.br/dica/Debian-Lenny-com-interface-grafica-e-consumindo-30-MB-de-RAM/

Tem o tinyX:
http://www.vivaolinux.com.br/artigo/Kdrive-um-X-em-miniatura

Tem o Xfbdev:
http://www.vivaolinux.com.br/dica/Monitores-antigos-no-Damn-Small-Linux

E provavelmente outros, então vejamos como vou fazer isso num:

heroico@denilson-pc:~$ lsb_release -idrc
Distributor ID: Trisquel
Description: Trisquel 6.0.1
Release: 6.0.1
Codename: toutatis



6. Re: Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 05/06/2014 - 11:34h

Denilson-BR escreveu:

Bem gente cheguei a uma conclusão, meu problema é o Xorg, ele é muito pesado para o meu modo de uso do computador; Descobri que tem outras opções além dele, só não vem "de fábrica" com o Linux.

Tem o Xvesa:
http://www.vivaolinux.com.br/dica/Debian-Lenny-com-interface-grafica-e-consumindo-30-MB-de-RAM/

Tem o tinyX:
http://www.vivaolinux.com.br/artigo/Kdrive-um-X-em-miniatura

Tem o Xfbdev:
http://www.vivaolinux.com.br/dica/Monitores-antigos-no-Damn-Small-Linux

E provavelmente outros, então vejamos como vou fazer isso num:

heroico@denilson-pc:~$ lsb_release -idrc
Distributor ID: Trisquel
Description: Trisquel 6.0.1
Release: 6.0.1
Codename: toutatis


Decidi que iria baixar um Linux com ele já configurado, eu baixei o TinyCore, na versão de tem mais megabites a CorePlus, mas quando instalo o grub do Triquel não detecta ele, mesmo fazendo:
 root@denilson-pc:/home/heroico# update-grub2  


Então resolvi instalar o TinyCore de novo com o bootloader dessa vez.

Obviamente perdi o grub do Trisquel temporariamente, mas instalei o grub no TinyCore e instalei o grub no boot, como não tinha nenhum grub vinculado ao grub do boot fui parar no numa linha de comando chamada Grub Rescue, pelo Grub Rescue entrei no Trisquel mesmo:
 configfile (hd0,msdos2)/boot/grub/grub.cfg  


Ai resolvi reinstalar o grub do Trisquel:
 root@denilson-pc:/home/heroico# grub-install /dev/sda  


Ai fiz um update grub pra ver se o TinyCore aparecia:
 root@denilson-pc:/home/heroico# update-grub2  


Mas ele não apareceu, acho que vou ter de adicionar a entrada pra ele diretamente no arquivo do Grub2.


7. Re: Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 06/06/2014 - 01:12h

Denilson-BR escreveu:

Decidi que iria baixar um Linux com ele já configurado, eu baixei o TinyCore, na versão de tem mais megabites a CorePlus, mas quando instalo o grub do Triquel não detecta ele, mesmo fazendo:
 root@denilson-pc:/home/heroico# update-grub2  


Então resolvi instalar o TinyCore de novo com o bootloader dessa vez.

Obviamente perdi o grub do Trisquel temporariamente, mas instalei o grub no TinyCore e instalei o grub no boot, como não tinha nenhum grub vinculado ao grub do boot fui parar no numa linha de comando chamada Grub Rescue, pelo Grub Rescue entrei no Trisquel mesmo:
 configfile (hd0,msdos2)/boot/grub/grub.cfg  


Ai resolvi reinstalar o grub do Trisquel:
 root@denilson-pc:/home/heroico# grub-install /dev/sda  


Ai fiz um update grub pra ver se o TinyCore aparecia:
 root@denilson-pc:/home/heroico# update-grub2  


Mas ele não apareceu, acho que vou ter de adicionar a entrada pra ele diretamente no arquivo do Grub2.


Adicionei a entrada dele diretamente no grub do Trisquel:
 root@denilson-pc:/home/heroico# vi /boot/grub/grub.cfg  



ismod ext4
search --no-floppy --fs-uuid --set=root 2d73277a-c4ff-4059-be0c-5e10af47aed9

menuentry "TinyCore" {
linux /tce/boot/vmlinuz quiet noswap waitusb=10:UUID="2d73277a-c4ff-4059-be0c-5e10af47aed9" tce=UUID="2d73277a-c4ff-4059-be0c-5e10af47aed9" tz=GMT-3 blacklist=bcma blacklist=b43
initrd /tce/boot/core.gz
}


E passei horas tentando fazer funcionar, mas parece as bibliotecas usadas nos jogos que usam recursos 3D só funcionam tendo o Xorg como subpacote no TinyCore e provavelmente nos outros Linux para computadores antigos... Será que tem algum que escapa dessa regra? Seja como for parece que não vai dar com o Xvesa. Terei de voltar ao plano original de limitação de recursos.


8. Re: Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 06/06/2014 - 22:44h

Denilson-BR escreveu:

Adicionei a entrada dele diretamente no grub do Trisquel:
 root@denilson-pc:/home/heroico# vi /boot/grub/grub.cfg  



ismod ext4
search --no-floppy --fs-uuid --set=root 2d73277a-c4ff-4059-be0c-5e10af47aed9

menuentry "TinyCore" {
linux /tce/boot/vmlinuz quiet noswap waitusb=10:UUID="2d73277a-c4ff-4059-be0c-5e10af47aed9" tce=UUID="2d73277a-c4ff-4059-be0c-5e10af47aed9" tz=GMT-3 blacklist=bcma blacklist=b43
initrd /tce/boot/core.gz
}


E passei horas tentando fazer funcionar, mas parece as bibliotecas usadas nos jogos que usam recursos 3D só funcionam tendo o Xorg como subpacote no TinyCore e provavelmente nos outros Linux para computadores antigos... Será que tem algum que escapa dessa regra? Seja como for parece que não vai dar com o Xvesa. Terei de voltar ao plano original de limitação de recursos.


Consegui =)

Com o artigo http://www.vivaolinux.com.br/dica/Configurando-corretamente-o-driver-Intel-em-seu-xorg.conf? eu fui colocando o que eu queria do jeito que eu queria e deu certo. Ficaram assim as partes modificadas do meu Xorg:

Section "Device"
Identifier "Configured Video Device"
Driver "Default"
# Driver "Vesa"
Option "SwapbuffersWait" "false"
Option "Dac6Bit" "true"
Option "VideoKey" "16"
Option "AperTexSize" "0"
Option "Legacy3D" "true"
Option "PageFlip" "false"
Option "TripleBuffer" "false"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 12
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection


Quanto a esse aqui:
Driver "Default"

Num Manjaro virtualizado que testei tive de comentar a linha para ele funcionar:
# Driver "Default"

Quanto a parte da limitação da internet para não ser muito trabalhoso pra placa se for jogar com a Wireless (parece que queimei 2 placas wireless jogando sem limitação) eu estou usando o Trickle ficando assim no caso do Spiral Knights:
 trickle -u 2 -d 100 /home/heroico/spiral/spiral  



9. Re: Limitar processamento [RESOLVIDO]

Denilson Pereira
Denilson-Pereira

(usa Debian)

Enviado em 12/09/2014 - 14:10h

Achei mais uma coisa para ajudar, um comando chamado cpulimit ,ele é muito útil, basta abrir o programa e depois abrir um terminal e digitar por exemplo para o Spiral Knights que usa o java

cpulimit -e java -l 50


Isso vai fazer com que o processo java só possa usar no máximo 50% do poder de processamento do computador.

Para o Firefox como outro exemplo:

cpulimit -e firefox -l 30


Isso vai fazer o processo firefox só poder usar 30% do poder de processamento do computador.

Você pode ativar o cpulimit primeiro em um terminal e abrir o programa que ele vai limitar depois dele sem problema algum que ele limita do mesmo jeito.






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts