Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] FN+F2|F3 not working on gnome but on plasma
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Fri Jan 05, 2018 10:08 am    Post subject: [Solved] FN+F2|F3 not working on gnome but on plasma Reply with quote

Hey @all,

I´m running an unstable gentoo install.
Some days ago I´ve switched from openrc to systemd, and installed gnome-base/gnome-shell-3.24.3, gnome-base/gnome-sesssion-3.24.2 and gnome-extra/gnome-power-manager-3.24.0.

My problem is that the FN+F2|F3 (brightness up & down) not works on gnome, FN+F7|F8 (volume up and down) are working as except with osd. In plasma session the are no problems both worked.
I´ve tried to start session either with gdm or sddm without any difference.

acpi_listen gives:
Code:
video/brightnessdown BRTDN 00000087 00000000
video/brightnessup BRTUP 00000086 00000000


dmesg:
Code:
[  373.032428] atkbd serio0: Unknown key pressed (translated set 2, code 0xab on isa0060/serio0).
[  373.032430] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.
[  373.071072] atkbd serio0: Unknown key released (translated set 2, code 0xab on isa0060/serio0).
[  373.071076] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.


The dmesg info I get also on plasma but keys are working incl osd. Perhaps someone has a relevant tip for me ;-). Perhaps it has something to do with systemd or gnome-3.24 ?

regards


Last edited by spikyatlinux on Sat Oct 06, 2018 11:50 am; edited 1 time in total
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Fri Jan 05, 2018 12:00 pm    Post subject: Reply with quote

Quote:
In plasma session the are no problems both worked.


Hi, could you clarify if you still have currently the testing capability to be opening a plasma session, or did you since remove KDE and all the apps since installing Gnome?

Also, not sure about this but rebuilding the graphics drivers and Xorg-server and maybe even the kernel, all of which could have something to do with this.

But I'm not trying to make your head spin, so lets start by narrowing it down. If you had plasma installed before, and if it is still there now, can you try again and open plasma desktop session to see how that is working (if it is and post back with the thumbs up or down on that). Otherwise, if no plasma then sort of have to treat it like it isn't working, and then troubleshooting which may be kernel related or could be something else like I mentioned.
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Fri Jan 05, 2018 1:00 pm    Post subject: Reply with quote

Hi,

Code:
In plasma session the are no problems both worked. I´ve tried to start session either with gdm or sddm without any difference.


plasma is untouched and running fine.
Rebuilding kernel and emerge @x11-module-rebuild and @module-rebuild is done.
Perhaps it has something to do with upower. Plasma uses powerdevel to control energy settings which all works fine. Gnome use upower and gnome-power-manager, correct? In gnome-power-manager I cannot control energy settings. I have no option to control brightness under gnome-control-center or on the battery icon in panel. Or is there any powerdevel related stuff for gnome?

Edit:
I forget to say
Code:
xbacklight -inc|dec|set xx
is also working.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Fri Jan 05, 2018 10:32 pm    Post subject: Reply with quote

It also uses DBus which may also be the source of a problem. According to the Gnome project website these three are the main dependencies of the GNOME Power Manager:


UPower 0.9.1
DBus 0.61
libnotify 0.4.2


I would make sure you've tried at least reinstalling those, and then see if it works. Also, when you were installing the gnome packages did you happen to see anything or can you look in the build logs for the package gnome-extra/gnome-power-manager for a hint/clue?

Specifically, the first thing I would check is if dbus is running at the time. If it isn't then you might need to modify your system to make sure it is before the desktop session gets started.\

Good luck
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Wed Jan 10, 2018 9:35 am    Post subject: Reply with quote

So some feedback,

Some weeks ago I switched from openrc to systemd. On openrc and "Gnome without systemd", there aren´t any errors, everything works fine. That´s why im thinking it´s systemd related. I´ve tested complete stable reinstall, including new kernel configs.
Quote:
UPower 0.9.1
DBus 0.61
libnotify 0.4.2


are very old, I´ve used latest stable versions from tree.

Edit:
I´ve tested both "default/linux/amd64/17.0/desktop/gnome/systemd" and "default/linux/amd64/17.0/desktop/plasma/systemd" profile, without success, same behaviour.
FN+F7|8 works incl osd and FN+F2|F3 not, weird is that this only affect gnome. On plasma there aren´t any problems.

Service upower is running and dbus is started before gnome session through systemd.

Now I´m back on plasma ;-), never change a running system.

Some notes:
Code:
/sys/class/backlight
is empty, but I can control brightness through powerdevil without any problems.

Code:
acpi_backlight=video
acpi_backlight=vendor
acpi_backlight=native


didn´t help ;-)

My system is a HP Omen 17-w211ng with a nvidia GTX 1070.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Wed Jan 10, 2018 11:24 am    Post subject: Reply with quote

Giventhe messages in kernel as well, it would appear you might have several choices for how to be resolving it that would be handled either in the kernel drivers, maybe or else the userspace applications in use. Have you checked online for some info about the function keys for the specific laptop online?
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Thu Jan 11, 2018 7:31 pm    Post subject: Reply with quote

dmesg info
dmesg

Some logs from journal
journalctl -xb | grep -i error
journalctl -xb | grep -i acpi

Systeminfo
systeminfo lspci and lshw

Quote:

Jan 11 13:26:35 localhost gnome-settings-[6691]: Failed to set new screen percentage: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._gsd_5fpower_5fmanager_5ferror.Code0: Screen backlight not available


This behavior is strange I´ve tested Ubuntu Live DVD same errors on Kubuntu it works also. Also I´ve tested elementaryos v0.4.1 same errors, but the brightness slider is there without any reaction if I move it. Perhaps it has something to do with my bios, I don´t know.

Conclusion:
I stay on plasma, I´ve tested different os´es, kernels and bios settings all with the same result on gnome. I want to know why there are no problems on plasma although /sys/class/backlight/ is empty.

Thanks @LIsLinuxIsSogood for trying to help me ;-), best regards
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sun Jan 14, 2018 5:17 am    Post subject: Reply with quote

Hey spikyatlinux,

I'm sorry that I couldn't be of more help with this as of yet, anyway this seems like a very common problem with linux laptops that is about kernel and hardware functionality....Also keep in mind when you are using a LiveCD that means you are using a different kernel. The best practices would dictate if you can boot the LiveCD then taking note of what is enabled in the kernel (like kernel modules, drivers etc.) and then go back to your kernel and making those changes to see if it in fact solves any issues.

Just for fun, since I am running Mate as my session manager, I went through with testing it and the results were sort of quizzical again for my laptop!! It appears that while the screen brightness is able to change (like in your plama session) that I get messages in the kernel log...(when using also Fn2 and Fn3) :

Code:
[161224.496482] atkbd serio0: Unknown key pressed (translated set 2, code 0xab on isa0060/serio0).
[161224.496490] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.
[161224.637426] atkbd serio0: Unknown key released (translated set 2, code 0xab on isa0060/serio0).
[161224.637430] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.


Also, I glanced at your dmesg but didn't see much in the way of related stuff (what are all those messages regards to ACPI?? Those are important...you should be doing something to take care of that too.

Maybe someone with some added knowledge of the Gnome DE can then help to weigh or have you thought of looking to outside like a Gnome Desktop wiki or something like that for ideas of what you might try.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sun Jan 14, 2018 5:26 am    Post subject: Reply with quote

Quote:
I want to know why there are no problems on plasma although /sys/class/backlight/ is empty.


I'm no expert, but it seems that the DE has a way to go around the lack of this kernel paramater.

Some other things if you haven't tried yet, would be change your kernel boot line to include:

acpi_backlight=vendor


It sort of depends if what you are after is a solution for the gnome session or not, but something else you could try is which is if you have policykit enabled, is to check for a program called gsd-backlight-helper, this is what I got in google when I searched for "brightness settings linux":

Code:
pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 5
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Sat Jan 20, 2018 11:36 am    Post subject: Reply with quote

Quote:
It sort of depends if what you are after is a solution for the gnome session or not, but something else you could try is which is if you have policykit enabled, is to check for a program called gsd-backlight-helper, this is what I got in google when I searched for "brightness settings linux":

Code:
pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 5


This I´ve also tested without success, on my system there is no gsd-backlight-helper. And on the LiveCDs /sys/class/backlight is also empty. As I said before I stay on plasma ;-)

Thanks for your help
Best regards
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sun Jan 21, 2018 6:05 am    Post subject: Reply with quote

Do you mind sharing your kernel configuation? This sounds like whatever gnome isn't doing that plasma is somehow able to meaning maybe the answer for system wide consistent use of the brightness control could be in the kernel somewhere. If you just want to print the relevant section that's fine. Or quicker could be to use pastebin and just post the whole thing that way.
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Sun Jan 21, 2018 6:50 am    Post subject: Reply with quote

Okay here it comes

Kernel config
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue Jan 23, 2018 6:46 am    Post subject: Reply with quote

Ok, a couple more things to try would be either:

1) Kernel boot parameters, which here is a link describing some good use of them for an options that was an issue with the 3.x linux kernel that solved by users of intel graphics card by setting the boot parameter to be i915.invert_brightness=1

so that may be worth trying, and here's the link to that discussion thread: https://bbs.archlinux.org/viewtopic.php?id=178014

2) Also attempting to solve it through the Xorg seems like a logical place to turn since X11 does handle everything from the screen and devices to the input events, so that could be worth checking out.

If you did not already provide your Xorg configuration file, and you would like to check to see if perhaps the Backlight option is not currently set there, and then maybe that would fix this. I am going to test right now on my machine, where at least a few of the various Desktop Environments are not allowing for the use of these keys...once more I'm on a hp pavilion, I forget which laptop you were originally posting about :)
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue Jan 23, 2018 8:10 am    Post subject: Reply with quote

So my tests being fruitful using the Xorg configuration I wanted to include basically a workaround that seems acceptable. Which was what I found on the web in another forum concerning the change to the configuring of xorg. It will not correct the source of the error in reading the hotkeys from the laptop, but it allows for a perfectly ok way around it, and also possibly further a way to then go further and assign the keys later for essentially the same usage as the hotkeys (if that makes sense). Actually, it appears that while other solutions could exist, there are known trade-offs with those other soltuions such as losing the functionality of some of the hotkeys while gaining other ones. It seems pretty tricky, but here is a way to quickly and hopefully it works (to allow control over the backlight)...

And here is the section you want to add to the file /etc/X11/xorg.conf.d/10-monitor.conf

Code:
Section "Device"Section "Device"
    Identifier  "Laptop"
    Driver      "intel"
    Option "Backlight"     "intel_backlight"
EndSection



Once you've done that, (EDIT: you can first go into /sys/class/backlight and you should see the device link in there for intel_backlight, if so hooray, then if you have the xbacklight tool installed already) you should be able to use it. Try xbacklight -h for a list of options.

If this does not work, then perhaps there is a need to go back to the grub file, since you posted the kernel already, maybe you can try the X configuration workaround solution first and then post back with you grub config if that didn't work so we can see the linux line from your grub boot entry.

EDIT: As I explained in the beginning of this post, the fruitfulness of this solution which is up to you to decide if it is a working solution or not, does not use these hotkeys in any way. The Function keys that are also mapped as the hotkeys are themselves a secondary problem to the missing file/files in the folder discussed for the backlight, /sys/class/backlight There may be some solutions that do bypass this Xorg configuration and the use of xbacklight, but does this seem like a good overall solution...for me it does. Hopefully for you it does too!
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Wed Jan 24, 2018 11:27 am    Post subject: Reply with quote

Hey LIsLinuxIsSogood,

Quote:

Code:
Section "Device"Section "Device"
Identifier "Laptop"
Driver "intel"
Option "Backlight" "intel_backlight"
EndSection
isn´t working I´ve already tried ;-) /sys/class/backlight reamains empty.

Quote:
Code:
acpi_backlight=video
acpi_backlight=vendor
acpi_backlight=native

didn´t help


I´ve tested different parameters found there >>> http://redsymbol.net/linux-kernel-boot-parameters/
Code:
i915.invert_brightness=1|-1
video.brightness_switch_enabled=0
also not.

Quote:
Code:
xbacklight -inc|dec|set xx
is also working.
so I stay with that solution, too;-) I´ve tried hundreds of kernel recompiles ;-), many many grub parameters, recompiled system with different use flags. Switched from unstable and reinstalled complete with stable packages and different portage profiles. All without any difference. So xbacklight it´s the best solution at the moment.

Big thanks for trying to help me ;-)

If I get it working someday I let you know.
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Wed Jan 24, 2018 4:21 pm    Post subject: Reply with quote

I have created an little script to control my brightness through a keyboard shortcut. For that I use the following script:

Code:
#!/bin/bash

xblight="$(which xbacklight)"
dip=""
step=10

while getopts "id:" opt; do
    case $opt in
        d)
            dip="dec"
            ;;
        i)
            dip="inc"
            ;;
    esac
done
cmd="$xblight -$dip $step"
$cmd
notify-send -t 400 "Brightness changed"


then I opened
Code:
gnome-control-center keyboard
and added a shortcut for controlling brightness. As command you have to use scriptname -i or -d

Example:
Code:
/home/YourName/bin/xlight.sh -i
increases brightness or
Code:
/home/YourName/bin/xlight.sh -d
to decreases brightness,as key I used Super(Windows)+F2+F3 because I want 60% after restart I´ve added the following snippet to my .bashrc
Code:
# Fix FN+Keys F2+F3 not working
xbacklight -set 60
.Not beautiful but working for me

I´ve forgot, of course /home/YourName/bin/ should be in your path. For that I use the following snippet under /etc/bash
Code:
# If $HOME/bin exists add it to PATH
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi
Back to top
View user's profile Send private message
spikyatlinux
n00b
n00b


Joined: 18 Sep 2010
Posts: 31

PostPosted: Sat Oct 06, 2018 12:05 pm    Post subject: Reply with quote

I´ve found the error, cause /sys/class/backlight was empty it must have something to do with the nvidia proprietary driver. After reading https://www.nvidia.com/download/driverResults.aspx/126185/en-us especially
Code:
Added an nvidia.ko kernel module parameter, NVreg_EnableBacklightHandler, which can be used to enable experimental handling of laptop backlight brightness through /sys/class/backlight/. This handler overrides the ACPI-based one provided by the video.ko kernel module.

NVreg_EnableBacklightHandler is disabled by default.
the solution was simple. I´ve have to add NVreg_EnableBacklightHandler to the module, so I´ve created /etc/modprobe.d/nvidia-enable-brightness.conf with
Code:
# Fix to enable experimental backlight support through nvidia driver
options nvidia NVreg_EnableBacklightHandler=1
reboot and voila, FN keys for brightness work under plasma and gnome. And the output of my /sys/class/backlight is
Code:
nvidia_0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/nvidia_0


:D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum