I found this tool that seems to be made for this purpose:
https://github.com/sarmbruster/thinkpad ... a_rotation
However, it is quite old so I think it's made for the 1st gen Yoga, and does not work with my machine. As it's unmaintained, I am posting the output here instead of in its issue tracker, in the hopes that it will help us get this issue resolved:
Code: Select all
2024-08-27 00:09:31,463 - root - INFO - detected wacom devices: ['Wacom Pen and multitouch sensor Finger touch', 'Wacom Pen and multitouch sensor Pen stylus', 'Wacom Pen and multitouch sensor Pen eraser']
2024-08-27 00:09:31,470 - root - INFO - found stylus Wacom Pen and multitouch sensor Pen stylus
2024-08-27 00:09:31,470 - root - INFO - found finger touch Wacom Pen and multitouch sensor Finger touch
2024-08-27 00:09:31,470 - root - INFO - found touchpad and trackpoints ['TPPS/2 IBM TrackPoint', 'SynPS/2 Synaptics TouchPad']
2024-08-27 00:09:31,475 - root - INFO - connected to acpi socket <module 'socket' from '/usr/lib/python3.11/socket.py'>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 173, in activate_name_owner
return self.get_name_owner(bus_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 348, in get_name_owner
return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 634, in call_blocking
reply_message = self.send_message_with_reply_and_block(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'net.hadess.SensorProxy': no such name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/appas/Downloads/thinkpad_x1_yoga_rotation/./thinkpad_x1_yoga_rotation.py", line 154, in <module>
main(options)
File "/home/appas/Downloads/thinkpad_x1_yoga_rotation/./thinkpad_x1_yoga_rotation.py", line 140, in main
proxy = bus.get_object('net.hadess.SensorProxy', '/net/hadess/SensorProxy')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 237, in get_object
return self.ProxyObjectClass(self, bus_name, object_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
self._named_service = conn.activate_name_owner(bus_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 178, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 273, in start_service_by_name
return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 634, in call_blocking
reply_message = self.send_message_with_reply_and_block(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name net.hadess.SensorProxy was not provided by any .service files
2024-08-27 00:09:31,639 - root - INFO - running ['xinput', 'enable', 'TPPS/2 IBM TrackPoint'] with exit code 0
2024-08-27 00:09:31,655 - root - INFO - running ['xinput', 'enable', 'SynPS/2 Synaptics TouchPad'] with exit code 0
2024-08-27 00:09:31,663 - root - INFO - running ['xsetwacom', '--set', 'Wacom Pen and multitouch sensor Finger touch', 'rotate', 'none'] with exit code 0
2024-08-27 00:09:31,670 - root - INFO - running ['xsetwacom', '--set', 'Wacom Pen and multitouch sensor Pen stylus', 'rotate', 'none'] with exit code 0
2024-08-27 00:09:31,677 - root - INFO - running ['xsetwacom', '--set', 'Wacom Pen and multitouch sensor Pen eraser', 'rotate', 'none'] with exit code 0
I am willing to write some code for this, but I think the "SensorProxy was not provided by any .service files" is related to the same problem of not having the acceleromer sensor available, in the first place.
There are some modules loaded that look like they could be related:
Code: Select all
lsmod |grep acc
hid_sensor_accel_3d 20480 0
hid_sensor_trigger 20480 14 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
hid_sensor_iio_common 24576 7 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_incl_3d,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
industrialio 114688 9 industrialio_triggered_buffer,hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_incl_3d,kfifo_buf,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
hid_sensor_hub 28672 9 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_incl_3d,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation,hid_sensor_custom