Re: [gentoo-user] [A bit off-topic] Bash alias and

2016-06-13 Thread Adam Carter
Another option is to suspend the foreground process (ctrl-Z) then you can
background it by typing bg, which will resume running and put it in the
background.

 # sleep 10
^Z
[1]+  Stopped sleep 10
m # bg
[1]+ sleep 10 &
#


Re: [gentoo-user] Recommended way to shut down akonadi

2016-06-13 Thread J. Roeleveld
On Friday, June 10, 2016 10:32:25 PM Mick wrote:
> On Friday 10 Jun 2016 19:54:44 J. Roeleveld wrote:
> > Kde and I would assume Gnome as well have a method of running a script
> > when
> > starting and stopping a login session.
> >
> > This is usually used for ssh-agent and pgp-agent.
>
> Yes, KDE uses /etc/plasma/shutdown/10-agent-shutdown.sh and I guess gnome
> would have its equivalent, but I think this is only for any daemonised
> services running on the desktop.
>
> I suspect that:
>
> /usr/bin/kdeinit4_shutdown
> /usr/bin/kdeinit5_shutdown
>
> are used to shutdown gracefully any KDE apps.
>
> > You could try looking for something similar with the desktop/window
> > manager
> > of your choice.
>
> I tried the above shutdown commands but they didn't work.  Unfortunately
> enlightenment does not have anything available to stop desktop applications
> at shutdown.  The dev's advice was to use .xinitrc or equivalent.
>
> > I think .xsession is run only during start and will not 'pause' during the
> > session.
>
> Well my confusion is that my .xsession *was* working fine until a couple of
> weeks ago ... and all still works as expected when I run akonadictl stop in
> a terminal before I shut down.  I don't know why the same command behaves
> differently in .xsession now.  :-/
>
> PS. When I just log out there is no delay.  The problem only arises when I
> shutdown.  I wonder if this is something to do with this darn sddm display
> manager ...

There is a 90 second delay with PostgreSQL if there are still clients connected 
to the
database.
This should also be displayed on the screen if you see the shutdown-text.

I don't see how sddm can cause an extra delay.

You could add the commands to:
/etc/local.d/killakonadi.stop

(These are run as root, so you might need to do something like:
/bin/su -s /bin/sh -c "  " 
instead of the commands you have been putting in the scripts.

I think the local-service is stopped before postgresql is stopped, so this 
might prevent the
delay you are seeing?

--
Joost




signature.asc
Description: This is a digitally signed message part.


[gentoo-user] How to try custom-optimization in firefox

2016-06-13 Thread Adam Carter
I have enabled this use flag and the output of emerge --info shows it has
been recognised in USE but not in FCFLAGs/CFLAGs;

grep USE.*custom ff*
ffafter-cust-opt.txt:USE="custom-optimization dbus gmp-autoupdate gtk2
hwaccel jemalloc3 jit pulseaudio -bindist -custom-cflags -debug -hardened
(-neon) (-pgo) (-selinux) -startup-notification (-system-cairo)
-system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx
-system-sqlite -test -wifi"
ffbefore-cust-opt.txt:USE="dbus gmp-autoupdate gtk2 hwaccel jemalloc3 jit
pulseaudio -bindist -custom-cflags -custom-optimization -debug -hardened
(-neon) (-pgo) (-selinux) -startup-notification (-system-cairo)
-system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx
-system-sqlite -test -wifi"

grep CFLAGS ff*
ffafter-cust-opt.txt:CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm
-O2 -pipe"
ffafter-cust-opt.txt:FCFLAGS="-O2 -pipe"
ffafter-cust-opt.txt:CFLAGS="-march=amdfam10 -pipe"
ffbefore-cust-opt.txt:CFLAGS="-march=amdfam10 -mcx16 -msahf -mpopcnt -mabm
-O2 -pipe"
ffbefore-cust-opt.txt:FCFLAGS="-O2 -pipe"
ffbefore-cust-opt.txt:CFLAGS="-march=amdfam10 -pipe"

I assumed that enabling custom-optimization would let the optimization
setting from CFLAGS in make.conf pass through unfiltered, but that's not
the case. What else do i need to do to make it work?


Re: [gentoo-user] Re: Change from udev to eudev?

2016-06-13 Thread J. Roeleveld
On Monday, June 13, 2016 02:10:27 PM James wrote:
> wabe  gmail.com> writes:
> Still, if you manage 1000 linux workstations, then systemd does have
> it's merits.

Serious question: What makes systemd more suitable to manage 1000 linux 
workstations when compared to, for instance, OpenRC?

--
Joost



Re: [gentoo-user] how to use two graphics cards with one display

2016-06-13 Thread Andrew Savchenko
Hi,

On Thu, 09 Jun 2016 23:16:37 +0200 lee wrote:
> > As far as I understand your e-mail, you are trying to mux video
> > outputs of two GPU cards to a single monitor (excuse me if I'm
> > wrong, but it is hard to understand what your hardware is), this is
> > also doable if your monitor supports dual input (most modern
> > monitors do). This way separate X screens may be used to achive
> > your goal. (Xinerama setup is also possible, but GL acceleration
> > will be limited to abilities of the weakest card).
> 
> Exactly, but I don't want to use the picture-in-picture feature of the
> monitor, and I don't want separate X screens, and I don't have room to
> fit another monitor on my desk.
>
> I simply want to use one of the graphics cards to handle an application
> that uses open gl and the other one to play a video.

Let's suppose that you connected video outputs of both your cards
to the same monitor. It is possible to use single X screen with
xinerama here and configure it to mirror outputs on both cards,
e.g. (output names may vary depending on hardware):
  xrandr --output LVDS1 --same-as VGA1
This way you can select using monitor's hardware switch from what
input to take picture. So you'll have dual-monitor mirrored output,
where both outputs are connected to the same single monitor.

But the last time I tried similar scheme, OpenGL acceleration is
limited to the lowest card capabilities. This was several years
ago, maybe things are changed since and you'll be able to use full
power of a newer card. In order to select which card to use you can
select xinerama screen (mplayer can do that, not sure about others).

> > But honestly I don't get why you need this: if you have a powerful
> > GPU and it is not a laptop, where power consumption is critical,
> > why just don't use that card? Most cards have multiple outputs, so
> > it is not a problem to setup multihead with a single card either.
> 
> The GPU isn't quite powerful enough for some of what I'm doing.
> Otherwise, it's a perfectly good card.
> 
> So I need to get a better graphics card, and once I do, it would be a
> pity to have the current one laying around uselessly.  I wouldn't get
> much if I tried to sell it, so I rather keep it in case I need a spare.
> Buying another one which is the same, to use SLI, won't help, either.
> 
> IIUC, it takes some processing power to decode a video, so why not use
> one of the cards for just that?  Multiple cards should be able to work
> together.

There is a severe problem here: how to multiplex outputs of
different cards to the same monitor? Either outputs should be
independent (as described above), or single video output should be
used and hence one card must write to the buffer of another.

It is possible to done this either via SLI (not your case
apparently) or PCI Express. The latter solution requires very
special driver support (e.g. NVidia Optimus or ATI Hybrid
Graphics). AFAIK both of them work only on IGP <-> PCI-E setup,
where one card is Integrated Graphics Processor using system
memory and another one is powerful (and energy consuming) PCI-E
graphics card. On such setup driver allows to transfer display
surface from GPU frame buffer, to system RAM mapped for IGP and
then IGP is used to display this surface.

IOW such solution will not work if you have a couple of fully
fledged PCI-E GPU cards with their own memory. In theory it should
be possible to rewrite GPU driver in a way that will allow to
transfer display surface from one video card RAM to another using
PCI-E bus, but no sane developer will do this: coding efforts will
be tremendous and benefits are unclear up to the point when PCI-E
will be a bottleneck.

I still don't understand why you need an older card for a video
decoding, since newer one can do this perfectly.

Still there is a place to use both cards: GPGPU computing, both
cards can be used to run OpenCL or CUDA applications or one card
may be used for a vdpau video decoding, while another one will mine
you bitcoins :)

Be warned however, that if you will use both card for the same
GPGPU application (e.g. OpenCL or CUDA), care should be taken to
allow asynchronous computing of such application. Since cards will
operate on different speeds, memory and number of cores,
synchronous application will be faster no more then as twice as the
same app on the slowest card, which will be likely slow than runnig
the same app only on the fastest card. Also you must remember, then
PCI-E is terribly slow compared to in-GPGPU data exchange rate, so
it will likely be a bottleneck for your tasks. Of course, most
OpenCL/CUDA apps are synchronous and will not be able to run
properly on heterogeneous GPGPU setup.

So probably your best option will be to use one card solely for
GPGPU computing, while another one for rendering and output.
Another interesting application is that some codecs (e.g.
x264) allow to use OpenCL, though from tests I saw it still gives
worse results then vdpau-based decoding.


[gentoo-user] Re: Change from udev to eudev?

2016-06-13 Thread James
wabe  gmail.com> writes:


> waltdnes  waltdnes.org wrote:


> I'm glad that gentoo users still have an alternative to systemd, and
> hope that this will also be the case in future.

Non Systemd has a very bright future. In clustering, Systemd is ok, even
great for containers. In Hi Performance Computing types of clusters, systemd
is loosing the battle. Many in these trenches
believe that the cluster engines of HPC cluster architectures
will vastly outperform clusters with systemd; thus eventually
removing systemd from linux clusters where performance is important.


Still, if you manage 1000 linux workstations, then systemd does have
it's merits.


> But I really don't wanna start another pro/con systemd thread here! ;-)

Exactly. I just wanted to encourage the non-systemd folks that their future
looks very bright.

> Regards
> wabe


hth,
James




Re: [gentoo-user] [A bit off-topic] Bash alias and

2016-06-13 Thread Joerg Schilling
Andrew Lowe  wrote:

>   The first thing that comes to mind is an alias. Just off the top of my 
> head I tried:
>
>   alias "npp=npp %1 &"
>
> npp being the editor, but that didn't work. Is an alias the best/easiest 
> way to do this and if so, what would the syntax be, or is there a better 
> way?

Looks like something that will not work as %1 is not understood except by the 
jobcontrol commands.

It may be an attempt to write a parameterizable alias

AFAIK, bash does not support parameterized macros.

Jörg

-- 
 EMail:jo...@schily.net(home) Jörg Schilling D-13353 Berlin
   joerg.schill...@fokus.fraunhofer.de (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.org/private/ 
http://sourceforge.net/projects/schilytools/files/'



Re: [gentoo-user] [A bit off-topic] Bash alias and

2016-06-13 Thread Peter Humphrey
On Sunday 12 Jun 2016 19:07:45 Mick wrote:
> On Sunday 12 Jun 2016 18:04:39 Peter Humphrey wrote:
> > Oi! I'm missing e-mails!
> 
> I occasionally miss the odd email here and there too.  Sometimes I find
> (only some of) them in Gmail's Spam folder.  Other messages totally
> disappear and I surmise I missed parts of a thread by subsequent messages
> in the list, which I receive as expected.  Tis a mystery!  O_o

--->8

> Gmail is more reliable than other mail ISPs I have used over the years and
> it is free (at the point of use), so I live with it.  I don't know if
> missing messages are caused by Gmail, or by gentoo's M/L smtp server.

Well I don't use GMail, so that rules that out. Oh, and I'm also subscribed 
to kdepim-us...@kde.org, which (also?) uses mailman. I see hardly any traffic 
there but occasionally a message comes through showing that I've missed lots 
of others. Even if I post there myself I don't see my message.

-- 
Rgds
Peter




Re: [gentoo-user] Updateing linux-headers ...

2016-06-13 Thread Dale
J. Roeleveld wrote:
> On Saturday, June 11, 2016 03:54:32 PM Alexander Kapshuk wrote:
>>
>> If what you're after is rebuilding all the packages that depend on
>> linux-headers, a command line below might be one way of doing it:
>>
>> emerge -a `equery -q d '=sys-kernel/linux-headers-4.3' | sed
>> 's/\-[0-9].*//'`   `
>>
>> These are the packages that would be merged, in order:
>>
>> Calculating dependencies  . done!
>> [ebuild   R] virtual/os-headers-0
>> [ebuild   R] sys-apps/busybox-1.24.2
>> [ebuild   R] sys-libs/mtdev-1.1.5
>> [ebuild   R] dev-util/strace-4.9
>> [ebuild   R] sys-apps/hwinfo-21.4
>> [ebuild   R] sys-libs/libcap-ng-0.7.7
>> [ebuild   R] sys-libs/libseccomp-2.3.0
>> [ebuild   R] sys-apps/iproute2-4.4.0
>> [ebuild   R] sys-libs/libcap-2.24-r2
>> [ebuild   R] media-gfx/sane-backends-1.0.24-r6
>> [ebuild   R] media-video/ffmpeg-2.8.6
>> [ebuild   R] x11-drivers/xf86-input-evdev-2.9.2
>> [ebuild   R] sys-fs/udev-225-r1
>> [ebuild   R] sys-fs/udisks-2.1.4
>>
>> Would you like to merge these packages? [Yes/No]
> Please ensure you pass " --oneshot " or " -1 " to emerge. Otherwise all these 
> will end up in your world-file causing interesting blockers later.
>
> --
> Joost
>
>


One other option, add it to emerge options in make.conf.  Then if you
really want it in world, use --select or add it to the world file
manually.  I added it to my make.conf file a long time ago.  It makes it
much easier to keep a clean world file.  I would always forget to add
that option. 

Dale

:-)  :-) 



[gentoo-user] [SOLVED]Re: [A bit off-topic] Bash alias and

2016-06-13 Thread Andrew Lowe

On 06/13/16 03:06, Jonathan Callen wrote:

On 06/12/2016 11:54 AM, Andrew Lowe wrote:

On 06/12/16 23:07, Andrew Lowe wrote:

On 06/12/16 22:43, Alan McKinnon wrote:

On 12/06/2016 16:33, Nico Verrijdt wrote:

Hi Andrew,

2016-06-12 16:26 GMT+02:00 Andrew Lowe >:

Hi all,
 A bit off topic here, but there are plenty of people who
seem to know their shells back to front so here goes.


[snip]
...
...
[snip]



A better function for the same (that also doesn't loop forever because
the function might be calling itself):

npp() {
command npp "$@" &
}

This allows any number of arguments to be passed, instead of "exactly
one" and allows filenames containing spaces, etc. to be passed correctly.



Thanks, that's a nice little tweak.

Andrew



Re: [gentoo-user] Updateing linux-headers ...

2016-06-13 Thread J. Roeleveld
On Saturday, June 11, 2016 03:54:32 PM Alexander Kapshuk wrote:
> On Sat, Jun 11, 2016 at 2:09 PM,   wrote:
> > Hi,
> > 
> > I want to update my linux-headers (I am using the vanilla-kernel).
> > 
> > I did a
> > 
> > solfire:/root>equery depends '=sys-kernel/linux-headers-4.6'
> > 
> >  * These packages depend on sys-kernel/linux-headers-4.6:
> > app-misc/srm-1.2.11-r2 (sys-kernel/linux-headers)
> > dev-qt/qtgui-5.5.1-r1 (evdev ? sys-kernel/linux-headers)
> > 
> >   (udev ? sys-kernel/linux-headers)
> > 
> > dev-util/strace-4.9 (sys-kernel/linux-headers)
> > media-video/ffmpeg-2.8.6 (v4l ? sys-kernel/linux-headers)
> > media-video/transcode-1.1.7-r3 (v4l ? >=sys-kernel/linux-headers-2.6.11)
> > sys-apps/busybox-1.24.2 (>=sys-kernel/linux-headers-2.6.39)
> > sys-apps/iproute2-4.4.0 (>=sys-kernel/linux-headers-3.16)
> > sys-apps/keyutils-1.5.9-r2 (!prefix ? >=sys-kernel/linux-headers-2.6.11)
> > sys-fs/udev-225-r1 (>=sys-kernel/linux-headers-3.9)
> > sys-fs/udisks-2.1.7 (>=sys-kernel/linux-headers-3.1)
> > sys-libs/libcap-2.24-r2 (sys-kernel/linux-headers)
> > sys-libs/libcap-ng-0.7.7 (sys-kernel/linux-headers)
> > sys-libs/libseccomp-2.3.0 (>=sys-kernel/linux-headers-4.3)
> > sys-libs/mtdev-1.1.5 (>=sys-kernel/linux-headers-2.6.31)
> > sys-power/acpid-2.0.23 (>=sys-kernel/linux-headers-3)
> > virtual/linuxtv-dvb-headers-5.8 (>=sys-kernel/linux-headers-3.7)
> > virtual/os-headers-0 (kernel_linux ? sys-kernel/linux-headers:0)
> > x11-drivers/xf86-input-evdev-2.9.2 (>=sys-kernel/linux-headers-2.6)
> > 
> > How can I tell emerge just to recompile those packages since
> > 
> > emerge --update --newuse --deep --with-bdeps=y --tree --keep-going
> > --backtrack=30 @world -v
> > 
> > does not do anything.
> > 
> > Thanks a lot for any help in advance!
> > Best regards,
> > Meino
> 
> If what you're after is rebuilding all the packages that depend on
> linux-headers, a command line below might be one way of doing it:
> 
> emerge -a `equery -q d '=sys-kernel/linux-headers-4.3' | sed
> 's/\-[0-9].*//'`   `
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies  . done!
> [ebuild   R] virtual/os-headers-0
> [ebuild   R] sys-apps/busybox-1.24.2
> [ebuild   R] sys-libs/mtdev-1.1.5
> [ebuild   R] dev-util/strace-4.9
> [ebuild   R] sys-apps/hwinfo-21.4
> [ebuild   R] sys-libs/libcap-ng-0.7.7
> [ebuild   R] sys-libs/libseccomp-2.3.0
> [ebuild   R] sys-apps/iproute2-4.4.0
> [ebuild   R] sys-libs/libcap-2.24-r2
> [ebuild   R] media-gfx/sane-backends-1.0.24-r6
> [ebuild   R] media-video/ffmpeg-2.8.6
> [ebuild   R] x11-drivers/xf86-input-evdev-2.9.2
> [ebuild   R] sys-fs/udev-225-r1
> [ebuild   R] sys-fs/udisks-2.1.4
> 
> Would you like to merge these packages? [Yes/No]

Please ensure you pass " --oneshot " or " -1 " to emerge. Otherwise all these 
will end up in your world-file causing interesting blockers later.

--
Joost