Re: [gentoo-user] Blue Fn Key Combinations not Sending Scancodes

2013-08-24 Thread joost
Randy Westlund rwest...@gmail.com wrote:
Hey guys,

I'm trying to make my blue Fn key combinations control by MPD server on
the Raspberry Pi sitting on my speakers.  This should be really easy
with xbindkeys.  I'm following this document:
http://www.gentoo-wiki.info/HOWTO_Use_Multimedia_Keys

The problem I have is that the Fn key combinations on my laptop aren't
all sending scancodes.  I understand that the Fn key itself doesn't
send a scancode.  I'm using Fn + Down Arrow (a blue play/pause symbol),
but xev doesn't register it.  Even when running showkey -s, I can't get
a scancode.

When I do Fn + F8 (a blue monitor symbol) I get the scancode 0xe0 0x56
0xe0 0xd6 so the key itself is working.  And I can use Fn + F1 (Zz) to
hibernate.

So I'm thinking the kernel isn't recognizing the scancode that the
keyboard is sending?  Does that sound right?  Is there something in the
kernel that I should change?  I didn't see anything that looked
relevant under keyboard drivers.

Randy

On an old laptop of mine I had to use ACPI to get the events from some of those.
This might be a similar situation.

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Re: [gentoo-user] Re: The NVIDIA/Kernel fiasco -- is it safe to sync yet?

2013-08-24 Thread Alan McKinnon
On 24/08/2013 06:26, Chris Stankevitz wrote:
 On Fri, Aug 23, 2013 at 9:12 PM, »Q« boxc...@gmx.net wrote:
 It looks like maybe the best way to tell which ebuilds support which
 kernels is to read the conditional for the ewarn message in each
 ebuild.
 
 If this sort of problem spreads it might be good to build into portage
 some kind of blocker/keyword mechanism so that users need not deal
 with this not that I have any appreciation for the work involved.

Those tools already exist.

Blockers, which do not really apply here;
elog messages




 
 http://www.gentoo.org/main/en/philosophy.xml
 
 The goal of Gentoo is to design tools and systems that allow a user to
 do that work as pleasantly and efficiently as possible, as they see
 fit. Our tools should be a joy to use, and should help the user to
 appreciate the richness of the Linux and free software community, and
 the flexibility of free software.
 
 Kind of funny... Gentoo's mandate is sort of at odds with itself.  A
 joy to use while simultaneously giving full flexibility.
 
 Chris
 


-- 
Alan McKinnon
alan.mckin...@gmail.com




[gentoo-user] Which cputime accounting for kernel-3.10.7 ?

2013-08-24 Thread Mick
Hi All,

I'm about to compile a new kernel and running oldconfig brings up this new set 
of options.  There is no help available, grep-ping through the Documentation 
wasn't particularly revealing and I haven't found anything in Google to help 
me decide what I need/want out of the three:
===

* CPU/Task time and stats accounting
*
Cputime accounting
  1. Simple tick based cputime accounting (TICK_CPU_ACCOUNTING)
 2. Full dynticks CPU time accounting (VIRT_CPU_ACCOUNTING_GEN) (NEW)
  3. Fine granularity task level IRQ time accounting (IRQ_TIME_ACCOUNTING)
choice[1-3]: ?

There is no help available for this option.
Prompt: Cputime accounting
  Location:
- General setup
  - CPU/Task time and stats accounting
  Defined at init/Kconfig:297
  Selected by: m
===

Option 2 seems to have been selected by default, but I am not sure if this is 
right for a laptop.

What have you chosen and why?

-- 
Regards,
Mick


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


[gentoo-user] Proxy server problem

2013-08-24 Thread Grant
I set up squid on a remote system so I can browse the internet from
that IP address.  It works but it stalls frequently.  I had similar
results with ziproxy.  I went over this with the squid list but we got
nowhere as it seems to be some kind of a system or network problem.

http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-3-3-5-hangs-the-entire-system-td4660893.html

Can anyone here help me figure out what is wrong?  I'm not sure where to start.

- Grant



Re: [gentoo-user] Proxy server problem

2013-08-24 Thread Mick
On Saturday 24 Aug 2013 10:47:53 Grant wrote:
 I set up squid on a remote system so I can browse the internet from
 that IP address.  It works but it stalls frequently.  I had similar
 results with ziproxy.  I went over this with the squid list but we got
 nowhere as it seems to be some kind of a system or network problem.
 
 http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-3-3-5-hangs-the-en
 tire-system-td4660893.html
 
 Can anyone here help me figure out what is wrong?  I'm not sure where to
 start.
 
 - Grant

Just a quick pointer in case it applies to you:  if you tunnel into the proxy 
machine (using ssh, VPN, proxychains and what not) you would suffer from 
packet fragmentation, which could quickly snowball.  In this case try reducing 
your mtu to lower values, than the default ethernet 1500 byte packets, to 
cater for the overhead of the larger tunnelling headers.

HTH.
-- 
Regards,
Mick


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


Re: [gentoo-user] Which cputime accounting for kernel-3.10.7 ?

2013-08-24 Thread Bruce Hill
On Sat, Aug 24, 2013 at 10:40:25AM +0100, Mick wrote:
 Hi All,
 
 I'm about to compile a new kernel and running oldconfig brings up this new 
 set 
 of options.  There is no help available, grep-ping through the Documentation 
 wasn't particularly revealing and I haven't found anything in Google to help 
 me decide what I need/want out of the three:
 ===
 
 * CPU/Task time and stats accounting
 *
 Cputime accounting
   1. Simple tick based cputime accounting (TICK_CPU_ACCOUNTING)
  2. Full dynticks CPU time accounting (VIRT_CPU_ACCOUNTING_GEN) (NEW)
   3. Fine granularity task level IRQ time accounting (IRQ_TIME_ACCOUNTING)
 choice[1-3]: ?
 
 There is no help available for this option.
 Prompt: Cputime accounting
   Location:
 - General setup
   - CPU/Task time and stats accounting
   Defined at init/Kconfig:297
   Selected by: m
 ===
 
 Option 2 seems to have been selected by default, but I am not sure if this is 
 right for a laptop.
 
 What have you chosen and why?
 
 -- 
 Regards,
 Mick

Each of the three options has it's own individual help.
-- 
Happy Penguin Computers   ')
126 Fenco Drive   ( \
Tupelo, MS 38801   ^^
supp...@happypenguincomputers.com
662-269-2706 662-205-6424
http://happypenguincomputers.com/

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting



Re: [gentoo-user] Re: Advice needed regarding udisks

2013-08-24 Thread Samuli Suominen

On 24/08/13 08:39, Grant wrote:

Just saying you should be using `udisksctl` command instead of the now
obsolete `udisks` command

udisksctl command = new udisks 2
udisks command = old udisks 1


OK, but first I need to figure out how to get gvfs to use udisks instead
of gdu.


by emerging gnome-base/gvfs from ~arch with USE=udev udisks

the stable gnome-base/gvfs is not compatible with UDisks 2.1

but by upgrading gnome-base/gvfs on stable to ~arch version with USE=udev
udisks is then again not compatible all the way with GNOME 2.x, so that's
why it's still in ~arch


If I keyword gvfs I get into trouble because gobject-introspection
wants dev-libs/glib-2.33 and gvfs wants =dev-libs/glib-2.36.

- Grant



So?

Obviously I meant to say 'keyword gvfs *and it's dependencies* from 
~arch if you want to use USE=udev udisks'


So that means bunch gobject-introspection, gobject-introspection-common, 
glib, and likely some others too, Portage will them you about them




Re: [gentoo-user] Which cputime accounting for kernel-3.10.7 ?

2013-08-24 Thread Mick
On Saturday 24 Aug 2013 12:14:14 Bruce Hill wrote:
 On Sat, Aug 24, 2013 at 10:40:25AM +0100, Mick wrote:
  Hi All,
  
  I'm about to compile a new kernel and running oldconfig brings up this
  new set of options.  There is no help available, grep-ping through the
  Documentation wasn't particularly revealing and I haven't found anything
  in Google to help me decide what I need/want out of the three:
  ===
  
  * CPU/Task time and stats accounting
  *
  Cputime accounting
  
1. Simple tick based cputime accounting (TICK_CPU_ACCOUNTING)

   2. Full dynticks CPU time accounting (VIRT_CPU_ACCOUNTING_GEN) (NEW)
   
3. Fine granularity task level IRQ time accounting
(IRQ_TIME_ACCOUNTING)
  
  choice[1-3]: ?
  
  There is no help available for this option.
  Prompt: Cputime accounting
  
Location:
  - General setup
  
- CPU/Task time and stats accounting

Defined at init/Kconfig:297
Selected by: m
  
  ===
  
  Option 2 seems to have been selected by default, but I am not sure if
  this is right for a laptop.
  
  What have you chosen and why?
 
 Each of the three options has it's own individual help.

Oops!  Thanks for pointing this out and sorry for the noise ... I had only 
tried ? instead of option_number ?

Help is also visible and available when using menuconfig.

The 2nd option is best for my needs.
-- 
Regards,
Mick


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


Re: [gentoo-user] Re: Advice needed regarding udisks

2013-08-24 Thread Grant
 Just saying you should be using `udisksctl` command instead of the now
 obsolete `udisks` command

 udisksctl command = new udisks 2
 udisks command = old udisks 1


 OK, but first I need to figure out how to get gvfs to use udisks instead
 of gdu.


 by emerging gnome-base/gvfs from ~arch with USE=udev udisks

 the stable gnome-base/gvfs is not compatible with UDisks 2.1

 but by upgrading gnome-base/gvfs on stable to ~arch version with
 USE=udev
 udisks is then again not compatible all the way with GNOME 2.x, so
 that's
 why it's still in ~arch


 If I keyword gvfs I get into trouble because gobject-introspection
 wants dev-libs/glib-2.33 and gvfs wants =dev-libs/glib-2.36.


 So?

 Obviously I meant to say 'keyword gvfs *and it's dependencies* from ~arch if
 you want to use USE=udev udisks'

The above glib dependencies are circular.  There is no way to satisfy them both.

- Grant



Re: [gentoo-user] Re: Advice needed regarding udisks

2013-08-24 Thread Marc Joliet
Am Sat, 24 Aug 2013 05:43:39 -0700
schrieb Grant emailgr...@gmail.com:

[...]
  If I keyword gvfs I get into trouble because gobject-introspection
  wants dev-libs/glib-2.33 and gvfs wants =dev-libs/glib-2.36.
 
 
  So?
 
  Obviously I meant to say 'keyword gvfs *and it's dependencies* from ~arch if
  you want to use USE=udev udisks'
 
 The above glib dependencies are circular.  There is no way to satisfy them 
 both.
 
 - Grant

Samuli means this:

$ grep dev-libs/glib /usr/portage/dev-libs/gobject-introspection/*.ebuild 
/usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.32.1.ebuild:
=dev-libs/glib-2.31.22:2
/usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.32.1.ebuild:
dev-libs/glib-2.33:2
/usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.34.2-r1.ebuild:
 =dev-libs/glib-2.34.1:2
/usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.36.0.ebuild:
=dev-libs/glib-2.36:2

So you need =gobject-introspection-1.34.2 to satisfy the dependencies.

HTH
-- 
Marc Joliet
--
People who think they know everything really annoy those of us who know we
don't - Bjarne Stroustrup


signature.asc
Description: PGP signature


Re: [gentoo-user] Proxy server problem

2013-08-24 Thread Grant
 I set up squid on a remote system so I can browse the internet from
 that IP address.  It works but it stalls frequently.  I had similar
 results with ziproxy.  I went over this with the squid list but we got
 nowhere as it seems to be some kind of a system or network problem.

 http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-3-3-5-hangs-the-en
 tire-system-td4660893.html

 Can anyone here help me figure out what is wrong?  I'm not sure where to
 start.

 - Grant

 Just a quick pointer in case it applies to you:  if you tunnel into the proxy
 machine (using ssh, VPN, proxychains and what not) you would suffer from
 packet fragmentation, which could quickly snowball.  In this case try reducing
 your mtu to lower values, than the default ethernet 1500 byte packets, to
 cater for the overhead of the larger tunnelling headers.

I've tried disconnecting from my SSH tunnel and changing the mtu on my
laptop and on the remote proxy server via ifconfig and there is some
kind of an improvement but I can't narrow it down.  I've tried mtu
down to 1000 on both systems but the proxy server still stalls
sometimes.  Any tips for narrowing this down further?

- Grant



Re: [gentoo-user] Re: Advice needed regarding udisks

2013-08-24 Thread Grant
 [...]
  If I keyword gvfs I get into trouble because gobject-introspection
  wants dev-libs/glib-2.33 and gvfs wants =dev-libs/glib-2.36.
 
 
  So?
 
  Obviously I meant to say 'keyword gvfs *and it's dependencies* from ~arch 
  if
  you want to use USE=udev udisks'

 The above glib dependencies are circular.  There is no way to satisfy them 
 both.

 - Grant

 Samuli means this:

 $ grep dev-libs/glib /usr/portage/dev-libs/gobject-introspection/*.ebuild
 /usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.32.1.ebuild:
 =dev-libs/glib-2.31.22:2
 /usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.32.1.ebuild:
 dev-libs/glib-2.33:2
 /usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.34.2-r1.ebuild:
  =dev-libs/glib-2.34.1:2
 /usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.36.0.ebuild:
 =dev-libs/glib-2.36:2

 So you need =gobject-introspection-1.34.2 to satisfy the dependencies.

OK, I was able to do this and ultimately emerge udisks-2 with
USE=-gdu udisks if I un-emerged gobject-introspection first.  I
won't know if this fixed my original problem for a few days but I will
report back.  Thank you everyone for sticking with me on this.

- Grant



Re: [gentoo-user] [SOLVED] evince / firefox will not print to a specific directory

2013-08-24 Thread Joseph
OK I fixed it, it was a problem with gtk+-2.24.17 
upgrade to gtk+-2.24.19

see the bug:
https://bugs.gentoo.org/show_bug.cgi?id=474328

--
Joseph

On 08/23/13 17:22, Willie wrote:

  That is interesting. I have the exact same problem. Tried to save it to
  the desktop and it saved to my home directory.On the second try I typed
  in the directory that I wanted to save the file. Instead of
  output.pdf, I put /home/ill/Desktop/output.pdf.
  It's not a fix but it works.

  On Fri, Aug 23, 2013 at 1:43 PM, Joseph [1]syscon...@gmail.com wrote:

When I try to print to PDF with evince or firefox it will not print
pdf file to a directory I specify only to my home directory.
Does anybody know what to look for? It just happen after recent
upgrade.
--
Joseph




Re: [gentoo-user] startx with multiple window managers

2013-08-24 Thread Willie WY Wong
On Fri, Aug 23, 2013 at 01:39:45PM -0400, Penguin Lover Randy Westlund squawked:
 - log in
 - startx
 - login on tty2
 - edit .xinitrc (shown below)
 - startx -- :1
 
 .xinitrc goes from:
 
  exec xmonad
  #exec startxfce4
 
 to:
  #exec xmonad
  exec startxfce4
 
 Then I can switch between tty7 and tty8 at will.  Usually I don't start xfce 
 at all, but for the times when I do, I'd be nice to do this without editing a 
 file.  Can I simplify this process?  Is there anyone else who uses multiple 
 WMs?  How do you manage them?

If you use xinit instead of startx, you can use the environmental
variable

~ $ XINITRC=.xinitrc-xmonad xinit -- :1 

should do what you want. Just keep the two different versions of
.xinitrc-xmonad and .xinitrc-xfce and use aliases if you don't want
too much typing. 

W
-- 
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
 et vice versa   ~~~  I. Newton



Re: [gentoo-user] Proxy server problem

2013-08-24 Thread Mick
On Saturday 24 Aug 2013 14:23:26 Grant wrote:
  I set up squid on a remote system so I can browse the internet from
  that IP address.  It works but it stalls frequently.  I had similar
  results with ziproxy.  I went over this with the squid list but we got
  nowhere as it seems to be some kind of a system or network problem.
  
  http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-3-3-5-hangs-the
  -en tire-system-td4660893.html
  
  Can anyone here help me figure out what is wrong?  I'm not sure where to
  start.
  
  - Grant
  
  Just a quick pointer in case it applies to you:  if you tunnel into the
  proxy machine (using ssh, VPN, proxychains and what not) you would
  suffer from packet fragmentation, which could quickly snowball.  In this
  case try reducing your mtu to lower values, than the default ethernet
  1500 byte packets, to cater for the overhead of the larger tunnelling
  headers.
 
 I've tried disconnecting from my SSH tunnel and changing the mtu on my
 laptop and on the remote proxy server via ifconfig and there is some
 kind of an improvement but I can't narrow it down.  I've tried mtu
 down to 1000 on both systems but the proxy server still stalls
 sometimes.  Any tips for narrowing this down further?
 
 - Grant

Now that you mentioned using ssh, I don't think that you can improve this.  An 
mtu at 1000 bytes is lower than I thought might have helped.  The problem is 
caused by stacking tcp packets (tcp within tcp) each of which is using its own 
timeout for failed fragments.

The problem is explained here (tcp meltdown):

  http://sites.inka.de/~W1011/devel/tcp-tcp.html

and here (useful relevant references to other works are also made):

  http://publications.lib.chalmers.se/records/fulltext/123799.pdf


There are some suggested solutions like increasing buffer size, but I don't 
know this might work in a real world use case.  You can experiment with 
different buffer sizes as suggested here and see if it makes a difference:

   http://www.cyberciti.biz/faq/linux-tcp-tuning/


If the interruptions are not acceptable to you, you could consider using a 
different tunnel method.  A network layer VPN, like IPSec (you can use 
StrongSwan which also offers IKEv2 and MOBIKE for your laptop, or ipsec-tools 
with racoon for IKEv1 only) should work without such problems.  You will be 
tunnelling tcp in udp packets.  If you tunnel to your home router you will 
need to configure an IPSec tunnel mode connection, otherwise you would use an 
IPSec transport mode connection directly to your server after you allow IP 
protocol 50 packets through your router.

HTH.
-- 
Regards,
Mick


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


[gentoo-user] Re: The NVIDIA/Kernel fiasco -- is it safe to sync yet?

2013-08-24 Thread »Q«
On Sat, 24 Aug 2013 09:49:43 +0200
Alan McKinnon alan.mckin...@gmail.com wrote:

 On 24/08/2013 06:26, Chris Stankevitz wrote:
  On Fri, Aug 23, 2013 at 9:12 PM, »Q« boxc...@gmx.net wrote:  
  It looks like maybe the best way to tell which ebuilds support
  which kernels is to read the conditional for the ewarn message in
  each ebuild.  
  
  If this sort of problem spreads it might be good to build into
  portage some kind of blocker/keyword mechanism so that users need
  not deal with this not that I have any appreciation for the
  work involved.  
 
 Those tools already exist.
 
 Blockers, which do not really apply here;

In a comment on the bug (which is full of bugspam), someone suggested
blocking kernels which are incompatible with the currently-installed
nvidia-drivers.  I'm glad that idea was dismissed.

 elog messages

Those elog messages are presented after compiling a new kernel and then
trying and failing to compile nvidia-drivers.  So now I grep the
nvidia-drivers ebuilds for the messages before I compile a new kernel.

A wiki page with info about which nvidia-drivers will build against
which kernels would be a nice thing to have.





[gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how?

2013-08-24 Thread meino . cramer
Hi,

There are two RTCs in my system:
/dev/rtc0 and /dev/rtc1

rtc0 is not powered by a battery and forgets time/date
with system shutdown and rtc1 is a I2C-rtc (DS3231) which
is powered by a battery. It is extremly accurate in comparison
with rtc0.

rtc0 is accessible with system boot - rtc1 is not (current state).

To make rtc1 completly know to the system, I have to do a 
echo ds3231 0x68 ! /sys/bus/i2c/devices/i2c-1/new_device
hwclock -f /dev/rtc1 -s
in beforehand.

I wrote a script for /etc/init.d, which does exactly this, and 
the system login screen shows the correct tome/date information
even without ntp-client (the system should become independantly
from lan/internet). The script was added to the boot service 
and executed after dev and modules.

The kernel is configured to use /dev/rtc1 and the driver for the
ds1307, which also handles the ds3231, is included into the kernel
(no module).

But it seems, that setting the system time this way is too late,
since there are still (for example) log files under /var/log
with a timestamp of the 1.1.1970.

Are there any other way to make rtc1 known and accessible earlier 
to the system as the hack via a script in /etc/init.d ?

Thank you very much in advance for any help!
Best regards,
mcc






Re: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how?

2013-08-24 Thread Mark David Dumlao
Which runlevel did you put your script on?
You probably want it on sysinit, rather than default.

Also, you can put rc_before= and rc_after= in the corresponding
/etc/conf.d/ file and make sure it runs before your syslog but after
your sysfs.

On Sun, Aug 25, 2013 at 12:04 PM,  meino.cra...@gmx.de wrote:
 Hi,

 There are two RTCs in my system:
 /dev/rtc0 and /dev/rtc1

 rtc0 is not powered by a battery and forgets time/date
 with system shutdown and rtc1 is a I2C-rtc (DS3231) which
 is powered by a battery. It is extremly accurate in comparison
 with rtc0.

 rtc0 is accessible with system boot - rtc1 is not (current state).

 To make rtc1 completly know to the system, I have to do a
 echo ds3231 0x68 ! /sys/bus/i2c/devices/i2c-1/new_device
 hwclock -f /dev/rtc1 -s
 in beforehand.

 I wrote a script for /etc/init.d, which does exactly this, and
 the system login screen shows the correct tome/date information
 even without ntp-client (the system should become independantly
 from lan/internet). The script was added to the boot service
 and executed after dev and modules.

 The kernel is configured to use /dev/rtc1 and the driver for the
 ds1307, which also handles the ds3231, is included into the kernel
 (no module).

 But it seems, that setting the system time this way is too late,
 since there are still (for example) log files under /var/log
 with a timestamp of the 1.1.1970.

 Are there any other way to make rtc1 known and accessible earlier
 to the system as the hack via a script in /etc/init.d ?

 Thank you very much in advance for any help!
 Best regards,
 mcc







-- 
This email is:[ ] actionable   [ ] fyi[ ] social
Response needed:  [ ] yes  [ ] up to you  [ ] no
Time-sensitive:   [ ] immediate[ ] soon   [ ] none



Re: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how?

2013-08-24 Thread William Kenworthy
or if you have an initramfs do it there before control is passed to the
OS.  You may also be able to set rtc0 to the current time in the
initramfs as well.

BillK



On 25/08/13 12:18, Mark David Dumlao wrote:
 Which runlevel did you put your script on?
 You probably want it on sysinit, rather than default.
 
 Also, you can put rc_before= and rc_after= in the corresponding
 /etc/conf.d/ file and make sure it runs before your syslog but after
 your sysfs.
 
 On Sun, Aug 25, 2013 at 12:04 PM,  meino.cra...@gmx.de wrote:
 Hi,

 There are two RTCs in my system:
 /dev/rtc0 and /dev/rtc1

 rtc0 is not powered by a battery and forgets time/date
 with system shutdown and rtc1 is a I2C-rtc (DS3231) which
 is powered by a battery. It is extremly accurate in comparison
 with rtc0.

 rtc0 is accessible with system boot - rtc1 is not (current state).

 To make rtc1 completly know to the system, I have to do a
 echo ds3231 0x68 ! /sys/bus/i2c/devices/i2c-1/new_device
 hwclock -f /dev/rtc1 -s
 in beforehand.

 I wrote a script for /etc/init.d, which does exactly this, and
 the system login screen shows the correct tome/date information
 even without ntp-client (the system should become independantly
 from lan/internet). The script was added to the boot service
 and executed after dev and modules.

 The kernel is configured to use /dev/rtc1 and the driver for the
 ds1307, which also handles the ds3231, is included into the kernel
 (no module).

 But it seems, that setting the system time this way is too late,
 since there are still (for example) log files under /var/log
 with a timestamp of the 1.1.1970.

 Are there any other way to make rtc1 known and accessible earlier
 to the system as the hack via a script in /etc/init.d ?

 Thank you very much in advance for any help!
 Best regards,
 mcc




 
 
 




Re: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how?

2013-08-24 Thread meino . cramer
William Kenworthy bi...@iinet.net.au [13-08-25 06:32]:
 or if you have an initramfs do it there before control is passed to the
 OS.  You may also be able to set rtc0 to the current time in the
 initramfs as well.
 
 BillK
 
 
 
 On 25/08/13 12:18, Mark David Dumlao wrote:
  Which runlevel did you put your script on?
  You probably want it on sysinit, rather than default.
  
  Also, you can put rc_before= and rc_after= in the corresponding
  /etc/conf.d/ file and make sure it runs before your syslog but after
  your sysfs.
  
  On Sun, Aug 25, 2013 at 12:04 PM,  meino.cra...@gmx.de wrote:
  Hi,
 
  There are two RTCs in my system:
  /dev/rtc0 and /dev/rtc1
 
  rtc0 is not powered by a battery and forgets time/date
  with system shutdown and rtc1 is a I2C-rtc (DS3231) which
  is powered by a battery. It is extremly accurate in comparison
  with rtc0.
 
  rtc0 is accessible with system boot - rtc1 is not (current state).
 
  To make rtc1 completly know to the system, I have to do a
  echo ds3231 0x68 ! /sys/bus/i2c/devices/i2c-1/new_device
  hwclock -f /dev/rtc1 -s
  in beforehand.
 
  I wrote a script for /etc/init.d, which does exactly this, and
  the system login screen shows the correct tome/date information
  even without ntp-client (the system should become independantly
  from lan/internet). The script was added to the boot service
  and executed after dev and modules.
 
  The kernel is configured to use /dev/rtc1 and the driver for the
  ds1307, which also handles the ds3231, is included into the kernel
  (no module).
 
  But it seems, that setting the system time this way is too late,
  since there are still (for example) log files under /var/log
  with a timestamp of the 1.1.1970.
 
  Are there any other way to make rtc1 known and accessible earlier
  to the system as the hack via a script in /etc/init.d ?
 
  Thank you very much in advance for any help!
  Best regards,
  mcc
 
 
 
 
  
  
  
 
 

Hi Mark, hi William,

the script ds3231 in /etc/init.d is -- according to rc-update --
set as folows:

   ds3231 | boot 

There is no corresponding file in /etc/conf.d since the script
onlu consist of two commands (see previous posting). There is no
initramfs.

Since hwclock needs /dev/rtc1 to work, the script cannot be executed
before /dev/. is up.

Is there an text/tutorial/... or such somewhere on the net, which
shows the sequence, in which the usual services/scripts in /etc/init.d 
get started/executed while the system boots?

Best regads,
mcc