rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.27k stars 214 forks source link

kinto breaks plex on linux #682

Closed thesuperzapper closed 2 years ago

thesuperzapper commented 2 years ago

Describe the bug

When Kinto is installed (and running) on Linux, plexmediaserver can not be installed.

If plex is already installed then every single apt-get action will fail with a dpkg error.

The error looks like this when trying to install plexmediaserver_1.26.2.5797-5bd057d2b_amd64.deb with sudo apt install ./plexmediaserver_1.26.2.5797-5bd057d2b_amd64.deb:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'plexmediaserver' instead of './plexmediaserver_1.26.2.5797-5bd057d2b_amd64.deb'
Recommended packages:
  beignet-opencl-icd
The following NEW packages will be installed:
  plexmediaserver
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/83.3 MB of archives.
After this operation, 249 MB of additional disk space will be used.
Selecting previously unselected package plexmediaserver.
(Reading database ... 207998 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.26.2.5797-5bd057d2b_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.26.2.5797-5bd057d2b) ...
Setting up plexmediaserver (1.26.2.5797-5bd057d2b) ...
PlexMediaServer install: PlexMediaServer-1.26.2.5797-5bd057d2b - Installation st
arting.
PlexMediaServer install: 
PlexMediaServer install: Now installing based on:
PlexMediaServer install:   Installation Type:   Update
PlexMediaServer install:   Process Control:     systemd
PlexMediaServer install:   Plex User:           plex
PlexMediaServer install:   Plex Group:          plex
PlexMediaServer install:   Video Group:         video
PlexMediaServer install:   Metadata Dir:        /var/lib/plexmediaserver/Library
/Application Support
PlexMediaServer install:   Temp Directory:      /tmp 
PlexMediaServer install:   Lang Encoding:       en_US.UTF-8
PlexMediaServer install:   Nvidia GPU card:     Found
PlexMediaServer install:  
PlexMediaServer install: Completing final configuration.
input44: Failed to write 'change' to '/sys/devices/virtual/input/input44/uevent'
: Cannot allocate memory
dpkg: error processing package plexmediaserver (--configure):
 installed plexmediaserver package post-installation script subprocess returned 
error exit status 1
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Errors were encountered while processing:
 plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)

The thing which looks most suspicious to me is input44: Failed to write 'change' to '/sys/devices/virtual/input/input44/uevent' : Cannot allocate memory, as I bet this is related to Kinto.

Expected behavior

Kinto does not interfere with plexmediaserver (or dpkg).

Install Type: Bare Metal Distro: Ubuntu - 20, 21, 22 DE: Gnome Branch: 1.2-13 Commit: N/A

rbreaves commented 2 years ago

Hmmm.. not heard of this issue but it could be an issue w/ xkeysnail which grabs your uinput device to intercept keys being pressed. Perhaps only one can do so at a time.. in which case this is not solvable.

A potential work around is to maybe specify the device xkeysnail grabs in case it grabs more than the single keyboard it should grab. Other option is to figure out why Plex thinks it needs to grab your PC’s keyboard input.

Personally I’d open up a bug w/ Plex & have them run or consider the impact this likely has on any & all key remappers that make use of uinput. Their updating path shouldn’t result in hard errors like that imho. It’s not specific to Kinto though as much as it is the nature of xkeysnail & similar. Will be closing as this is really an upstream issue & the best bet is for Plex to fix it by not assuming uinput access.

rbreaves commented 2 years ago

Of course if you suspend or stop Kinto first it ought to be fine as I don’t think xkeysnail would keep the device any longer.

thesuperzapper commented 2 years ago

@rbreaves I raised this with Plex, and one of their tech staff responded in the forum thread I raised, I am not familiar enough with how it all works to understand his technical explanation.

I would love it if you could take a look and tell me if you think his reason why Kinto is probably the problem makes any sense. (Or you can message him directly on the forum, if you like)