First experience from a new user: what doesn't work and workarounds.

I first installed FreeBSD this week on my laptop and I'm focusing on desktop usage (Mate). This are my findings so far and the workaround I used when applicable, maybe someone else can find them useful. My laptop is described here .
  1. GPU not responding after a suspend/resume cycle (***). Symptoms: videos are played without hardware acceleration, vainfo crashes,ungoogled-chromium processes hang on logout and use 100% of CPU power (fans spin like crazy). Unfortunately there's no workaround for this problem, I even tried drm-61-kmod compiled from the ports (a good excuse to learn how to use them ;) ) to no avail but the ungoogled-chromium problem is solved in post 17;
  2. unable to delete snapshots ("dataset is busy") and thus zrepl couldn't work. I tracked down this to gvfs-trash that was accessing these snapshots. Solution: replace caja with pcmanfm - this got rid of gvfs and gvfs-trash along the way;
  3. keyboard layout gets reset to the default (US) after every suspend/resume cycle. Workaround: I mapped F3 to execute "xterm -e 'setxkeymap it' " so just pressing that button gets back to my usual layout. The solution is in post #16 in this thread;
  4. video recording from the webcam does not work. No solution yet for this, I tried also with webcamoid with every possible combination but it didn't work. Funnily enough, the picture quality I get in FreeBSD is much better than on Linux; Solution: OBS Studio works;
  5. the brightness applet included with Mate doesn't do anything, probably because it tries to use the Linux interface. Workaround: I mapped F11/F12 to use the FreeBSD backlight utility;
  6. multimedia keys on a Dell keyboard don't work, despite loading the hsbhid module, and also the Mate applet always wants to use the internal card and not the HDMI output of my monitor. Workaround: I mapped F9/F10 to use pamixer to increase and decrease the volume.
Hope this may be useful to someone else and maybe some more experienced user can provide solutions for the things that don't work for me.

(***)
Code:
[19:25][fmc000@tu45b-freebsd][~]
 ⤷ $ vainfo |head -4
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 (intel-media-23.4.3)
[19:25][fmc000@tu45b-freebsd][~]

<suspend-resume cycle>

[19:25][fmc000@tu45b-freebsd][~]
 ⤷ $ vainfo |head -4
libva info: VA-API version 1.22.0
libva error: vaGetDriverNames() failed with unknown libva error
vaInitialize failed with error code -1 (unknown libva error),exit
Trying display: wayland
Trying display: x11
[19:25][fmc000@tu45b-freebsd][~]
 ⤷ $
 
keyboard layout gets reset to the default (US) after every suspend/resume cycle. Workaround: I mapped F3 to execute "xterm -e 'setxkeymap it' " so just pressing that button gets back to my usual layout;
If you're using a ~/.xinitrc file, try adding setxkbmap it to the file to set the mapping automatically when your desktop starts.
 
If you're using a ~/.xinitrc file, try adding setxkbmap it to the file to set the mapping automatically when your desktop starts.
The problem is that when the desktop starts everything is good. But every time I issue a suspend/resume cycle the keyboard layout gets reset to US, so unfortunately your solution can't work.
 
The problem is that when the desktop starts everything is good. But every time I issue a suspend/resume cycle the keyboard layout gets reset to US, so unfortunately your solution can't work.
Probably broken desktop environment software.
I am guessing this doesn't happen if using just Xorg + Window Manager?

Possibly the most critical is your 1). Have you tried removing and re-adding the kernel module after resume? If that works, we can fairly easily automate the process (via /etc/rc.resume). I have had to do that one one of my machines to get an image to return.
 
Probably broken desktop environment software.
I am guessing this doesn't happen if using just Xorg + Window Manager?

Possibly the most critical is your 1). Have you tried removing and re-adding the kernel module after resume? If that works, we can fairly easily automate the process (via /etc/rc.resume). I have had to do that one one of my machines to get an image to return.
No, I have the same issue. The keyboard is disconnected at suspend and then devd adds it again at resume - but with the default mapping of US. .xinitrc is not running again, so...
 
The problem is that when the desktop starts everything is good. But every time I issue a suspend/resume cycle the keyboard layout gets reset to US, so unfortunately your solution can't work.
Sounds like the result of the keyboard USB port going offline. I have a similar thing with a KVM switch that has to disconnect for a moment if you change port. I lose my Xorg keyboard repeat/delay settings of it. Not sure if something resident exists to recover this in FreeBSD. I'm using the US int. layout, so I wouldn't notice if that gets reset to default too...
 
Strange. My xmodmap key remappings do not get lost on suspend/resume on my T14 gen1 AMD.
Please connect a USB keyboard and retry. If I remember correctly, even the build-in keyboard gets reset to US in that case. The external one gets it for sure.
 
Please connect a USB keyboard and retry. If I remember correctly, even the build-in keyboard gets reset to US in that case. The external one gets it for sure.

Hmmm, the external one would get reset on a USB disconnect of any kind.

My internal one does not lose xmodmap remapping of individual keys (not a complete keymap).
 
The problem is that when the desktop starts everything is good. But every time I issue a suspend/resume cycle the keyboard layout gets reset to US, so unfortunately your solution can't work.
Apologies, I misunderstood your original problem. You could try creating an Xorg keyboard configuration file like the one in this thread.
 
I first installed FreeBSD this week on my laptop and I'm focusing on desktop usage (Mate). This are my findings so far and the workaround I used when applicable, maybe someone else can find them useful. My laptop is described here .
  1. GPU not responding after a suspend/resume cycle (***). Symptoms: videos are played without hardware acceleration, vainfo crashes, ungoogled-chromium processes hang on logout and use 100% of CPU power (fans spin like crazy). Unfortunately there's no workaround for this problem, I even tried drm-61-kmod compiled from the ports (a good excuse to learn how to use them ;) ) to no avail;

Workaround:

Code:
[20:49][fmc000@tu45b-freebsd][/usr/local/etc]
 ⤷ $ grep cleanup /usr/local/etc/lightdm/lightdm.conf
# session-cleanup-script = Script to run when quitting a user session (runs as root)
session-cleanup-script=/home/fmc000/.local/bin/cleanup.sh
[20:51][fmc000@tu45b-freebsd][/usr/local/etc]
 ⤷ $ cat /home/fmc000/.local/bin/cleanup.sh
#!/usr/local/bin/bash
pkill -9 ungoogled-chromium
[20:51][fmc000@tu45b-freebsd][/usr/local/etc]
 ⤷ $
 
Back
Top