Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Any iio sensor proxy alternative for openrc?[SOLVED]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
20 posts • Page 1 of 1
Author
Message
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

Any iio sensor proxy alternative for openrc?[SOLVED]

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 3:03 am

iio sensor proxy is dependent of systemd and I couldn't find an alternative, how can I make the sensors work in gnome?
Last edited by Anroch2020 on Sun Jun 21, 2020 11:46 pm, edited 1 time in total.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 3:11 pm

Bastien Nocera, is it any wonder... As far as I can tell looking at the source repository, all the package wants from systemd is its .pc file, to know where to put its service unit file. It can probably be coerced into working with OpenRC by patching its configure.ac file and udev rule, and writing an OpenRC service script for the iio-sensor-proxy program. Gentoo does not have this package, were you intending to install it from source, or what?
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 3:43 pm

GDH-gentoo wrote:Bastien Nocera, is it any wonder... As far as I can tell looking at the source repository, all the package wants from systemd is its .pc file, to know where to put its service unit file. It can probably be coerced into working with OpenRC by patching its configure.ac file and udev rule, and writing an OpenRC service script for the iio-sensor-proxy program. Gentoo does not have this package, were you intending to install it from source, or what?
Yes from source, https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/ this package is necessary for the screenrotation and ambient light functions in gnome
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 5:17 pm

If you want do a little test, apply this patch in the package's source directory (assuming you are building iio-sensor-proxy-3.0).

remove-systemd-build-dep.patch

Code: Select all

--- configure.ac	2020-03-23 07:06:06.000000000 -0300
+++ configure.ac	2020-06-21 14:04:26.381164850 -0300
@@ -32,11 +32,10 @@
 	    [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"])
 AC_SUBST([udevrulesdir], [$with_udevrulesdir])
 
-PKG_CHECK_EXISTS(systemd, [], [AC_MSG_ERROR(systemd development libraries are required)])
 AC_ARG_WITH([systemdsystemunitdir],
 	    AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
 	    [],
-	    [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+	    [with_systemdsystemunitdir=/lib/systemd/system])
 if test x$with_systemdsystemunitdir != xno; then
 	AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
 fi

Code: Select all

$ patch <remove-systemd-build-dep.patch 
patching file configure.ac

$ autoreconf -v
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal 
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: configure.ac: not using Libtool
autoreconf-2.69: running: /usr/bin/autoconf-2.69
autoreconf-2.69: configure.ac: not using Autoheader
autoreconf-2.69: running: automake --no-force
docs/Makefile.am:51: warning: EXTRA_DIST multiply defined in condition TRUE ...
gtk-doc.make:51: ... 'EXTRA_DIST' previously defined here
docs/Makefile.am:49:   'gtk-doc.make' included from here
src/Makefile.am:5: warning: shell glib-compile-resources --sourcedir=$(srcdir: non-POSIX variable name
src/Makefile.am:5: (probably a GNU make extension)
autoreconf-2.69: Leaving directory `.'
And see if it builds. This should make the build system install the service unit file in /lib/systemd/system (Gentoo's default without systemd). The location can be changed by passing a --with-systemdsystemunitdir option to the configure script.
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 5:44 pm

And see if it builds. This should make the build system install the service unit file in /lib/systemd/system (Gentoo's default without systemd). The location can be changed by passing a --with-systemdsystemunitdir option to the configure script.
The patch fail

Code: Select all

patching file configure.ac
Hunk #1 FAILED at 32.
1 out of 1 hunk FAILED -- saving rejects to file configure.ac.rej
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 5:58 pm

Anroch2020 wrote:The patch fail

Code: Select all

patching file configure.ac
Hunk #1 FAILED at 32.
1 out of 1 hunk FAILED -- saving rejects to file configure.ac.rej
Check that indented lines really have a TAB character after the first character (a space or a '-', depending on the line), followed by 4 spaces. Copy & paste from the forum might have messed whitespace characters.
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 6:48 pm

Check that indented lines really have a TAB character after the first character (a space or a '-', depending on the line), followed by 4 spaces. Copy & paste from the forum might have messed whitespace characters.
This output is ok?

Code: Select all

patch
patching file configure.ac
Hunk #1 succeeded at 32 with fuzz 2.
Top
Hu
Administrator
Administrator
Posts: 24386
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jun 21, 2020 6:55 pm

Yes. Fuzz indicates that the lines were not found at precisely the planned offset, but that the patch was close enough and was applied. This often means that the version you patched is not exactly the version that the patch author started from. In some cases, particularly when the area to patch is repeated in the target file, a fuzz-apply can mean that the patch was applied incorrectly. For the context shown for this patch, I doubt that patch could get it wrong and still report success. Please try it out and report whether it works for you.
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 7:41 pm

Hu wrote:Yes. Fuzz indicates that the lines were not found at precisely the planned offset, but that the patch was close enough and was applied. This often means that the version you patched is not exactly the version that the patch author started from. In some cases, particularly when the area to patch is repeated in the target file, a fuzz-apply can mean that the patch was applied incorrectly. For the context shown for this patch, I doubt that patch could get it wrong and still report success. Please try it out and report whether it works for you.
Sucesfully builded and installed but the sensor dont work, Is it possible that I have forgotten some parameter in the kernel?
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 8:02 pm

Anroch2020 wrote:Sucesfully builded and installed but the sensor dont work, Is it possible that I have forgotten some parameter in the kernel?
Haha, too greedy. The test was just to see if the package would build, i.e. if the dependency on systemd was superfluous. Nothing will work until there is an OpenRC service script to start the service. That has to be written, because the package only provides a systemd service unit file.
Last edited by GDH-gentoo on Sun Jun 21, 2020 8:17 pm, edited 2 times in total.
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 8:12 pm

The test was just to see if the package would build, i.e. if the dependency on systemd was superfluous. Nothing will work until there is an OpenRC service script to start the service. That has to be written, because the package only provides a systemd service unit file.
::lol: :lol: This is the systemd service right?

Code: Select all

[Unit]
Description=IIO Sensor Proxy service

[Service]
Type=dbus
BusName=net.hadess.SensorProxy
ExecStart=/usr/sbin/iio-sensor-proxy
#Uncomment this to enable debug
#Environment="G_MESSAGES_DEBUG=all"

# Lockdown
ProtectSystem=strict
ProtectControlGroups=true
ProtectHome=true
ProtectKernelModules=true
PrivateTmp=true
RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_NETLINK
MemoryDenyWriteExecute=true
RestrictRealtime=true
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 8:18 pm

Exactly. Was file 80-iio-sensor-proxy.rules installed in /lib/udev/rules.d, and file net.hadess.SensorProxy.conf installed in /etc/dbus-1/system.d?
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 8:26 pm

GDH-gentoo wrote:Exactly. Was file 80-iio-sensor-proxy.rules installed in /lib/udev/rules.d, and file net.hadess.SensorProxy.conf installed in /etc/dbus-1/system.d?
Yes
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 8:57 pm

OK. When running systemd, what supposedly happens is that the udev rule adds a "systemd" tag to all sensors that match, systemd sees that and creates a device unit for them, with a "Wants=" dependency on the service unit. This autostarts the iio-sensor-proxy daemon.

Now the following is totally untested, because I lack the required hardware. Try at your own risk, you've been warned :)

You could start the daemon unconditionally, regardless of whether there is any relevant hardware, and obviously without everything that systemd does when it sees the directives that are listed after the "# Lockdown" comment, by adding the following service to the default runlevel:

/etc/init.d/iio-sensor-proxy

Code: Select all

#!/sbin/openrc-run

command=iio-sensor-proxy
command_background=yes
pidfile=/run/iio-sensor-proxy.pid

depend() {
	need dbus localmount
}

Code: Select all

# rc-update add iio-sensor-proxy default
You probably need to reboot to redo the coldplug sequence, and start the service.
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 9:16 pm

GDH-gentoo wrote:OK. When running systemd, what supposedly happens is that the udev rule adds a "systemd" tag to all sensors that match, systemd sees that and creates a device unit for them, with a "Wants=" dependency on the service unit. This autostarts the iio-sensor-proxy daemon.

Now the following is totally untested, because I lack the required hardware.

You could start the daemon unconditionally, regardless of whether there is any relevant hardware, and obviously without everything that systemd does when it sees the directives that are listed after the "# Lockdown" comment, by adding the following service to the default runlevel:

/etc/init.d/iio-sensor-proxy

Code: Select all

#!/sbin/openrc-run

command=iio-sensor-proxy
command_background=yes
pidfile=/run/iio-sensor-proxy.pid

depend() {
	need dbus localmount
}

Code: Select all

# rc-update add iio-sensor-proxy default
You probably need to reboot to redo the coldplug sequence, and start the service.
I rebooted and the sensors not work, cheking rc-status the service apparently is crashed

Code: Select all

Runlevel: default
 dbus                                                              [  started  ]
 NetworkManager                                                    [  started  ]
 sysklogd                                                          [  started  ]
 acpid                                                             [  started  ]
 netmount                                                          [  started  ]
 xdm                                                               [  started  ]
 alsasound                                                         [  started  ]
 bluetooth                                                         [  started  ]
 cronie                                                            [  started  ]
 firewalld                                                         [  started  ]
 iio-sensor-proxy                                                  [  crashed  ]
 laptop_mode                                                       [  started  ]
 thermald                                                          [  started  ]
 vmware                                                            [  started  ]
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 xdm-setup                                                         [  started  ]
Dynamic Runlevel: manual
 openrc-settingsd                                                  [  started  ]
I restarted the service and this is the output

Code: Select all

$ sudo rc-service -v iio-sensor-proxy restart
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/iio-sensor-proxy stop
 * Stopping iio-sensor-proxy ...
 * Will stop iio-sensor-proxy
 * Will stop PID 12595
 * Will stop processes of `iio-sensor-proxy'
 * start-stop-daemon: no matching processes found                         [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/iio-sensor-proxy start
 * Starting iio-sensor-proxy ...
 * start-stop-daemon: fopen `/run/iio-sensor-proxy.pid': No such file or directory
 * Detaching to start `iio-sensor-proxy' ...                              [ ok ]
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 10:32 pm

Oh, the daemon is exiting, apparently. Try this service script:

/etc/init.d/iio-sensor-proxy

Code: Select all

#!/sbin/openrc-run

command=iio-sensor-proxy
command_background=yes
pidfile=/run/iio-sensor-proxy.pid
output_log=/var/log/iio-sensor-proxy-stdout.log
error_log=/var/log/iio-sensor-proxy-stderr.log
export G_MESSAGES_DEBUG=all

depend() {
	need dbus localmount
}
This should create logs in files /var/log/iio-sensor-proxy-stdout.log and /var/log/iio-sensor-proxy-stderr.log when the service is started or restarted and then crashes, and should make them verbose. Then post the contents of these files.
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 10:52 pm

GDH-gentoo wrote:Oh, the daemon is exiting, apparently. Try this service script:

/etc/init.d/iio-sensor-proxy

Code: Select all

#!/sbin/openrc-run

command=iio-sensor-proxy
command_background=yes
pidfile=/run/iio-sensor-proxy.pid
output_log=/var/log/iio-sensor-proxy-stdout.log
error_log=/var/log/iio-sensor-proxy-stderr.log
export G_MESSAGES_DEBUG=all

depend() {
	need dbus localmount
}
This should create logs in files /var/log/iio-sensor-proxy-stdout.log and /var/log/iio-sensor-proxy-stderr.log when the service is started or restarted and then crashes, and should make them verbose. Then post the contents of these files.
Its working now!, thanks for helping me without your help I would have gone back to systemd
I don't know if it was the new script or if it because i enabled all the hid sensors in the kernel
This is a bit of the debug output

Code: Select all

/var/log/iio-sensor-proxy-stdout.log
** (process:4770): DEBUG: 16:39:19.303: Found IIO poll als at /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200041.9.auto/iio:device5
** (process:4770): DEBUG: 16:39:19.303: Found device /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200041.9.auto/iio:device5 of type ambient light sensor at IIO Polling Light sensor
** (process:4770): DEBUG: 16:39:19.304: Found associated trigger at /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/trigger1
** (process:4770): DEBUG: 16:39:19.304: Found IIO buffer accelerometer at /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1
** (process:4770): DEBUG: 16:39:19.304: No auto-detected location, falling back to display location
** (process:4770): DEBUG: 16:39:19.304: Found device /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1 of type accelerometer at IIO Buffer accelerometer
** (process:4770): DEBUG: 16:39:19.304: Found IIO buffer compass at /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200083.6.auto/iio:device0
** (process:4770): DEBUG: 16:39:19.304: Found device /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200083.6.auto/iio:device0 of type compass at IIO Buffer Compass
** (process:4770): DEBUG: 16:39:19.308: Found associated trigger at /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/trigger1
** (process:4770): DEBUG: 16:39:19.310: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/scan_elements/in_accel_x_en
** (process:4770): DEBUG: 16:39:19.310: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/scan_elements/in_accel_z_en
** (process:4770): DEBUG: 16:39:19.310: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/scan_elements/in_timestamp_en
** (process:4770): DEBUG: 16:39:19.310: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/scan_elements/in_accel_y_en
** (process:4770): DEBUG: 16:39:19.522: Trying to read 'in_accel_x_scale' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.522: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_accel_x_scale: No such file or directory
** (process:4770): DEBUG: 16:39:19.522: Trying to read 'in_accel_scale' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.522: Trying to read 'in_accel_x_offset' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_accel_x_offset: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_offset' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Got type for in_accel_x: is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x4294967295, be: 0
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_z_scale' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_accel_z_scale: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_scale' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_z_offset' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_accel_z_offset: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_offset' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Got type for in_accel_z: is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x4294967295, be: 0
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_timestamp_scale' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_timestamp_scale: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_scale' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_scale: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_timestamp_offset' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_timestamp_offset: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_offset' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_offset: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Got type for in_timestamp: is signed: 1, bytes: 8, bits_used: 64, shift: 0, mask: 0x18446744073709551615, be: 0
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_y_scale' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_accel_y_scale: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_scale' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_y_offset' (name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.523: Failed to read float from /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1/in_accel_y_offset: No such file or directory
** (process:4770): DEBUG: 16:39:19.523: Trying to read 'in_accel_offset' (generic name) from dir '/sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200073.4.auto/iio:device1'
** (process:4770): DEBUG: 16:39:19.524: Got type for in_accel_y: is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x4294967295, be: 0
** (process:4770): DEBUG: 16:39:19.524: Built channel array for in_accel_x: index: 0, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x4294967295, be: 0
** (process:4770): DEBUG: 16:39:19.524: Built channel array for in_accel_y: index: 1, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x4294967295, be: 0
** (process:4770): DEBUG: 16:39:19.524: Built channel array for in_accel_z: index: 2, is signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x4294967295, be: 0
** (process:4770): DEBUG: 16:39:19.524: Built channel array for in_timestamp: index: 3, is signed: 1, bytes: 8, bits_used: 64, shift: 0, mask: 0x18446744073709551615, be: 0
** (process:4770): DEBUG: 16:39:19.524: Failed to auto-detect mount matrix, falling back to identity
** (process:4770): DEBUG: 16:39:19.524: No auto-detected location, falling back to display location
** (process:4770): DEBUG: 16:39:19.528: Found associated trigger at /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200083.6.auto/trigger0
** (process:4770): DEBUG: 16:39:19.531: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200083.6.auto/iio:device0/scan_elements/in_magn_z_en
** (process:4770): DEBUG: 16:39:19.531: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200083.6.auto/iio:device0/scan_elements/in_magn_y_en
** (process:4770): DEBUG: 16:39:19.531: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200083.6.auto/iio:device0/scan_elements/in_magn_x_en
** (process:4770): DEBUG: 16:39:19.531: Enabled sensor /sys/devices/pci0000:00/INT3432:00/i2c-0/i2c-SMO91D0:00/0018:0483:91D1.0001/HID-SENSOR-200083.6.auto/iio:device0/scan_elements/in_rot_from_north_magnetic_tilt_comp_en
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 21, 2020 11:00 pm

Anroch2020 wrote:Its working now!, thanks for helping me without your help I would have gone back to systemd
I don't know if it was the new script or if it because i enabled all the hid sensors in the kernel
Excelent! If it is working, I suggest commenting the added lines, because the /var/log files can grow indefinitely and fill your disk. You can uncomment them whenever you need them again.

Code: Select all

#output_log=/var/log/iio-sensor-proxy-stdout.log
#error_log=/var/log/iio-sensor-proxy-stderr.log
#export G_MESSAGES_DEBUG=all
Top
Anroch2020
n00b
n00b
Posts: 10
Joined: Sun Jun 21, 2020 2:41 am

  • Quote

Post by Anroch2020 » Sun Jun 21, 2020 11:11 pm

Excelent! If it is working, I suggest commenting the added lines, because the /var/log files can grow indefinitely and fill your disk. You can uncomment them whenever you need them again.

Code: Select all

#output_log=/var/log/iio-sensor-proxy-stdout.log
#error_log=/var/log/iio-sensor-proxy-stderr.log
#export G_MESSAGES_DEBUG=all
Done,Thank you!, now i have a full functional gentoo tablet!
Top
clytle374
Apprentice
Apprentice
Posts: 227
Joined: Tue Aug 01, 2006 3:07 am

  • Quote

Post by clytle374 » Sun Dec 28, 2025 12:28 pm

In case you are here near the end of 2025, and are dismayed that you can't find anything about automatic screen rotation on gentoo.

I'm run KDE Plasma and the following got it working with openrc.

eselect repository enable guru
emerge --sync
echo 'gnome-extra/iio-sensor-proxy ~amd64' > /etc/portage/package.accept_keywords/iio-sensor-proxy
emerge -av iio-sensor-proxy

It was zero suffering for me. The device is a GPD Pocket 3 with the i7 processor.
NooB since RedHat 6.1
Top
Post Reply

20 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic