Re: [arch-general] Munin and MySQL

2012-09-17 Thread Leon Jacobs
On Mon, Sep 17, 2012 at 2:40 AM, Martín Cigorraga m...@archlinux.us wrote:
 Hi all, anyone proficient at Munin?

Im no pro, but recently did a install again.

 The talk of one of our guest speakers at the local SFD that took place
 yesterday was about monitoring everything with Munin, a software I didn't
 knew but which I liked at first sight.
 Once at home the very first thing I did after take the laptop out of my
 backpack was install Munin, of course, and alongside this I found some
 warning and error messages that aren't very informative so before go and
 dive on the net trying to gather information about them I decided to first
 try luck in the list.
 Whenever I run:
 # munin-node-configure --shell | sh
 I got this:
 # The following plugins caused errors:
 # mysql_:
 #   Non-zero exit during autoconf (2)
 # ntp_states:
 #   Non-zero exit during autoconf (2)
 # proc:
 #   In family 'auto' but doesn't have 'autoconf' capability

 Now the munin-node-configure --suggest command shows:
  | no   | no
 for all the three plugins. Following the wiki suggestion:
 #  munin-run {plugin}
 I got a:
 # Unknown service '{plugin}'
 for all them three.

Are you 'literally' running munin-run {plugin} or are you specifying
the plugin?
What does the following command output? eg:

[somedude@somebox plugins] # munin-run --debug mysql_threads
# Setting /rgid/ruid/ to /997/99/
# Setting /egid/euid/ to /997 997/99/
# Setting up environment
# About to run '/etc/munin/plugins/mysql_threads'
threads.value 1

-- 
Regards
L.

Sent using electronic mail ツ


Re: [arch-general] Munin and MySQL

2012-09-17 Thread Krzysztof Warzecha
2012/9/17 Martín Cigorraga m...@archlinux.us:
 Whenever I run:
 # munin-node-configure --shell | sh
 I got this:
 # The following plugins caused errors:
 # mysql_:
 #   Non-zero exit during autoconf (2)
 # ntp_states:
 #   Non-zero exit during autoconf (2)
 # proc:
 #   In family 'auto' but doesn't have 'autoconf' capability

Try:

/usr/lib/munin/plugins/mysql_ suggest

If in doubt, read plugin source. This one needs some extra perl
packages (it will show helpful error message if dependencies are
missing), configuration in /etc/munin/plugin-conf.d/ (in existing or
new file, no difference) and meaningful symlink name. If you want to
install that plugin manually try something like this:

ln -s /usr/lib/munin/plugins/mysql_ /etc/munin/plugins/mysql_$GRAPH

Where $GRAPH is one from: (bin_relay_log, commands, connections,
files_tables, innodb_bpool, innodb_bpool_act, innodb_insert_buf,
innodb_io, innodb_io_pend, innodb_log, innodb_rows, innodb_semaphores,
innodb_tnx, myisam_indexes, network_traffic, qcache, qcache_mem,
replication, select_types, slow, sorts, table_locks, tmp_tables).

-- 
Krzysztof Warzecha


Re: [arch-general] Proprietary nvidia driver for different kernels

2012-09-17 Thread Ralf Mardorf
On Sun, 2012-09-16 at 21:30 +0200, Joakim Hernberg wrote:
 Have you tried nouveau lately?  It has improved a lot lately...

Thank you :)

indeed it works with the kernel-rt. I still have to test it a little bit
longer and to check if audio production will be ok too, but until now
it's ok for averaged desktop usage.
Unfortunately I can't install nouveau-dri, since this conflicts with
libgl and nvidia-utils and I'll use the proprietary driver with the
standard kernel.
Only drawback, after startup and when starting the Xfce session, the
monitor relay is switching very often. The advantage is, that I don't
need to readjust the monitor when switching between nouveau and nvidia.

In the past nouveau only was a PITA, but now everything seems to be
fine.

Regards,
Ralf



[arch-general] sleep + lid events + kde = new problem

2012-09-17 Thread Genes MailLists


 Using fully updated testing repo - starting 'recently' - I notice that 
lid close no longer sleeps my laptop.


 Kde power is configured to sleep on lid close. If i click the menu and 
choose sleep manually - it sleeps fine - and subsequently wakes fine on 
lid-open.


 I can confirm with this little shell loop (left running and then close 
lid and reopen) that acpi shows lid is indeed closed:


while [[ 1 == 1 ]]
 do
 cat /proc/acpi/button/lid/*/state
 sleep 1
 done
state:  open
state:  open
state:  open
state:  open
state:  closed
state:  closed
state:  closed
state:  closed
state:  open
state:  open


 So, it -seems- as if lid-event is not being passed along for some 
reason to the (kde) power management - or not being listened to.


 I have not yet switched to systemd - and I'm not sure which process is 
responsible for such events.


 It still happens with 3.5.4 kernel if that makes any difference.

 It is a W520 lenovo laptop.

 Anyone else notice similar - or can offer suggestions?

 Thanks.

gene/


[arch-general] HARDWARECLOCK and systemd

2012-09-17 Thread Martín Cigorraga
I'm moving to systemd (finally!) and I'm stuck at the HARDWARECLOCK section
of rc.conf wiki.
How should be configured /etc/adjtime ? I can't find what should be inside
it. Also there say:  If this value is not set, then the value stored by
hwclock in /var/lib/hwclock/adjtime [...] but I don't have any
/var/lib/hwclock directory.
I would appreciate if anyone who already did the jump can share his
experiences, thanks!


Re: [arch-general] sleep + lid events + kde = new problem

2012-09-17 Thread mike cloaked
On Mon, Sep 17, 2012 at 3:11 PM, Genes MailLists li...@sapience.com wrote:

  Using fully updated testing repo - starting 'recently' - I notice that lid
 close no longer sleeps my laptop.

  Kde power is configured to sleep on lid close. If i click the menu and
 choose sleep manually - it sleeps fine - and subsequently wakes fine on
 lid-open.

  I can confirm with this little shell loop (left running and then close lid
 and reopen) that acpi shows lid is indeed closed:

 while [[ 1 == 1 ]]
 do
 cat /proc/acpi/button/lid/*/state
 sleep 1
 done
 state:  open
 state:  open
 state:  open
 state:  open
 state:  closed
 state:  closed
 state:  closed
 state:  closed
 state:  open
 state:  open


  So, it -seems- as if lid-event is not being passed along for some reason to
 the (kde) power management - or not being listened to.

  I have not yet switched to systemd - and I'm not sure which process is
 responsible for such events.

  It still happens with 3.5.4 kernel if that makes any difference.

  It is a W520 lenovo laptop.

  Anyone else notice similar - or can offer suggestions?

  Thanks.

Does running acpi_listen and closing then reopening the lid gives an
indication that the lid open/close is being seen - just to check if
there is any switch failure?


-- 
mike c


Re: [arch-general] HARDWARECLOCK and systemd

2012-09-17 Thread Matthew Monaco
On 09/17/2012 08:53 AM, Martín Cigorraga wrote:
 I'm moving to systemd (finally!) and I'm stuck at the HARDWARECLOCK section
 of rc.conf wiki.
 How should be configured /etc/adjtime ? I can't find what should be inside
 it. Also there say:  If this value is not set, then the value stored by
 hwclock in /var/lib/hwclock/adjtime [...] but I don't have any
 /var/lib/hwclock directory.
 I would appreciate if anyone who already did the jump can share his
 experiences, thanks!
 

How did you have it set with initscripts? If it was blank or UTC, then you
don't need to do anything to migrate to systemd. I can't speak for localtime


Re: [arch-general] HARDWARECLOCK and systemd

2012-09-17 Thread Thomas Bächler
Am 17.09.2012 16:53, schrieb Martín Cigorraga:
 I'm moving to systemd (finally!) and I'm stuck at the HARDWARECLOCK section
 of rc.conf wiki.
 How should be configured /etc/adjtime ? I can't find what should be inside
 it. Also there say:  If this value is not set, then the value stored by
 hwclock in /var/lib/hwclock/adjtime [...] but I don't have any
 /var/lib/hwclock directory.
 I would appreciate if anyone who already did the jump can share his
 experiences, thanks!

The file is now in /etc/adjtime. It should already be there.

If not, you set the time and run
 hwclock --systohc --utc
or
 hwclock --systohc --localtime

This creates the right configuration.




signature.asc
Description: OpenPGP digital signature


[arch-general] /etc/tmpfiles.d

2012-09-17 Thread Martín Cigorraga
[...]However, tmpfiles may also be used to write values into certain files
on boot. For example, if you use /etc/rc.local to disable wakeup from USB
devices with echo USBE  /proc/acpi/wakeup, you may use the following
tmpfile instead:


/etc/tmpfiles.d/disable-usb-wake.conf


w /proc/acpi/wakeup - - - - USBE

The tmpfiles method is recommended in this case since systemd doesn't
actually support /etc/rc.local.

Does that means that I need to move all the content from /etc/rc.local to
/etc/tmpfiles.d? For example this is my actual /etc/rc.local:
~ $ cat /etc/rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

#modprobe radeon # added by hybrid-video-ati-intel install script
#echo IGD  /sys/kernel/debug/vgaswitcheroo/switch # added by
hybrid-video-ati-intel install script
echo OFF  /sys/kernel/debug/vgaswitcheroo/switch # completely deactivate
radeon

## ATi
# Source: https://wiki.archlinux.org/index.php/ATI#Performance_tuning
echo low  /sys/class/drm/card0/device/power_profile
#echo profile  /sys/class/drm/card0/device/power_method
echo dynpm  /sys/class/drm/card0/device/power_method
echo OFF  /sys/kernel/debug/vgaswitcheroo/switch

# CPUFREQ
for i in 0 1 2 3; do cpufreq-set -c $i -g powersave; done  ## sets
powersave cpufreq governor for all CPU cores
#echo -n 90  /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo -n 20  /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

# Prepare the system for Wake-on-Lan
/usr/sbin/ethtool -s eth0 wol pg

# Activate laptop_mode
echo 5  /proc/sys/vm/laptop_mode

# Performance tweaks for USB drivers under KDE SC
echo madvise  /sys/kernel/mm/transparent_hugepage/enabled
echo madvise  /sys/kernel/mm/transparent_hugepage/defrag
echo 0  /sys/kernel/mm/transparent_hugepage/khugepaged/defrag


If this is the case, how do you guys would convert the FOR loop!?


Re: [arch-general] /etc/tmpfiles.d

2012-09-17 Thread Chris Sakalis
Hello.

 Does that means that I need to move all the content from /etc/rc.local to
 /etc/tmpfiles.d? For example this is my actual /etc/rc.local:

Only if you no longer boot with initscripts.

 # CPUFREQ
 for i in 0 1 2 3; do cpufreq-set -c $i -g powersave; done  ## sets
 powersave cpufreq governor for all CPU cores
 #echo -n 90  /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
 echo -n 20  /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
(...)
 If this is the case, how do you guys would convert the FOR loop!?

I think that tempfiles can not execute commands, only create/write to
files. If you want to run some commands, you should probably create
some custom unit files.

Regards,
Chris Sakalis


Re: [arch-general] Proprietary nvidia driver for different kernels

2012-09-17 Thread Joakim Hernberg
On Mon, 17 Sep 2012 15:27:04 +0200
Ralf Mardorf ralf.mard...@alice-dsl.net wrote:

 Unfortunately I can't install nouveau-dri, since this conflicts with
 libgl and nvidia-utils and I'll use the proprietary driver with the
 standard kernel.

If I were you, I'd try nouveau all the way.  only reason not to would
be gaming.  One thing I still have to check out though is if the
support for vblank is working, otherwise it might have some tearing
when watching video.

But I agree, it's a pain switching between nvidia and nouveau, but I'd
be inclined to blame nvidia itself for that...:)

In any case it's nice to see that a opensource alternative to the
closed nividia driver is available and working better all the time!

--

   Joakim


Re: [arch-general] /etc/tmpfiles.d

2012-09-17 Thread Matthew Monaco
On 09/17/2012 09:40 AM, Martín Cigorraga wrote:
 [...]However, tmpfiles may also be used to write values into certain files
 on boot. For example, if you use /etc/rc.local to disable wakeup from USB
 devices with echo USBE  /proc/acpi/wakeup, you may use the following
 tmpfile instead:
 
 
 /etc/tmpfiles.d/disable-usb-wake.conf
 
 
 w /proc/acpi/wakeup - - - - USBE
 
 The tmpfiles method is recommended in this case since systemd doesn't
 actually support /etc/rc.local.
 
 Does that means that I need to move all the content from /etc/rc.local to
 /etc/tmpfiles.d? For example this is my actual /etc/rc.local:
 ~ $ cat /etc/rc.local
 #!/bin/bash
 #
 # /etc/rc.local: Local multi-user startup script.
 #
 
 #modprobe radeon # added by hybrid-video-ati-intel install script
 #echo IGD  /sys/kernel/debug/vgaswitcheroo/switch # added by
 hybrid-video-ati-intel install script
 echo OFF  /sys/kernel/debug/vgaswitcheroo/switch # completely deactivate
 radeon
 
 ## ATi
 # Source: https://wiki.archlinux.org/index.php/ATI#Performance_tuning
 echo low  /sys/class/drm/card0/device/power_profile
 #echo profile  /sys/class/drm/card0/device/power_method
 echo dynpm  /sys/class/drm/card0/device/power_method
 echo OFF  /sys/kernel/debug/vgaswitcheroo/switch
 
 # CPUFREQ
 for i in 0 1 2 3; do cpufreq-set -c $i -g powersave; done  ## sets
 powersave cpufreq governor for all CPU cores
 #echo -n 90  /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
 echo -n 20  /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
 
 # Prepare the system for Wake-on-Lan
 /usr/sbin/ethtool -s eth0 wol pg
 
 # Activate laptop_mode
 echo 5  /proc/sys/vm/laptop_mode
 
 # Performance tweaks for USB drivers under KDE SC
 echo madvise  /sys/kernel/mm/transparent_hugepage/enabled
 echo madvise  /sys/kernel/mm/transparent_hugepage/defrag
 echo 0  /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
 
 
 If this is the case, how do you guys would convert the FOR loop!?
 

For ethtool, just create a separate service that executes that command.

Everything else you do is writing to /sys, so you can have one giant tmpfiles.d
file.

For the for loop:
w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - - - - powersave

Also, I don't think it's an error if the file doesn't exist, so you can just do
cpu0..cpu16 or whatever if you feel like.


Re: [arch-general] /etc/tmpfiles.d

2012-09-17 Thread Thomas Bächler
Am 17.09.2012 17:40, schrieb Martín Cigorraga:
 # CPUFREQ
 for i in 0 1 2 3; do cpufreq-set -c $i -g powersave; done  ## sets
 powersave cpufreq governor for all CPU cores
 #echo -n 90  /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
 echo -n 20  /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

Slightly off-topic, but you should really read this:
http://mjg59.livejournal.com/88608.html




signature.asc
Description: OpenPGP digital signature


Re: [arch-general] sleep + lid events + kde = new problem

2012-09-17 Thread hector acosta
I can confirm this, I started seeing this behavior about 2 months ago.
But in my case, it sometimes work, and sometimes doesn't whereas it
used to work flawlessly before.

--Héctor Acosta


On Mon, Sep 17, 2012 at 10:13 AM, mike cloaked mike.cloa...@gmail.com wrote:
 On Mon, Sep 17, 2012 at 3:11 PM, Genes MailLists li...@sapience.com wrote:

  Using fully updated testing repo - starting 'recently' - I notice that lid
 close no longer sleeps my laptop.

  Kde power is configured to sleep on lid close. If i click the menu and
 choose sleep manually - it sleeps fine - and subsequently wakes fine on
 lid-open.

  I can confirm with this little shell loop (left running and then close lid
 and reopen) that acpi shows lid is indeed closed:

 while [[ 1 == 1 ]]
 do
 cat /proc/acpi/button/lid/*/state
 sleep 1
 done
 state:  open
 state:  open
 state:  open
 state:  open
 state:  closed
 state:  closed
 state:  closed
 state:  closed
 state:  open
 state:  open


  So, it -seems- as if lid-event is not being passed along for some reason to
 the (kde) power management - or not being listened to.

  I have not yet switched to systemd - and I'm not sure which process is
 responsible for such events.

  It still happens with 3.5.4 kernel if that makes any difference.

  It is a W520 lenovo laptop.

  Anyone else notice similar - or can offer suggestions?

  Thanks.

 Does running acpi_listen and closing then reopening the lid gives an
 indication that the lid open/close is being seen - just to check if
 there is any switch failure?


 --
 mike c


Re: [arch-general] Proprietary nvidia driver for different kernels

2012-09-17 Thread Ralf Mardorf
I don't play computer games. Perhaps I'll render 3D videos or use Google
Earth. I'll give it a try and remove the proprietary driver. Watching
videos and editing videos must be possible for my needs too.

I was pissed off when the old nouveau driver didn't work for my machine
and some distros already dropped the nv driver.

If 3D should work with the kernel-rt, I don't need the standard kernel
anymore, resp. perhaps I'll keep a second kernel for emergency cases.

Hopefully the nouveau driver won't cause real-time issues. I guess I'll
run a jack midi latency test later or tomorrow.

 In any case it's nice to see that a opensource alternative to the
 closed nividia driver is available and working better all the time!

Unfortunately we only can use it until 21 December 2012 ;D.

Regards,
Ralf




Re: [arch-general] Proprietary nvidia driver for different kernels

2012-09-17 Thread Leonidas Spyropoulos
On 17 Sep 2012 18:46, Ralf Mardorf ralf.mard...@alice-dsl.net wrote:

 I don't play computer games.

  In any case it's nice to see that a opensource alternative to the
  closed nividia driver is available and working better all the time!

 Unfortunately we only can use it until 21 December 2012 ;D.


Unfortunately I have to use nvidia drivers for CUDA programming..

I might get a specific card just for the CUDA stuff and still load the
nouveau for xorg. I don't think its possible with just one GPU, is it?
Switching from nvidia to nouveau using the scripts in the wiki for now.

 Regards,
 Ralf




Re: [arch-general] sleep + lid events + kde = new problem

2012-09-17 Thread Genes MailLists

On 09/17/2012 11:13 AM, mike cloaked wrote:



Does running acpi_listen and closing then reopening the lid gives an
indication that the lid open/close is being seen - just to check if
there is any switch failure?




 Tried this - I note that acpid was not running and it is needed for 
acpi_listen - so I started it - closed lid and re-opened. (laptop did 
not sleep after starting acpid either). acpi_listen then reports:


% acpi_listen
button/lid LID close
button/lid LID open

gene/


Re: [arch-general] Proprietary nvidia driver for different kernels

2012-09-17 Thread Uros Vampl
Joakim Hernberg jbh at alchemy.lu writes:
 But I agree, it's a pain switching between nvidia and nouveau, but I'd
 be inclined to blame nvidia itself for that...:)

Not their fault. But nevertheless, they are the ones trying to fix it:

http://lists.freedesktop.org/archives/mesa-dev/2012-September/027295.html



Re: [arch-general] Proprietary nvidia driver for different kernels

2012-09-17 Thread Ralf Mardorf
On Mon, 2012-09-17 at 19:02 +0100, Leonidas Spyropoulos wrote:
 On 17 Sep 2012 18:46, Ralf Mardorf ralf.mard...@alice-dsl.net wrote:
 
  I don't play computer games.
 
   In any case it's nice to see that a opensource alternative to the
   closed nividia driver is available and working better all the time!
 
  Unfortunately we only can use it until 21 December 2012 ;D.
 
 
 Unfortunately I have to use nvidia drivers for CUDA programming..
 
 I might get a specific card just for the CUDA stuff and still load the
 nouveau for xorg. I don't think its possible with just one GPU, is it?
 Switching from nvidia to nouveau using the scripts in the wiki for now.

I don't know. Btw. I was switching between nv and nvidia for several
distros using a very primitive script:

$ cat /etc/rc.d/69switch_xorg.conf
#! /bin/sh
# /etc/rcS.d/Switch_xorg_conf

rm /etc/X11/xorg.conf
case $(uname -r) in
*rt*)
cp /etc/X11/xorg.conf.nv /etc/X11/xorg.conf
;;
*)
cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
;;
esac

At the moment nv is for nouveau.

I didn't know those scrips:
https://wiki.archlinux.org/index.php/NVIDIA#Switching_between_nvidia_and_nouveau_drivers

If I should use those scripts, I guess I would replace pacman -S, by
pacman -U to install always the versions I know as being stable for my
needs. Perhaps I only need nouveau, have no time to test it now, I'll
watch The Simpsons at the moment ... commercial break finished ...

Regards,
Ralf

Regards,
Ralf



Re: [arch-general] / mounted ro after update

2012-09-17 Thread David C. Rankin

On 09/15/2012 11:24 AM, P .NIKOLIC wrote:

Of course noone else will offer any assistance  will they  EH!

Pete .


Pete,

  You know me, I'm never quite to the ire of many, but I haven't a clue what 
you are dealing with here... Let us know what it ultimately turns out to be 
and if it is an issue with util-linux on Arch's end, file a report so it gets 
fixed before it bites me :)


--
David C. Rankin, J.D.,P.E.


[arch-general] Strange pacman problem with conflicting dependencies

2012-09-17 Thread Arthur Titeica
Hi

On a machine with a less frequent updating schedule (~once a month) I receive 
the following when doing pacman -Suy

-8-
# pacman -Suy
:: Synchronizing package databases...
 testing is up to date
 core is up to date
 extra is up to date
 community-testing is up to date
 community is up to date
 multilib-testing is up to date
 multilib is up to date
 archlinuxfr is up to date
 repo-ck is up to date
:: Starting full system upgrade...
warning: ffmpeg: ignoring package upgrade (20120509-1 = 1:0.11.1-1)
:: Replace virtualbox-additions with community-testing/virtualbox-iso-
additions? [Y/n] 
:: Replace virtualbox-modules with community-testing/virtualbox-host-modules? 
[Y/n] 
warning: x264: ignoring package upgrade (20120204-1 = 20120705-1)
resolving dependencies...
looking for inter-conflicts...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: virtualbox-host-modules and virtualbox-modules are in conflict
-8-

I didn't have any problems with the virtualbox replacements on another machine 
with daily updates.

If necessary the debug pacman log may be found at http://pastebin.com/9nh5tp9t

Thanks.

-- 
Arthur Titeica


Re: [arch-general] / mounted ro after update

2012-09-17 Thread German Cabarcas
I had a problem of this sort recently, due to my root partition being full,
so i went ahead and performed a:

# pacman -Sc

Before trying to update once again and things were rolling as normal back
again, hope it helps.

German C.


Re: [arch-general] /etc/tmpfiles.d

2012-09-17 Thread Curtis Shimamoto
On 09/17/12 at 10:31am, Matthew Monaco wrote:
 On 09/17/2012 09:40 AM, Mart?n Cigorraga wrote:
  [...]However, tmpfiles may also be used to write values into certain files
  on boot. For example, if you use /etc/rc.local to disable wakeup from USB
  devices with echo USBE  /proc/acpi/wakeup, you may use the following
  tmpfile instead:
  
  
  /etc/tmpfiles.d/disable-usb-wake.conf
  
  
  w /proc/acpi/wakeup - - - - USBE
  
  The tmpfiles method is recommended in this case since systemd doesn't
  actually support /etc/rc.local.
  
  Does that means that I need to move all the content from /etc/rc.local to
  /etc/tmpfiles.d? For example this is my actual /etc/rc.local:
  ~ $ cat /etc/rc.local
  #!/bin/bash
  #
  # /etc/rc.local: Local multi-user startup script.
  #
  
  #modprobe radeon # added by hybrid-video-ati-intel install script
  #echo IGD  /sys/kernel/debug/vgaswitcheroo/switch # added by
  hybrid-video-ati-intel install script
  echo OFF  /sys/kernel/debug/vgaswitcheroo/switch # completely deactivate
  radeon
  
  ## ATi
  # Source: https://wiki.archlinux.org/index.php/ATI#Performance_tuning
  echo low  /sys/class/drm/card0/device/power_profile
  #echo profile  /sys/class/drm/card0/device/power_method
  echo dynpm  /sys/class/drm/card0/device/power_method
  echo OFF  /sys/kernel/debug/vgaswitcheroo/switch
  
  # CPUFREQ
  for i in 0 1 2 3; do cpufreq-set -c $i -g powersave; done  ## sets
  powersave cpufreq governor for all CPU cores
  #echo -n 90  /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
  echo -n 20  /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
  
  # Prepare the system for Wake-on-Lan
  /usr/sbin/ethtool -s eth0 wol pg
  
  # Activate laptop_mode
  echo 5  /proc/sys/vm/laptop_mode
  
  # Performance tweaks for USB drivers under KDE SC
  echo madvise  /sys/kernel/mm/transparent_hugepage/enabled
  echo madvise  /sys/kernel/mm/transparent_hugepage/defrag
  echo 0  /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
  
  
  If this is the case, how do you guys would convert the FOR loop!?
  
 
 For ethtool, just create a separate service that executes that command.
 
 Everything else you do is writing to /sys, so you can have one giant 
 tmpfiles.d
 file.
 
 For the for loop:
 w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - - - powersave
 w /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - - - - powersave
 w /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - - - - powersave
 w /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - - - - powersave
 
 Also, I don't think it's an error if the file doesn't exist, so you can just 
 do
 cpu0..cpu16 or whatever if you feel like.

I am fairly certain that tmpfiles.d understands *, so you could
probably get away with one line for something like that.
-- 
Curtis Shimamoto
sugar.and.scru...@gmail.com


Re: [arch-general] /etc/tmpfiles.d

2012-09-17 Thread Matthew Monaco
On 09/17/2012 06:44 PM, Curtis Shimamoto wrote:
 On 09/17/12 at 10:31am, Matthew Monaco wrote:
 On 09/17/2012 09:40 AM, Mart?n Cigorraga wrote:
 [...]However, tmpfiles may also be used to write values into certain files
 on boot. For example, if you use /etc/rc.local to disable wakeup from USB
 devices with echo USBE  /proc/acpi/wakeup, you may use the following
 tmpfile instead:


 /etc/tmpfiles.d/disable-usb-wake.conf


 w /proc/acpi/wakeup - - - - USBE

 The tmpfiles method is recommended in this case since systemd doesn't
 actually support /etc/rc.local.

 Does that means that I need to move all the content from /etc/rc.local to
 /etc/tmpfiles.d? For example this is my actual /etc/rc.local:
 ~ $ cat /etc/rc.local
 #!/bin/bash
 #
 # /etc/rc.local: Local multi-user startup script.
 #

 #modprobe radeon # added by hybrid-video-ati-intel install script
 #echo IGD  /sys/kernel/debug/vgaswitcheroo/switch # added by
 hybrid-video-ati-intel install script
 echo OFF  /sys/kernel/debug/vgaswitcheroo/switch # completely deactivate
 radeon

 ## ATi
 # Source: https://wiki.archlinux.org/index.php/ATI#Performance_tuning
 echo low  /sys/class/drm/card0/device/power_profile
 #echo profile  /sys/class/drm/card0/device/power_method
 echo dynpm  /sys/class/drm/card0/device/power_method
 echo OFF  /sys/kernel/debug/vgaswitcheroo/switch

 # CPUFREQ
 for i in 0 1 2 3; do cpufreq-set -c $i -g powersave; done  ## sets
 powersave cpufreq governor for all CPU cores
 #echo -n 90  /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
 echo -n 20  /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

 # Prepare the system for Wake-on-Lan
 /usr/sbin/ethtool -s eth0 wol pg

 # Activate laptop_mode
 echo 5  /proc/sys/vm/laptop_mode

 # Performance tweaks for USB drivers under KDE SC
 echo madvise  /sys/kernel/mm/transparent_hugepage/enabled
 echo madvise  /sys/kernel/mm/transparent_hugepage/defrag
 echo 0  /sys/kernel/mm/transparent_hugepage/khugepaged/defrag


 If this is the case, how do you guys would convert the FOR loop!?


 For ethtool, just create a separate service that executes that command.

 Everything else you do is writing to /sys, so you can have one giant 
 tmpfiles.d
 file.

 For the for loop:
 w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - - - powersave
 w /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - - - - powersave
 w /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - - - - powersave
 w /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - - - - powersave

 Also, I don't think it's an error if the file doesn't exist, so you can just 
 do
 cpu0..cpu16 or whatever if you feel like.
 
 I am fairly certain that tmpfiles.d understands *, so you could
 probably get away with one line for something like that.
 

It doesn't for the 'w' type. Globbing is specified explicitly where it's
supported. I don't know if that was an explicit design decision though. You
might have yourself an easy patch if you want to contribute.


Re: [arch-general] sleep + lid events + kde = new problem

2012-09-17 Thread Genes MailLists


Seems other events have stopped being processed as well - e.g.

unplugging a/c and going to battery - laptop beeps - but screen no
longer dims -

Again - I can dim screen by hand by doing something like this:

  echo '11'  /sys/class/backlight/acpi_video0/brightness

This has been flaky a while but usually worked at least some of the time
- now its just not working period.

 I wonder if udev responsible for this? Looks like I upgraded systemd at
the end of last month to 189-4 ... seems unlikely it took me till last
weekend to notice this .. but I can be slow at times :-)

kde had a bunch of updates sep 4 (4.9.0 to 4.9.1).. again a week or so back

If anyone has suggestions how to get these working again would be
appreciated .. not fatal as I can do everything by hand but since things
used to work be ncie to get them working again.

gene