iggames

joined 1 year ago
[–] iggames@lemmy.world 2 points 5 months ago (1 children)

I often leave Steam running in the background. Indeed, KDE seems to be suspending more reliably after I exit Steam. Thanks for the suggestion!

[–] iggames@lemmy.world 1 points 5 months ago

Looks like that script is for Gnome (based on the StackOverflow post listed on the project page, it talks to org.gnome.SessionManager via dbus). I wonder if there is a similar way to talk to PowerDevil?

29
submitted 5 months ago* (last edited 5 months ago) by iggames@lemmy.world to c/linux@lemmy.ml
 

I have KDE set to Turn Off Screen after 5 minutes and to Sleep after 10 minutes of inactivity. This works when I first turn on the machine, but eventually stops working after a few hours of general use (mostly Firefox, VS Code, and some Steam games). Sometimes the screen isn't turning off at all, other times the screen turns off but the machine never goes to sleep. (Explicitly telling it to go to sleep from the main menu always works.)

EDIT: Seems like browser tabs or Steam are the likely culprits. I would often leave Steam running in the background, and KDE is suspending more reliably for me now after I close it. Possibly this steam-for-linux GitHub issue.

I figure there's either some sort of issue with KDE power management, or one (or more) applications are preventing it from sleeping. How do I troubleshoot this further?

systemd-inhibit just lists PowerDevil, which seems to be KDE's power management service:

$ systemd-inhibit --list --mode=block
WHO        UID  USER    PID  COMM            WHAT                                                                       WHY                      MODE 
PowerDevil 1000 iggames 4115 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events block

1 inhibitors listed.

One time, I clicked KDE's Power Management notification icon, and it showed me an app that was preventing sleep (a game that had not exited properly). Most of the time, however, it doesn't list anything.

Is there a way to see what apps are causing "activity" that would prevent PowerDevil from suspending the machine? What should I try next?

System details:

Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.8.11-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i5-12400
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B660M DS3H DDR4
[–] iggames@lemmy.world 1 points 9 months ago

Looks like evremap will do what I want, plus a nifty bonus! The following config lets me use CapsLock + N/P/etc to navigate. And if I just tap CapsLock without pressing anything else, it will act as escape.

device_name = "Telink Wireless Receiver"

[[dual_role]]
input = "KEY_CAPSLOCK"
hold = ["KEY_F19"]
tap = ["KEY_ESC"]

[[remap]]
input = ["KEY_F19", "KEY_N"]
output = ["KEY_DOWN"]

[[remap]]
input = ["KEY_F19", "KEY_P"]
output = ["KEY_UP"]

[[remap]]
input = ["KEY_F19", "KEY_B"]
output = ["KEY_LEFT"]

[[remap]]
input = ["KEY_F19", "KEY_F"]
output = ["KEY_RIGHT"]

[[remap]]
input = ["KEY_F19", "KEY_A"]
output = ["KEY_HOME"]

[[remap]]
input = ["KEY_F19", "KEY_E"]
output = ["KEY_END"]

Note: I used F19 because it doesn't seem to be bound to anything by default. Apparently, a bunch of the other function keys already did things, as described in /usr/share/X11/xkb/symbols/inet

$ cat /usr/share/X11/xkb/symbols/inet | grep FK13
    key    {      [ XF86Tools         ]       };
    key   {       [ XF86MailForward       ]       };
    key   {       [ XF86Word              ]       };      // F2
    key   {       [ XF86MailForward       ]       };      // F3

$ cat /usr/share/X11/xkb/symbols/inet | grep FK20
    key    {      [ XF86AudioMicMute      ]       };
[–] iggames@lemmy.world 1 points 9 months ago

Looks like there’s an open issue (with fairly recent activity) for adding Wayland support: https://github.com/joshgoebel/keyszer/issues/27

Thanks for the suggestion, I’ll look into this more.

[–] iggames@lemmy.world 1 points 9 months ago (1 children)

Thank you for the suggestions! I’ll dig into these tonight and see what I can get working.

21
submitted 9 months ago* (last edited 9 months ago) by iggames@lemmy.world to c/linux@lemmy.ml
 

I like using emacs-style navigation in the terminal (e.g. Ctrl + N for down, Ctrl +P for up, Ctrl + A for home, Ctrl + E for end), and I want to do something similar for navigation elsewhere. I would like to use CapsLock + N/P/A/E/etc for down/up/home/end in all apps (I previously used the AutoHotkey script at https://github.com/usuyama/emacs-like-key-bindings-windows to accomplish this in Windows).

I'm currently using KDE Plasma on Wayland, and I haven't seen anything obvious to do this while poking around settings. Any suggestions? Thank you in advance!

EDIT: I was able to do what I want with evremap. The crux of the config is:

[[dual_role]]
input = "KEY_CAPSLOCK"
hold = ["KEY_F19"]
tap = ["KEY_ESC"]

[[remap]]
input = ["KEY_F19", "KEY_N"]
output = ["KEY_DOWN"]

[[remap]]
input = ["KEY_F19", "KEY_P"]
output = ["KEY_UP"]

See my reply below for more info.

[–] iggames@lemmy.world 1 points 10 months ago

Added some info to the post. Firewall is blocking 3289 UDP from my printer, so I added 3289 UDP to open ports for "home", "public", and "internal" zones. However, I'm still seeing filter_IN_public_REJECT entries in dmesg, so it seems the firewall is still blocking these. Is there a different way I should be telling it to allow requests on this port?

Firewall also allows mdns service (again, in "home", "public", and "internal" zones), but I also see entries like this:

[41951.119486] filter_IN_public_REJECT: IN=wlp0s20f0u3 OUT= MAC= SRC=192.168.1.1 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0x00 TTL=1 ID=10725 DF PROTO=2 MARK=0x3214

It sounds like 224.0.0.1 is related to mdns broadcasts, so it seems firewall is also still blocking these (despite mdns being allowed service).

Am I specifying these in the wrong place? (Per Connections - System Settings, my wifi is in Firewall zone "home").

[–] iggames@lemmy.world 1 points 10 months ago

Yes, "sane" service is already in the "Allowed" list.

[–] iggames@lemmy.world 2 points 10 months ago (2 children)

Added "mdns" service to allowed list for public zone, still get the SANE error. (Previously added 5353 UDP per another suggestion -- sounds like this is the port for mDNS)

[–] iggames@lemmy.world 1 points 10 months ago (2 children)

No change with allowing 5353 UDP through the firewall, unfortunately. But thank you for the suggestion!

 

Hello, I'm trying to use my Epson XP-200 printer/scanner with OpenSUSE Tumblweed.

  • /etc/sane.d/dll.conf has the "epson2" line uncommented.
  • /etc/sane.d/epson2.conf has "net autodiscovery" as its last line
  • My user is part of the "lp" group, which seems to be required for finding printers/scanners

If I disable the firewall completely (using YaST2 firewall program), it works -- the Skanlite software detects my scanner and connects to it. With the firewall enabled, however, Skanlite says SANE cannot find any scanners. I have tried allowing TCP and UDP ports 8610, 8612 (based on suggestions from https://wiki.debian.org/SaneOverNetwork), and 631 (for CUPS) in the "public" zone, and added the "sane" service to "Allowed" services (didn't see a "cups" service option), but Skanlite still says SANE cannot find the scanner.

Is there a way for "net autodiscovery" to work without completely disabling my firewall? What ports/services should I allow? It seems the alternative is to manually specify the printer's IP address in /etc/sane.d/epson2.conf instead of "net autodiscovery", but I would prefer to not hardcode this.

Thank you in advance for any suggestions!

EDIT: Based on suggestions below, I turned on firewall logging with the instructions https://www.cyberciti.biz/faq/enable-firewalld-logging-for-denied-packets-on-linux/):

  • sudo vi /etc/firewalld/firewalld.conf
  • Set LogDenied=all
  • sudo firewall-cmd --reload

To find lines related to my printer (known to be at 192.168.1.57):

  • dmseg | grep 192.168.1.57

Here is a sample of the output (192.168.1.105 is my OpenSUSE computer):

[30974.673679] filter_IN_public_REJECT: IN=wlp0s20f0u3 OUT= MAC= SRC=192.168.1.57 DST=192.168.1.105 LEN=104 TOS=0x00 PREC=0x00 TTL=30 ID=37923 PROTO=UDP SPT=3289 DPT=48375 LEN=84 MARK=0x3214

[30976.299712] filter_IN_public_REJECT: IN=wlp0s20f0u3 OUT= MAC= SRC=192.168.1.57 DST=192.168.1.105 LEN=104 TOS=0x00 PREC=0x00 TTL=30 ID=37924 PROTO=UDP SPT=3289 DPT=52415 LEN=84 MARK=0x3214

[31139.093164] filter_IN_public_REJECT: IN=wlp0s20f0u3 OUT= MAC= SRC=192.168.1.57 DST=192.168.1.105 LEN=104 TOS=0x00 PREC=0x00 TTL=30 ID=38084 PROTO=UDP SPT=3289 DPT=46833 LEN=84 MARK=0x3214

Looks like 3289 UDP is the port of interest, and it shows up on an EPSON website (https://epson.com/faq/SPT_C11CG18201~faq-0000525-shared?faq_cat=faq-8796127635532). I tried adding it to "public" and "home" zones and it still doesn't work. Is there a different zone I should be using?

[–] iggames@lemmy.world 14 points 10 months ago (5 children)

I think it’s from the boot camp scenes in the movie Full Metal Jacket.

[–] iggames@lemmy.world 1 points 10 months ago

I always read “f/u w/PCP” as “fucked up on PCP” instead of “follow up with primary care provider”.

[–] iggames@lemmy.world 7 points 11 months ago

A nurse at work had “CA$H MONEY” tattooed inside her lip. Sounded like the result of a drunken dare/bet.

view more: next ›