You are not logged in.

#1 2011-09-30 21:51:04

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

New Lenovo T520: A Couple Questions

Howdy-ha, folks.  I just picked up a new T520, and it's... it's just great.  Everything pretty much works out-of-the-box.  There are just a couple questions I had to make sure I've got things working just right:

1.  The machine has both Intel integrated graphics and a discreet Nvidia card.  Under Windows, it defaults to Intel for normal desktop work and use while on battery, switching to the Nvidia card when more intensive graphics work takes place (for games and such). While I have only the Intel driver installed in Arch, I read that leaving the Optimus settings on within the BIOS while installing Linux may result in only one gpu being active, while both remain powered on and sucking up juice regardless of wether you change the BIOS settings or not.  Does anyone have any experience with this?  Is there a command I can pass to double-check it (dmesg output doesn't show anything that might indicates it).

2.   The processor is an intel i7 quadcore.  I've been trying to settle on what options to stick in /etc/makepkg.conf, but just digging through one Gentoo forum thread (which I can't seem to find again) shows that no one seems entirely certain on what general optimizations might work best.  So far I've only got

CFLAGS="-march=corei7-avx -mtune=corei7-avx -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="-march=corei7-avx -mtune=corei7-avx -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j9"

As the processor is hyperthreaded, 9 "make" jobs seemed reasonable.  Does this seem appropriate?  Again, has anyone found better settings/extra cflags to improve compile times and best utilize all four cores?

Thanks in advance for the feedback.

Offline

#2 2011-09-30 21:59:38

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: New Lenovo T520: A Couple Questions

That MAKEFLAGS setting does nothing, you need to uncomment it smile. CFLAGS look fine to me, except I think mtune is redundant, mcpu will already set it. Though you might want to consider using -mcpu=native, this sets even more stuff than just mcpu.

The only way to potentially speed up compiles is to use a kernel with the BFS scheduler. You use MAKEFLAGS="-j8" in that case. The cpu+1 trick is only because of the inefficiency of the default scheduler.

For disabling the nvidia card, look into acpi_call. If you actually want to use Optimus, look into Bumblebee.

Last edited by Gusar (2011-09-30 22:00:10)

Offline

Board footer

Powered by FluxBB