The officially official Devuan Forum!

You are not logged in.

#1 Re: Off-topic » A Libreoffice Writer ODT that Crashes the Devuan Desktop » 2024-11-12 17:03:31

This sorry tale continues.
...
I can't take much more of this.

Hi alexkemp. We are a GNU/Linux-only household and I homeschool my 6 kids. We used to run Libreoffice on the classroom computer but over the years we've corrupted several documents through seemingly innocent document formatting. LO is a complex beast and seems to house some gremlins.

I finally gave up on Libreoffice and installed Abiword (for word processing) and Gnumeric (for spreadsheets) over a year ago. We never had any problems after that, despite heavy use. If you are fed up with LO and would like to try a less complex solution, Abiword and Gnumeric are both excellent.

#2 Re: DIY » init bloat » 2024-11-02 15:15:53

Hi alphaalpha. I dual boot Devuan and Tiny Core Linux. You may find it interesting that TCL does the opposite of what you're considering: It crams the entire (very tiny) OS into the initramfs. The result is a system that runs from RAM and is very fast.

More details at the links:

https://distrowatch.com/weekly-mobile.p … 23#feature

http://tinycorelinux.net/book.html

Have fun with initramfs. It's s good way to understand how linux works.

#3 Re: Devuan » Why has no one enhanced sysvinit? » 2024-10-05 11:06:17

I was neither endorsing SysVinit nor saying there aren't better init systems. I was just answering the OP's question, which is misleading.

#4 Re: Devuan » Why has no one enhanced sysvinit? » 2024-10-04 15:50:00

SysVinit has been enhanced multiple times, most notably by the addition of the insserv and startpar scripts, which serve to organize the boot sequence and start services in parallel, respectively. These scripts lead to a dramatic improvement in boot time. I've heard people refer to sysvinit + insserv + startpar as "augmented SysVinit." Devuan uses augmented SysVinit.

SysVinit was being used in UNIX in the late 1980s. I'm not sure when the augmentation happened: Based on the years written inside the source files, it may have been 2004. Judging from earliest git commit, it may have been 2012. If someone knows the history better, please jump in with the correct year when insserv and startpar were born. I can safely say it was sometime in the 21st Century smile My point is that the addition of these scripts was a major enhancement.

A new chapter in SysVinit's history began when Jesse Smith (DistroWatch administrator) took over its maintenance in 2022. There have been several new releases of SysVinit since then, including two releases this year. With each release there are additional enhancements (e.g., minor bug fixes).

#5 Re: Other Issues » What is the real MAC of wlan0 ? » 2024-09-21 03:23:08

I suppose it could store it textually?
would be 37363a30633a64313a34363a66373a3839 in hex

Good idea but no luck. I think we've excluded that the initial mac address is hardcoded in the firmware.

Hi pcalvert. That's a good thought, but not applicable to my setup. The settings you are referring to are wifi.scan-rand-mac-address and wifi.mac-address-randomization. I use MAC address filtering in my router, so definitely don't want my devices to connect using randomized MAC addresses. I can confirm that NetworkManager is not using any of these settings:

$ cd /etc/NetworkManager/
$ sudo grep -r 'mac-address' *
[no hits]

Plus, I dual boot Devuan and Tiny Core Linux. In the latter, MAC address of my wireless card is the same as what Devuan is showing me (i.e., 54:2a:a2:6a:xx:xx).

Ralph, I think your initial theory is sounds right: There must be a hardware MAC address, which the driver or firmware changes to what I think of as my "actual" MAC address.  A small amount of time (~2 seconds) elapses between wlan0 being brought up and the driver/firmware changing the MAC address.

EDIT: Ralph, if you run my trivial script in reply #2 as a startup job, can you reproduce my observation that MAC address changes? (Although exactly what happens--and when--likely depends on the specific hardware, driver, and firmware.)

#6 Re: Other Issues » What is the real MAC of wlan0 ? » 2024-09-21 00:33:46

This wireless card requires two firmware files. I cannot find that initial MAC address in either file.

$ xxd -p mt7662.bin | tr -d '\n' | grep 760cd146f789
[no hits]
$ xxd -p mt7662_rom_patch.bin | tr -d '\n' | grep 760cd146f789
[no hits]

Maybe I'm not looking the right way.

#7 Re: Other Issues » What is the real MAC of wlan0 ? » 2024-09-20 23:27:35

Perhaps the MAC is changed by firmware?

Hi ralph.ronnquist. I'd love to get to the bottom of this if you can help me. I tried removing the firmware files to see what would happen. If I boot without the firmware, I get this (which is more or less what I expected):

$ cat /sys/class/net/wlan0/address
cat: /sys/class/net/wlan0/address: No such file or directory

What would be the best way to test your theory?

#8 Re: Other Issues » What is the real MAC of wlan0 ? » 2024-09-20 20:21:14

Hi SpongeBOB. Try cat /sys/class/net/wlan0/address

Although in my tests on Devuan, the above command gives a nonsense address if run in the first two seconds after booting. Does anyone know why? If I run this little script at boot:

#!/bin/sh
while true; do
    cat /sys/class/net/wlan0/address >>/home/bruno/Deskop/log.txt
    sleep 1
done

The first two lines in the log file show the unexpected 76:0c:d1:46:f7:89. Lines three onwards show the device's true mac address, which is 54:2a:a2:6a:xx:xx (redacted for privacy).

I've always wondered why wlan0's mac address in /sys/class/net/wlan0/address is only accurate approximately 2 seconds after boot. Does anyone have any idea?

#9 Re: Desktop and Multimedia » Appimage non functional as normal user » 2024-07-07 01:59:23

Hi Red_Fir. I've encountered your issue with some recent appimages:

$ ./foo.AppImage
fuse: failed to exec fusermount: Permission denied

I'm able to fix the problem like this:

$ export FUSERMOUNT_PROG=$(which fusermount)
$ ./foo.AppImage

The bug was introduced by recent changes in the tools used to create appimages and has nothing to do with Devuan. Old appimages that were working fine on Devuan 4 (Chimaera) are still working fine for me on Devuan 5 (Daedalus) without the above workaround.

#10 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-03-12 19:23:18

Just a quick follow-up regarding haveged.

TL;DR version:
    With modern linux kernels (5.6 or later) there is no need to install haveged on a GNU/Linux box being used as a wireless router.

Detailed version:
    Entropy is needed for fast communication between wireless router and wireless clients (due to wpa2 cryptography operations). It used to be recommended to run cat /proc/sys/kernel/random/entropy_avail on the router and, if result was less than 1000, to install haveged and run it as a daemon to augment router's entropy pool.
    Turns out that linux 5.6 incorporated a haveged-inspired mechanism that generates entropy extremely quickly (~200 MiB/s), making the haveged daemon obsolete for this use case (fast entropy generation). Also, result of cat /proc/sys/kernel/random/entropy_avail is now meaningless (the command always returns "256").

Ref: https://github.com/jirka-h/haveged/issues/57

P.S. Would the forum moderator kindly delete haveged from Reply #18 (two places) and Reply #21 (one place)? I tried to delete it myself, but was denied ("You do not have permission to access this page").

#11 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-21 04:10:38

If I run nmcli dev set wlan0 managed no, how do I undo the effects of this when I've finished using the Access Point

With nmcli dev set wlan0 managed yes

or does the command sudo pkill hostapd; sudo pkill -f 'dnsmasq.*/tmp/dnsmasq.conf' take care of this?

No.

Regarding wicd, its last stable release was in 2016 and last merge request from 2019. You could try it but the software is unmaintained.

#12 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-19 18:43:57

Hello again, mtbvfr. The nmcli command (see reply #25 just above) made the "handle_probe_req: send failed" messages disappear on my ThinkPad X230 with Devuan Daedalus smile Now the hotspot created with skinny-create-ap is completely stable.

I updated the script in reply #18 to include the nmcli command. I will go ahead and mark the thread as "Solved" (almost 7 years later--haha).

P.S. Please let me know if the nmcli command fixes things on your Lenovo L540. As for your other laptops, I'll leave those for you and other users to troubleshoot. I suggest scrutinizing the wifi hardware (not all hardware supports AP mode), excluding interference from network managers, and excluding interference from other software (e.g., rfkill).

#13 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-19 17:53:27

Sometimes, after a while, "handle_probe_req: send failed" is output multiple times.

Hi mtbvfr. I cannot reproduce the problem on my ThinkPad X200 with ALFA USB wifi adapter and Tiny Core Linux.

I don't normally run the skinny-create-ap script on my ThinkPad X230 with Devuan Daedalus but I gave it a try and I am able to reproduce your problem:

$ sudo skinny-create-ap wlx00127b20535e wlan0 DevuanHotspot TopSecret123
...
[I can connect to the hotspot using my phone, and phone can access the internet without any problems for several minutes]
wlx00127b20535e: INTERFACE-DISABLED 
wlx00127b20535e: INTERFACE-ENABLED 
[here the phone loses connection to the hotspot]
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed

Since the hotspot works perfectly for several minutes before failing, I suspect the sudden failure is related to either power management or a networking daemon (e.g., NetworkManager) interfering.

One big difference between my X200 with TCL and X230 with Daedalus is that the latter uses NetworkManager.

Two questions for you, mtbvfr:

1. On your Lenovo L540 using Devuan Daedalus, is NetworkManager installed and running when you experience the "handle_probe_req: send failed" issue?

2. If you run nmcli dev set wlan0 managed no and then start the hotspot with sudo skinny-create-ap wlan0 eth0 DevuanHotspot TopSecret123 does the "handle_probe_req: send failed" problem go away?

I'm testing #2 right now.

#14 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-19 15:04:40

Hi mtbvfr. There are a lot of moving parts here. I will look at this on the weekend when I have more time.

But I do have two cents of advice that I can give right away:

Over the years, I've had many headaches of the type you're having now. I am not exaggerating when I say that all of my wifi-related headaches went away when I started using hand-picked hardware (ALFA AWUS036ACHM) and hand-picked minimalist OS (Tiny Core Linux) on my GNU/Linux box being used as a wireless router.

In other words, every problem I've ever encountered related to creating wifi hotspots were either due to poor hardware support or an OS that was getting in the way by doing things that I did not expect or desire.

#15 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-16 15:24:00

For sake of completeness, here are two variations on the skinny-create-ap script in reply #18. Both are tested and working for me.

Variation 1: nftables instead of iptables
If you would rather use the more modern nftables packet filtering interface for linux, only two tweaks need to be made to the instructions in reply #18.

1. Packages to install:

sudo apt install iproute2 nftables dnsmasq hostapd haveged 

2. Replace the script's setup_nat() function with this version:

setup_nat()
{
	nft add table ip nat
	nft add chain ip nat postrouting { type nat hook postrouting priority 0\; policy accept\; }
	nft add rule ip nat postrouting masquerade
}

Variation 2: 5 GHz hotspot instead of 2.4 GHz
This assumes your hardware supports it.

For me, creating a 5 GHz hotspot is simply a matter of replacing the script's setup_ap() function with this version:

setup_ap()
{
	# create hostapd config file:
	echo "
ssid=$ssid
interface=$lan_if
driver=nl80211
country_code=US
channel=44
ignore_broadcast_ssid=0
hw_mode=a
auth_algs=1
wpa=2 
wpa_passphrase=$password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP

# N
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40]
" >/tmp/hostapd.conf

	# start hostapd:
	hostapd /tmp/hostapd.conf
}

You may need to tweak the country_code, channel, and ht_capab variables, but the above settings are pretty vanilla.

I hope that reply #18 and this reply #21 provide all you need to setup your own GNU/Linux-powered router smile

Happy hacking!

----------

PS1: Regarding range--If you're going to have a GNU/Linux laptop working full-time as a wireless router, you should consider using a USB wifi adapter rather than laptop's built-in wireless card because it will give you much better signal strength/range. I've been using an ALFA AWUS036ACHM for this purpose for years and it has served me well. You can find information about USB wifi adapters on linux here.

PS2: On "router" vs. "wifi repeater"--This seems like a silly distinction. In both cases, the laptop is creating a wireless access point and forwarding packets between two networks. Conceptually, it makes no difference whether your device is sharing a wired or wireless internet connection. Put another way, a "wifi repeater" is just a special kind of router where the networks on both sides of the router have a wireless physical layer.

#16 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-15 14:42:48

You might want to disable automatic start of dnsmasq

Hi dzz. My skinny-create-ap script (in reply #18) starts dnsmasq in such a way that there is no clash if another instance of dnsmasq is already running. In general, multiple instances of dnsmasq can happily be running on the same machine as long as no two instances try to bind to the same interface.

#17 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-15 04:55:30

Hi mtbvfr. Thanks for the private message with the requested info.

I understand your laptop has a successful internet connection using ethernet cable on the eth0 nic, and you want to share that internet connection wirelessly by creating an access point on wlan0.

Based on the information you provided, it seems wlan0 is ready to be used for this purpose--its driver/firmware is loaded and it supports AP mode.

It seems create_ap is no longer maintained, so let's not bother with it.

I managed to get this working on Devuan Daedalus as follows:

0. No need to uninstall or disable NetworkManager if you have it

1. Install some packages:

sudo apt install iproute2 iptables dnsmasq hostapd haveged 

2. Create a script named skinny-create-ap somewhere in your PATH and make it executable. Script should look like this:

#!/bin/sh

# skinny-create-ap v2.3 (February 19, 2024)
# Bruno "GNUser" Dantas (GPLv3)

# Purpose: Turn a GNU/Linux system into a wireless router
# Dependencies: iproute2 iptables dnsmasq hostapd
# Not a dependency but highly recommended: haveged
# Syntax: $ sudo skinny-create-ap <lan_if> <wan_if> <ssid> <passphrase>
# Example usage: $ sudo skinny-create-ap wlan0 eth0 DevuanHotspot TopSecret123
# To turn off the hotspot: $ sudo pkill hostapd; sudo pkill -f 'dnsmasq.*/tmp/dnsmasq.conf'

# user variables:
lan_if="$1"
wan_if="$2"
ssid="$3"
password="$4"
ip_stem=192.168.50
channel=6
#dns_server=1.1.1.1

main()
{
	prevent_nm_interference
	setup_kernel
	setup_nat
	setup_dhcp
	setup_ap
}

prevent_nm_interference()
{
	nmcli dev set "$lan_if" managed no >/dev/null 2>&1
}

setup_kernel()
{
	echo 1 >/proc/sys/net/ipv4/conf/"$wan_if"/forwarding
	echo 1 >/proc/sys/net/ipv4/ip_forward
}

setup_nat()
{
	iptables -t nat -A POSTROUTING -o "$wan_if" -j MASQUERADE
	iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
	iptables -A FORWARD -i "$lan_if" -o "$wan_if" -j ACCEPT
}

setup_dhcp()
{
	# first, bring up $lan_if and give it a suitable ip address:
	if ip link set "$lan_if" up; then
		ip addr add $ip_stem.1/24 dev "$lan_if"
	else
		echo "$lan_if does not exist or cannot be brought up. Make sure necessary driver +/- firmware is installed." >&2
		exit 1
	fi

	# create dnsmasq config file:
	echo "
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-range=$ip_stem.100,$ip_stem.200,255.255.255.0,24h
#dhcp-option-force=option:dns-server,$dns_server
" >/tmp/dnsmasq.conf

	# start dnsmasq (with care not to clash with any dnsmasq instances that might already be running):
	dnsmasq --interface="$lan_if" --bind-interfaces --except-interface=lo -C /tmp/dnsmasq.conf 
}

setup_ap()
{
	# create hostapd config file:
	echo "
ssid=$ssid
interface=$lan_if
driver=nl80211
channel=$channel
ignore_broadcast_ssid=0
hw_mode=g
auth_algs=1
wpa=2 
wpa_passphrase=$password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP

# N
ieee80211n=1
wmm_enabled=1
" >/tmp/hostapd.conf

	# start hostapd:
	hostapd /tmp/hostapd.conf &
}

main

3. Run the script like this, for example:

sudo skinny-create-ap wlan0 eth0 DevuanHotspot TopSecret123

Now your wireless devices (e.g., Android phone) should be able to connect to DevuanHotspot using the password TopSecret123.

Let me know how you fare.

----------

PS1: Regarding radio frequency--the shell script above creates a 2.4 GHz 802.11n ("Wi-Fi 4") access point. 2.4 GHz is a good default because it has better range, simpler configuration, no regulatory issues, and broader hardware support in AP mode. If your wireless nic supports creation of 5 GHz AP and you would prefer 5 GHz, just tweak the "setup_ap" function as appropriate (let me know if you need help).

PS2: Regarding DNS lookups--if you want dnsmasq to tell wireless clients which dns sever to use, just uncomment the two lines where you see dns_server. If you leave those two lines commented, wireless clients will rely on the router (i.e., your laptop) to resolve domain names, which is a perfectly sane default.

PS3: To turn the hotspot off, run this command: sudo pkill hostapd; sudo pkill -f 'dnsmasq.*/tmp/dnsmasq.conf'

#18 Re: DIY » [SOLVED] GNU/Linux laptop as router, vpn router, or wifi repeater » 2024-02-14 19:27:23

Hi, mtbvfr. I'll be happy to try to help you. First, two quick questions, please:

1. Does your laptop have a working internet connection?

2. Does the wireless interface that you want to use to create the access point show up when you run ifconfig -a?

#19 Re: Desktop and Multimedia » How to setup Russian keyboard layout in Xorg? » 2023-10-02 17:12:13

Hi penguin. I would give deepforest a warning for the inappropriate post if I could but, alas, I'm just a fellow user.

Have you tried setxkbmap? Start with setxkbmap -query to see what your current settings are for "model" and "layout". In my case, this is what I see:

$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     us

To set available models, layouts, variants, and options, do this:

$ less /usr/share/X11/xkb/rules/evdev.lst

To change settings, this is the syntax:

$ setxkbmap [-model xkb_model] [-layout xkb_layout] [-variant xkb_variant] [-option xkb_options]

So to keep your current keyboard model and change to Russian layout, for example, do:

$ setxkbmap -layout ru

You mentioned that your Russian layout seems to have some characters off position. Maybe you are not using the Russian variant that has the positions you expect? Another possibility is that the keyboard model setting is not correct--look at your keyboard and compare it with internet images of different keyboard models to ensure that setxkbmap's "model" setting is correct for your hardware.

#20 Re: Devuan » Devuan 5 Daedalus Release (Debian 12 - Bookworm) | Looking for info » 2023-07-23 18:23:50

birdi wrote:

It seems there is no cpu or disk activity during this time, it just stays there and does nothing then continues to start as normal.

I was once affected by a very similar issue, where nothing would happen in the middle of boot process for about 30 seconds, then boot would continue as normal. In my case, the issue turned out to be that UUID of my swap partition had changed (because I deleted the old swap partition and created a new one), but initramfs had a record of the old UUID and was timing out while waiting for it to appear.

Have you changed any of your hardware or partition UUIDs recently? If so, try recreating your initramfs:

1. Boot as usual
2. Run sudo update-initramfs -u
3. Reboot

#21 Re: Other Issues » pm-utils hangs occasionally during resume » 2023-07-22 14:13:09

Yes, I think s2idle uses more battery than deep.
Switching to s2idle is the only fix I ever found that allowed the keyboard on one of my laptops to work after suspend. Sorry I couldn't help you find a satisfactory fix. Happy hacking!

#22 Re: Other Issues » pm-utils hangs occasionally during resume » 2023-07-22 11:07:48

Your mem_sleep is set to deep. s2idle is listed as a valid option but is not selected. If you run the command I suggested, you should see [s2idle] deep

#23 Re: Other Issues » pm-utils hangs occasionally during resume » 2023-07-17 03:28:08

Hi, rechvs. I once had a similar problem, where laptop keyboard was unresponsive after resuming from suspend. Laptop in question ran Devuan (I don't remember which version) and did have pm-utils installed.

The problem/solution may vary depending on exact hardware. For me, changing suspend method from the default "deep" (i.e., suspend-to-RAM) to "s2idle" (i.e., suspend-to-idle) solved the problem:

$ sudo sh -c "echo s2idle >/sys/power/mem_sleep"

#24 Re: Desktop and Multimedia » [SOLVED] Random Xorg crashes after upgrading to Daedalus » 2023-07-05 13:28:15

For completion's sake, here is the output of inxi -Gx in the three configurations I mentioned in original post:

#1: Laptop's default configuration. Result: Xorg consistently crashes when visiting certain webpages using chromium-based web browsers.

$ inxi -Gx
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Sony driver: i915
    v: kernel arch: Gen-5.75 bus-ID: 00:02.0
  Device-2: Microdia Webcam type: USB driver: uvcvideo bus-ID: 1-1.2:3
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: modesetting
    unloaded: fbdev,vesa dri: crocus gpu: i915 resolution: 1366x768~60Hz
  API: OpenGL v: 2.1 Mesa 22.3.6 renderer: Mesa Intel HD Graphics (ILK)
    direct-render: Yes

#2: Workaround using nomodeset kernel boot parameter. Result: No Xorg crashes at the price of an inactive GPU.

$ inxi -Gx
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Sony driver: N/A
    arch: Gen-5.75 bus-ID: 00:02.0
  Device-2: Microdia Webcam type: USB driver: uvcvideo bus-ID: 1-1.2:3
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: vesa
    unloaded: fbdev,modesetting dri: swrast gpu: N/A resolution: 1366x768
  API: OpenGL v: 4.5 Mesa 22.3.6 renderer: llvmpipe (LLVM 15.0.6 128 bits)
    direct-render: Yes

#3: Current configuration, achieved with /usr/share/X11/xorg.conf.d/09-force-intel-driver.conf and no special kernel boot parameters. Result: No Xorg crashes, GPU is active.

$ inxi -Gx
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Sony driver: i915
    v: kernel arch: Gen-5.75 bus-ID: 00:02.0
  Device-2: Microdia Webcam type: USB driver: uvcvideo bus-ID: 1-1.2:3
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: intel
    dri: crocus gpu: i915 resolution: 1366x768~60Hz
  API: OpenGL v: 2.1 Mesa 22.3.6 renderer: Mesa Intel HD Graphics (ILK)
    direct-render: Yes

Other than this one strange issue on this one laptop, upgrade from Chimaera to Daedalus was smooth for all my machines. Thank you, Devuan team!

Happy hacking!

#25 Re: Desktop and Multimedia » [SOLVED] Random Xorg crashes after upgrading to Daedalus » 2023-07-05 02:42:56

Altoid wrote:

In short: screen numbers start at 0.

Maybe so, but the affected laptop only has one (built-in) screen and the config file has no effect unless I use Device1.

Board footer

Forum Software