[Linuxulator] How to run Google Chrome (linux-binary) on FreeBSD

patovm04

Member

Reaction score: 40
Messages: 52

Important notes:
1) Tested upon FreeBSD 12.2-RELEASE. Used Ubuntu-based linux compat instead of default CentOS one.
2) Sound, webcam, microphone, hardware acceleration all properly work. Widevine support too (Netflix, Spotify, Amazon Prime Video, HBO Max, etc).
3) The /home and /tmp directories will be shared between FreeBSD and Linux apps.
4) To successfully run Google Chrome, we rely on games/linux-steam-utils workarounds.
5) Due to all sorts of problems encountered while using /compat/ubuntu as the chroot location, I've opted to use /compat/linux instead, although it's discouraged as it conflicts with CentOS-based ports. This means you need to remove any linux-c7* port you may have and avoid installing them afterwards too.
6) I recommend (although is not a requirement as far as I know) to use a tmpfs /tmp. This is not the case when using ZFS default installation, but can be easily fixed. Assuming the ZFS pool is named "zroot":
# First reboot into single-user mode.
# Remount root filesystem as read/write:
mount -u /
# Destroy /tmp from zroot:
zfs destroy -f zroot/tmp
# Add entry to /etc/fstab to use tmpfs for /tmp:
printf "tmpfs\t/tmp\ttmpfs\trw,mode=1777\t0\t0\n" >> /etc/fstab
# Reboot back to normal multi-user mode.


Let's begin:
su
# Enable linux compatibility layer:
sysrc linux_enable=YES

# Start linux service:
service linux start

# Install needed packages:
pkg install linux-steam-utils debootstrap pulseaudio

# Copy the useful files to a temporary folder:
cp -R /usr/local/steam-utils /usr/local/steam-utils-bak

# Uninstall linux-steam-utils and all its dependencies:
pkg delete linux-steam-utils && pkg autoremove

# Move back /usr/local/steam-utils-bak to the correct location:
mv /usr/local/steam-utils-bak/ /usr/local/steam-utils

# Just to be sure to start clean:
rm -Rf /compat/linux

# Create necessary mount points for a working linuxulator:
mkdir -p /compat/linux/dev/fd && mkdir /compat/linux/dev/shm && mkdir /compat/linux/proc && mkdir /compat/linux/sys && mkdir /compat/linux/home && mkdir /compat/linux/tmp

# Make sure your /etc/fstab looks like this:
Code:
tmpfs                   /tmp            tmpfs           rw,mode=1777            0       0
procfs                  /proc           procfs          rw,late                 0       0
fdescfs                 /dev/fd         fdescfs         rw,late                 0       0
linprocfs       /compat/linux/proc      linprocfs       rw,late                 0       0
linsysfs        /compat/linux/sys       linsysfs        rw,late                 0       0
devfs           /compat/linux/dev       devfs           rw,late                 0       0
fdescfs         /compat/linux/dev/fd    fdescfs         rw,late,linrdlnk        0       0
tmpfs           /compat/linux/dev/shm   tmpfs           rw,late,mode=1777       0       0
/home           /compat/linux/home      nullfs          rw,late                 0       0
/tmp            /compat/linux/tmp       nullfs          rw,late                 0       0


# Mount needed filesystems:
mount -al

# Install Ubuntu 20.04 into /compat/linux:
debootstrap --arch=amd64 --no-check-gpg focal /compat/linux

# Fix APT package manager:
printf "APT::Cache-Start 251658240;" > /compat/linux/etc/apt/apt.conf.d/00aptitude

# Enable more repositories:
printf "deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse" > /compat/linux/etc/apt/sources.list

# Add Chrome repository:
printf "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /compat/linux/etc/apt/sources.list.d/google-chrome.list

# Fetch Chrome signing key:
fetch -o /compat/linux/ https://dl.google.com/linux/linux_signing_key.pub

# Create custom Chrome launcher script and make it executable:
touch /compat/linux/bin/chrome && chmod +x /compat/linux/bin/chrome

# Edit it so it has this content:
Code:
#!/compat/linux/bin/bash

export CHROME_PATH="/opt/google/chrome/chrome"
export CHROME_WRAPPER="`readlink -f "$0"`"
export LD_LIBRARY_PATH=/usr/local/steam-utils/lib64/fakeudev
export LD_PRELOAD=/usr/local/steam-utils/lib64/webfix/webfix.so
export LIBGL_DRI3_DISABLE=1

exec -a "$0" "$CHROME_PATH" --no-sandbox --no-zygote --test-type --v=0 "$@"


# Fix broken symlink:
cd /compat/linux/lib64/ && rm ./ld-linux-x86-64.so.2 ; ln -s ../lib/x86_64-linux-gnu/ld-2.31.so ld-linux-x86-64.so.2

# Set correct timezone inside your chroot:
printf "%b\n" "0.0 0 0.0\n0\nUTC" > /compat/linux/etc/adjtime

# Make sure everything is properly mounted:
mount -al

# Chroot into your linux environment:
chroot /compat/linux /bin/bash

# Choose your timezone:
dpkg-reconfigure tzdata

# Install some required programs (except for ttf-mscorefonts-installer which is optional):
apt update ; apt install -y gnupg pulseaudio fonts-symbola ttf-mscorefonts-installer

# Install Google Chrome:
apt-key add linux_signing_key.pub && apt update && apt install -y google-chrome-stable

# Exit chroot
exit

# Exit su
exit

# Now create a .desktop file to launch Chrome as any other app:
touch ~/.local/share/applications/google-chrome.desktop

# Make it contain something like this:
Code:
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Google Chrome
Comment=Google web browser based on WebKit
Icon=google-chrome
Exec=/compat/linux/bin/chrome
Categories=Application;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
StartupNotify=true


*Note: Syncing or accessing your google account won't work. It will display:
"Couldn't sign you in This browser or app may not be secure. Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in."

To fix this, change your user agent to Firefox, for instance, and login to Gmail (keep it logged in). Then change your user agent back to default and turn on sync. User-Agent Switcher and Manager extension is what worked for me 👍


Also be aware that if you didn't have pulseaudio already installed on FreeBSD, a reboot may be required to get sound working within Google Chrome.

If you happen to still have sound issues, please see comment #43.


That's all!
Many thanks to Alex S. (shkhln) for his games/linux-steam-utils port, and Alexandru Hamedu (st1905) for helping in all sorts of things earlier when trying to set up a CentOS-based linuxulator.


Sources:
https://wiki.freebsd.org/LinuxJails
https://wiki.freebsd.org/LinuxApps
https://wiki.freebsd.org/Linuxulator
https://help.ubuntu.com/lts/installation-guide/armhf/apds04.html
https://github.com/AppImage/AppImageKit/issues/98
https://pastebin.com/1W9Fh3e9

EDIT 1: Replaced sudo for su to fix some of the commands above.
EDIT 2: Reworded the point about using a tmpfs /tmp to make it clearer.
EDIT 3: Added a workaround to be able to log in to google accounts, and fix syncing.
EDIT 4: Added pulseaudio as a required package for both FreeBSD and the Ubuntu chroot. This should fix sound output in most of the cases.
EDIT 5: Added fonts-symbola to fix some missing characters.
EDIT 6: Rewrote Chrome launcher script to fix PWA (Progressive Web Apps).
EDIT 7: Added link to a fix by "mrclksr" that explains how to tell pulseaudio clients where to find sound.
 
Last edited:
OP
patovm04

patovm04

Member

Reaction score: 40
Messages: 52

Bonus: This method should be valid for installing any other Chromium-based web browser (Opera, Vivaldi, Edge, etc).
For instance, after doing all of the above, installing Brave browser is as simple as doing the following:

su
# Chroot into your linux environment:
chroot /compat/linux /bin/bash

# Install some needed programs:
apt install -y apt-transport-https curl

# Add Brave signing key:
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -

# Add Brave repository:
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | tee /etc/apt/sources.list.d/brave-browser-release.list

# Install Brave web browser:
apt update && apt install -y brave-browser

# Exit chroot:
exit

# Create custom Brave launcher script and make it executable:
touch /compat/linux/bin/brave && chmod +x /compat/linux/bin/brave

# Edit it so it has this content:
Code:
#!/compat/linux/bin/bash

export BRAVE_PATH="/opt/brave.com/brave/brave"
export CHROME_WRAPPER="`readlink -f "$0"`"
export LD_LIBRARY_PATH=/usr/local/steam-utils/lib64/fakeudev
export LD_PRELOAD=/usr/local/steam-utils/lib64/webfix/webfix.so
export LIBGL_DRI3_DISABLE=1

exec -a "$0" "$BRAVE_PATH" --no-sandbox --no-zygote --test-type --v=0 "$@"


# Exit su:
exit

# Now create a .desktop file to launch Brave as any other app:
touch ~/.local/share/applications/brave-browser.desktop

# Make it look like this:
Code:
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Name=Brave Web Browser
Comment=Access the Internet
Icon=brave-browser
Exec=/compat/linux/bin/brave
Categories=Application;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
StartupNotify=true


All done! And it runs as well as Google Chrome 👍;)

EDIT 1: Rewrote Brave launcher script to fix PWA (Progressive Web Apps).
EDIT 2: Actually fix PWA for Brave.
 
Last edited:

twschulz

Member

Reaction score: 8
Messages: 24

Hmm... I gave this a shot, but it seems I must have gone astray one place. Actually, the first time it asks me to make sure that /dev/shm is 1777 (of course this is /compat/linux/dev/shm). I did that and then get this message:

Code:
/compat/linux/bin/sh -x /compat/linux/bin/chrome
+ readlink -f /compat/linux/bin/chrome
+ SCRIPT=/compat/linux/bin/chrome
+ dirname /compat/linux/bin/chrome
+ readlink -f /compat/linux/bin/..
+ USR_DIRECTORY=/compat/linux
+ CHROME_PATH=/opt/google/chrome/chrome
+ export LD_LIBRARY_PATH=/usr/local/steam-utils/lib64/fakeudev
+ export LD_PRELOAD=/usr/local/steam-utils/lib64/webfix/webfix.so
+ export LIBGL_DRI3_DISABLE=1
+ /opt/google/chrome/chrome --no-sandbox --no-zygote --test-type --v=0
[36030:101686:1102/202353.943052:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
Gtk-Message: 20:23:54.074: Failed to load module "colorreload-gtk-module"
Gtk-Message: 20:23:54.075: Failed to load module "appmenu-gtk-module"
[36030:101690:1102/202354.095410:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[36030:36030:1102/202354.095989:ERROR:proxy_config_service_linux.cc(607)] inotify_init failed: Function not implemented (38)
[36030:101686:1102/202354.101314:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[36030:101687:1102/202354.104834:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.com.google.Chrome.kbJFfB failed: Operation not supported (95)
[36030:101687:1102/202354.105280:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.com.google.Chrome.YOHGEB failed: Operation not supported (95)
Aborted


My mount seems to be correct as well:

Code:
linprocfs on /compat/linux/proc (linprocfs, local)
linsysfs on /compat/linux/sys (linsysfs, local)
tmpfs on /tmp (tmpfs, local)
tmpfs on /compat/linux/dev/shm (tmpfs, local)
procfs on /proc (procfs, local)
fdescfs on /compat/linux/dev/fd (fdescfs)
devfs on /compat/linux/dev (devfs, local, multilabel)
/usr/home on /compat/linux/home (nullfs, local)
/tmp on /compat/linux/tmp (nullfs, local)


FWIW, since my user has its own dataset, you also need to mount that with nullfs as well.

I'd love to hear where I may have gone wrong. It seems that I missed something.
 
OP
patovm04

patovm04

Member

Reaction score: 40
Messages: 52

Hmm... I gave this a shot, but it seems I must have gone astray one place. Actually, the first time it asks me to make sure that /dev/shm is 1777 (of course this is /compat/linux/dev/shm). I did that and then get this message:

Code:
/compat/linux/bin/sh -x /compat/linux/bin/chrome
+ readlink -f /compat/linux/bin/chrome
+ SCRIPT=/compat/linux/bin/chrome
+ dirname /compat/linux/bin/chrome
+ readlink -f /compat/linux/bin/..
+ USR_DIRECTORY=/compat/linux
+ CHROME_PATH=/opt/google/chrome/chrome
+ export LD_LIBRARY_PATH=/usr/local/steam-utils/lib64/fakeudev
+ export LD_PRELOAD=/usr/local/steam-utils/lib64/webfix/webfix.so
+ export LIBGL_DRI3_DISABLE=1
+ /opt/google/chrome/chrome --no-sandbox --no-zygote --test-type --v=0
[36030:101686:1102/202353.943052:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
Gtk-Message: 20:23:54.074: Failed to load module "colorreload-gtk-module"
Gtk-Message: 20:23:54.075: Failed to load module "appmenu-gtk-module"
[36030:101690:1102/202354.095410:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[36030:36030:1102/202354.095989:ERROR:proxy_config_service_linux.cc(607)] inotify_init failed: Function not implemented (38)
[36030:101686:1102/202354.101314:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[36030:101687:1102/202354.104834:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.com.google.Chrome.kbJFfB failed: Operation not supported (95)
[36030:101687:1102/202354.105280:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.com.google.Chrome.YOHGEB failed: Operation not supported (95)
Aborted


My mount seems to be correct as well:

Code:
linprocfs on /compat/linux/proc (linprocfs, local)
linsysfs on /compat/linux/sys (linsysfs, local)
tmpfs on /tmp (tmpfs, local)
tmpfs on /compat/linux/dev/shm (tmpfs, local)
procfs on /proc (procfs, local)
fdescfs on /compat/linux/dev/fd (fdescfs)
devfs on /compat/linux/dev (devfs, local, multilabel)
/usr/home on /compat/linux/home (nullfs, local)
/tmp on /compat/linux/tmp (nullfs, local)


FWIW, since my user has its own dataset, you also need to mount that with nullfs as well.

I'd love to hear where I may have gone wrong. It seems that I missed something.
Hmm you're missing the other fdescfs (the one mounted in /dev/fd).
I think you just need to modify your /etc/fstab ( sudo ee /etc/fstab) and copy-paste this there:
Code:
tmpfs                   /tmp            tmpfs           rw,mode=1777            0       0
procfs                  /proc           procfs          rw,late                 0       0
fdescfs                 /dev/fd         fdescfs         rw,late                 0       0
linprocfs       /compat/linux/proc      linprocfs       rw,late                 0       0
linsysfs        /compat/linux/sys       linsysfs        rw,late                 0       0
devfs           /compat/linux/dev       devfs           rw,late                 0       0
fdescfs         /compat/linux/dev/fd    fdescfs         rw,late,linrdlnk        0       0
tmpfs           /compat/linux/dev/shm   tmpfs           rw,late,mode=1777       0       0
/home           /compat/linux/home      nullfs          rw,late                 0       0
/tmp            /compat/linux/tmp       nullfs          rw,late                 0       0

Then do sudo mount -al and try again
 

lme@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 303
Messages: 776

Having widevine support would be fantastic!
I tried your tutorial but Chrome only shows an white window, Brave browser acts the same. If I start it from a terminal I see this:

Code:
NomadBSD:/home/lars% /compat/linux/bin/chrome 
[15192:101657:1103/220956.205343:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
[15192:101662:1103/220956.534722:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101657:1103/220956.539591:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[15192:101658:1103/220956.543718:ERROR:udev_watcher.cc(51)] Failed to initialize a udev monitor.
[15192:101671:1103/220956.624886:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101671:1103/220956.625928:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101671:1103/220956.670035:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101671:1103/220956.671282:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15194:101675:1103/220956.678367:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
[15194:101677:1103/220956.678383:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[15192:101681:1103/220957.115639:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.116773:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.117296:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.117944:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.118422:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15194:101675:1103/220957.119997:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[15194:101675:1103/221005.057441:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)

# freebsd-version -uk
12.2-RELEASE
12.2-RELEASE

# df -h
Filesystem                   Size    Used   Avail Capacity  Mounted on
zroot/ROOT/nomadbsd-1.3.1    856G    9.2G    846G     1%    /
devfs                        1.0K    1.0K      0B   100%    /dev
[...]
procfs                       4.0K    4.0K      0B   100%    /proc
tmpfs                         19G     21M     19G     0%    /tmp
linprocfs                    4.0K    4.0K      0B   100%    /compat/linux/proc
linsysfs                     4.0K    4.0K      0B   100%    /compat/linux/sys
devfs                        1.0K    1.0K      0B   100%    /compat/linux/dev
fdescfs                      1.0K    1.0K      0B   100%    /compat/linux/dev/fd
tmpfs                         19G    4.0K     19G     0%    /compat/linux/dev/shm
/usr/home                    869G     23G    846G     3%    /compat/linux/home
/tmp                          19G     21M     19G     0%    /compat/linux/tmp

# kldstat

kldstat 
Id Refs Address                Size Name
 1  109 0xffffffff80200000  227ad00 kernel
 2    1 0xffffffff8247b000   3bad38 zfs.ko
 3    2 0xffffffff82836000     a448 opensolaris.ko
 4    1 0xffffffff82841000     71a8 ums.ko
 5    1 0xffffffff832fa000     4df4 cuse.ko
 6    1 0xffffffff832ff000     31c8 acpi_ibm.ko
 7    1 0xffffffff83303000   12bd6c i915kms.ko
 8    1 0xffffffff8342f000    75c50 drm.ko
 9    4 0xffffffff834a5000    12d30 linuxkpi.ko
10    3 0xffffffff834b8000    13f30 linuxkpi_gplv2.ko
11    2 0xffffffff834cc000      6d0 debugfs.ko
12    1 0xffffffff834cd000     245d i915_skl_dmc_ver1_27_bin.ko
13    1 0xffffffff834d0000      ac0 sysctlbyname_improved.ko
14    1 0xffffffff834d1000    16bf0 if_iwm.ko
15    1 0xffffffff834e8000   205e11 iwm8000Cfw.ko
16    1 0xffffffff836ee000     4260 ng_ubt.ko
17    3 0xffffffff836f3000     9bd0 netgraph.ko
18    2 0xffffffff836fd000     9128 ng_hci.ko
19    1 0xffffffff83707000      9b0 ng_bluetooth.ko
20    1 0xffffffff83708000     1000 cpuctl.ko
21    1 0xffffffff83709000    3c490 linux.ko
22    4 0xffffffff83746000     4b80 linux_common.ko
23    1 0xffffffff8374b000    35cb0 linux64.ko
24    1 0xffffffff83781000      4f9 pty.ko
25    1 0xffffffff83782000     54f8 linprocfs.ko
26    1 0xffffffff83788000     1f3c linsysfs.ko
27    1 0xffffffff8378a000     1a20 fdescfs.ko
28    1 0xffffffff8378c000     87d0 tmpfs.ko
29    1 0xffffffff83795000     2940 nullfs.ko
30    1 0xffffffff83798000      acf mac_ntpd.ko
31    1 0xffffffff83799000    18f28 ext2fs.ko
32    1 0xffffffff837b2000    103f0 fusefs.ko
33    1 0xffffffff837c3000     3d64 geom_linux_lvm.ko
34    1 0xffffffff837c7000     20c0 acpi_wmi.ko
35    1 0xffffffff837ca000     2a80 acpi_video.ko


Do you have an idea what I could do?
 

lme@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 303
Messages: 776

Don't forget fakeudev.
I do have the fakeudev export in the chrome start script. And the lib is also there:
Code:
# ls /usr/local/steam-utils/lib64/fakeudev/
libudev.so.0


BTW: /var/log/messages shows:

Code:
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (Chrome_IOThread): syscall inotify_init not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (VideoCaptureThr): syscall name_to_handle_at not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (CacheThread_Blo): possibly incorrect MADV_DONTNEED
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (ThreadPoolSingl): ioctl fd=65, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (ThreadPoolSingl): ioctl fd=66, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (ThreadPoolSingl): ioctl fd=70, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (ThreadPoolSingl): ioctl fd=77, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (ThreadPoolSingl): ioctl fd=76, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (ThreadPoolSingl): ioctl fd=85, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16765 (ThreadPoolForeg): syscall inotify_init not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16763 (ThreadPoolSingl): ioctl fd=53, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16764 (GpuWatchdog): syscall memfd_create not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16765 (ThreadPoolForeg): ioctl fd=49, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:50 NomadBSD kernel: linux: pid 16765 (ThreadPoolForeg): unsupported madvise behav -1
Nov  3 23:09:50 NomadBSD kernel: pid 16764 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: linux: pid 16768 (GpuWatchdog): syscall memfd_create not implemented
Nov  3 23:09:51 NomadBSD kernel: pid 16768 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: linux: pid 16765 (ThreadPoolForeg): ioctl fd=71, cmd=0xf50c ('�',12) is not implemented
Nov  3 23:09:51 NomadBSD kernel: linux: pid 16769 (GpuWatchdog): syscall memfd_create not implemented
Nov  3 23:09:51 NomadBSD kernel: pid 16769 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: linux: pid 16763 (BatteryStatusNo): possibly incorrect MADV_DONTNEED
Nov  3 23:09:51 NomadBSD kernel: pid 16772 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: linux: pid 16763 (BatteryStatusNo): possibly incorrect MADV_DONTNEED
Nov  3 23:09:51 NomadBSD syslogd: last message repeated 3 times
Nov  3 23:09:51 NomadBSD kernel: pid 16773 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16775 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16776 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16777 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16778 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16763 (BatteryStatusNo), jid 0, uid 1001: exited on signal 5
 
OP
patovm04

patovm04

Member

Reaction score: 40
Messages: 52

Having widevine support would be fantastic!
I tried your tutorial but Chrome only shows an white window, Brave browser acts the same. If I start it from a terminal I see this:

Code:
NomadBSD:/home/lars% /compat/linux/bin/chrome
[15192:101657:1103/220956.205343:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
[15192:101662:1103/220956.534722:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101657:1103/220956.539591:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[15192:101658:1103/220956.543718:ERROR:udev_watcher.cc(51)] Failed to initialize a udev monitor.
[15192:101671:1103/220956.624886:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101671:1103/220956.625928:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101671:1103/220956.670035:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101671:1103/220956.671282:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15194:101675:1103/220956.678367:ERROR:file_path_watcher_linux.cc(315)] inotify_init() failed: Function not implemented (38)
[15194:101677:1103/220956.678383:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[15192:101681:1103/220957.115639:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.116773:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.117296:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.117944:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15192:101681:1103/220957.118422:ERROR:bus.cc(393)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[15194:101675:1103/220957.119997:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)
[15194:101675:1103/221005.057441:ERROR:address_tracker_linux.cc(195)] Could not create NETLINK socket: Address family not supported by protocol (97)

# freebsd-version -uk
12.2-RELEASE
12.2-RELEASE

# df -h
Filesystem                   Size    Used   Avail Capacity  Mounted on
zroot/ROOT/nomadbsd-1.3.1    856G    9.2G    846G     1%    /
devfs                        1.0K    1.0K      0B   100%    /dev
[...]
procfs                       4.0K    4.0K      0B   100%    /proc
tmpfs                         19G     21M     19G     0%    /tmp
linprocfs                    4.0K    4.0K      0B   100%    /compat/linux/proc
linsysfs                     4.0K    4.0K      0B   100%    /compat/linux/sys
devfs                        1.0K    1.0K      0B   100%    /compat/linux/dev
fdescfs                      1.0K    1.0K      0B   100%    /compat/linux/dev/fd
tmpfs                         19G    4.0K     19G     0%    /compat/linux/dev/shm
/usr/home                    869G     23G    846G     3%    /compat/linux/home
/tmp                          19G     21M     19G     0%    /compat/linux/tmp

# kldstat

kldstat
Id Refs Address                Size Name
1  109 0xffffffff80200000  227ad00 kernel
2    1 0xffffffff8247b000   3bad38 zfs.ko
3    2 0xffffffff82836000     a448 opensolaris.ko
4    1 0xffffffff82841000     71a8 ums.ko
5    1 0xffffffff832fa000     4df4 cuse.ko
6    1 0xffffffff832ff000     31c8 acpi_ibm.ko
7    1 0xffffffff83303000   12bd6c i915kms.ko
8    1 0xffffffff8342f000    75c50 drm.ko
9    4 0xffffffff834a5000    12d30 linuxkpi.ko
10    3 0xffffffff834b8000    13f30 linuxkpi_gplv2.ko
11    2 0xffffffff834cc000      6d0 debugfs.ko
12    1 0xffffffff834cd000     245d i915_skl_dmc_ver1_27_bin.ko
13    1 0xffffffff834d0000      ac0 sysctlbyname_improved.ko
14    1 0xffffffff834d1000    16bf0 if_iwm.ko
15    1 0xffffffff834e8000   205e11 iwm8000Cfw.ko
16    1 0xffffffff836ee000     4260 ng_ubt.ko
17    3 0xffffffff836f3000     9bd0 netgraph.ko
18    2 0xffffffff836fd000     9128 ng_hci.ko
19    1 0xffffffff83707000      9b0 ng_bluetooth.ko
20    1 0xffffffff83708000     1000 cpuctl.ko
21    1 0xffffffff83709000    3c490 linux.ko
22    4 0xffffffff83746000     4b80 linux_common.ko
23    1 0xffffffff8374b000    35cb0 linux64.ko
24    1 0xffffffff83781000      4f9 pty.ko
25    1 0xffffffff83782000     54f8 linprocfs.ko
26    1 0xffffffff83788000     1f3c linsysfs.ko
27    1 0xffffffff8378a000     1a20 fdescfs.ko
28    1 0xffffffff8378c000     87d0 tmpfs.ko
29    1 0xffffffff83795000     2940 nullfs.ko
30    1 0xffffffff83798000      acf mac_ntpd.ko
31    1 0xffffffff83799000    18f28 ext2fs.ko
32    1 0xffffffff837b2000    103f0 fusefs.ko
33    1 0xffffffff837c3000     3d64 geom_linux_lvm.ko
34    1 0xffffffff837c7000     20c0 acpi_wmi.ko
35    1 0xffffffff837ca000     2a80 acpi_video.ko


Do you have an idea what I could do?
Looks like you're missing this line in /etc/fstab:
Code:
fdescfs                 /dev/fd         fdescfs         rw,late                 0       0

Also make sure your /compat/linux/bin/chrome has this line:
Code:
export LIBGL_DRI3_DISABLE=1

It's mandatory for all this to work, because at the moment DRI3 isn't working under linuxulator.
 

shkhln

Daemon

Reaction score: 714
Messages: 1,746

I do have the fakeudev export in the chrome start script. And the lib is also there:
Code:
# ls /usr/local/steam-utils/lib64/fakeudev/
libudev.so.0
I'd rather see procstat -v output.

BTW: /var/log/messages shows:

Code:
…
Nov  3 23:09:51 NomadBSD kernel: pid 16773 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16775 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16776 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16777 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16778 (GpuWatchdog), jid 0, uid 1001: exited on signal 5
Nov  3 23:09:51 NomadBSD kernel: pid 16763 (BatteryStatusNo), jid 0, uid 1001: exited on signal 5
https://github.com/shkhln/linuxulator-steam-utils/commit/aac04139e23c73f4da5abba5b0ac12c6bfd76832
 
OP
patovm04

patovm04

Member

Reaction score: 40
Messages: 52

Mine is working just fine without "--in-process-gpu"
Screenshot_20201103_192041.png
 

lme@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 303
Messages: 776

Actually it's no longer NomadBSD after I upgraded from NomadBSD to FreeBSD 12.2-RELEASE.
But I can try with a stock FreeBSD installation tomorrow.
 

lme@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 303
Messages: 776

Looks like you're missing this line in /etc/fstab:
Code:
fdescfs                 /dev/fd         fdescfs         rw,late                 0       0

Also make sure your /compat/linux/bin/chrome has this line:
Code:
export LIBGL_DRI3_DISABLE=1

It's mandatory for all this to work, because at the moment DRI3 isn't working under linuxulator.

That's it! I don't know why I missed the fdesc line for fstab in your first post. It's working like a charm now! :)
 

twschulz

Member

Reaction score: 8
Messages: 24

Yes, that seemed to be the thing. I had added it to the fstab, but forgot to do the mount. Thank you, it's working now. Excellent. I'll have to see if the teams standalone app works with this recipe too. I can post that when/if it actually works.

Impressive work and double kudos for documenting it so well.

Just curious, but why does /tmp have to be tmpfs? Is it because it can be mounted mode=1777? It was the only thing that took some work to untangle (I had to boot into single user mode to be able to unmount it correctly).

Thank you again.
 
OP
patovm04

patovm04

Member

Reaction score: 40
Messages: 52

Yes, that seemed to be the thing. I had added it to the fstab, but forgot to do the mount. Thank you, it's working now. Excellent. I'll have to see if the teams standalone app works with this recipe too. I can post that when/if it actually works.

Impressive work and double kudos for documenting it so well.

Just curious, but why does /tmp have to be tmpfs? Is it because it can be mounted mode=1777? It was the only thing that took some work to untangle (I had to boot into single user mode to be able to unmount it correctly).

Thank you again.
Actually that was more of a recommendation than a requirement, as tmpfs provides better performance and doesn't cause troubles with some programs (like Firefox on Wayland AFAIK). I honestly can't say this hack wouldn't work without tmpfs on /tmp, as I have not tried it. Gonna reword that part of the tutorial to make it clear.
And don't forget to let us know if Teams work ;)
 

scottro

Daemon

Reaction score: 597
Messages: 1,611

It sort of worked for me. I ran into two issues, but I may have mistyped something along the way. The first was trying to install ttf-mscorefonts-installer, I got no such package. Secondly, though chrome runs, I have no sound. For what it's worth, I use openbox with no icons, and ran it with /compat/linux/bin/chrome. It does run Netflix videos but again, no sound. I'll have to give it another try.
 

lme@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 303
Messages: 776

I also had no sound when I first tried Chrome. The next day after a reboot I had sound. So maybe that's something you can try.
 

scottro

Daemon

Reaction score: 597
Messages: 1,611

I definitely had some typos--doing it again, and this time I have the msfont installer. I copied and pasted this time.

But still no sound, even after a reboot.
 
OP
patovm04

patovm04

Member

Reaction score: 40
Messages: 52

I definitely had some typos--doing it again, and this time I have the msfont installer. I copied and pasted this time.

But still no sound, even after a reboot.
Did you install pulseaudio on Ubuntu? I didn't have sound till I installed it.
 

phpdave11

New Member


Messages: 5

Did you install pulseaudio on Ubuntu? I didn't have sound till I installed it.
This works great, except sound doesn't work. I'm able to play Netflix, but sound doesn't work on any site. I tried installing pulseaudio in the ubuntu chroot, but it said it was already installed:

pulseaudio is already the newest version (1:13.99.1-1ubuntu3).

Sound works fine in regular chromium on FreeBSD 12.2. Any idea why it doesn't work with the Ubuntu chroot?
 
Top