What do the cputime numbers in /proc/stat actually represent? It's definitely not the number of jiffies.
I am new to kernel programming. I want to collect some cpu stats after every 100
_jiffies_ (for my college research). So I do the following in
[kernel/time/timekeeping.c](https://github.com/torvalds/linux/blob/master/kernel/time/timekeeping.c#L2194):
```c
void do_timer(unsigned long ticks)
{
if (jiffies_64 % 100 == 0) {
collect_some_cpu_stats();
}
jiffies_64 += ticks;
calc_global_load(ticks);
}
```
I found that every time `collect_some_cpu_stats()` is called, the total
[`cpustat`](https://github.com/torvalds/linux/blob/master/include/linux/kernel_stat.h#L35)
will have been incremented by more than 400,000 per core. (I don't remember the exact number of zeroes.)
So, clearly `cpustat` is not incremented once per jiffy. If so, how are they
incremented?
https://redd.it/frfvec
@r_linux
I am new to kernel programming. I want to collect some cpu stats after every 100
_jiffies_ (for my college research). So I do the following in
[kernel/time/timekeeping.c](https://github.com/torvalds/linux/blob/master/kernel/time/timekeeping.c#L2194):
```c
void do_timer(unsigned long ticks)
{
if (jiffies_64 % 100 == 0) {
collect_some_cpu_stats();
}
jiffies_64 += ticks;
calc_global_load(ticks);
}
```
I found that every time `collect_some_cpu_stats()` is called, the total
[`cpustat`](https://github.com/torvalds/linux/blob/master/include/linux/kernel_stat.h#L35)
will have been incremented by more than 400,000 per core. (I don't remember the exact number of zeroes.)
So, clearly `cpustat` is not incremented once per jiffy. If so, how are they
incremented?
https://redd.it/frfvec
@r_linux
GitHub
linux/kernel/time/timekeeping.c at master · torvalds/linux
Linux kernel source tree. Contribute to torvalds/linux development by creating an account on GitHub.
Legality of emulating a DE
Hello r/linux,
I had this question for quite some time.
If someone decided to create a user interface that is used by other OSes, will they be sued for copyright infringement?
For e.g. if I decided to create a user interface by following Material Design Language or Metro Design Language, will I be sued by Google or MS?
https://redd.it/frihby
@r_linux
Hello r/linux,
I had this question for quite some time.
If someone decided to create a user interface that is used by other OSes, will they be sued for copyright infringement?
For e.g. if I decided to create a user interface by following Material Design Language or Metro Design Language, will I be sued by Google or MS?
https://redd.it/frihby
@r_linux
reddit
Legality of emulating a DE
Hello r/linux, I had this question for quite some time. If someone decided to create a user interface that is used by other OSes, will they be...
Debian Calls on the Linux World to Help Fight the New Coronavirus
https://lists.debian.org/debian-devel-announce/2020/03/msg00010.html
https://redd.it/frivl4
@r_linux
https://lists.debian.org/debian-devel-announce/2020/03/msg00010.html
https://redd.it/frivl4
@r_linux
reddit
Debian Calls on the Linux World to Help Fight the New Coronavirus
Posted in r/linux by u/IntnsRed • 1 point and 1 comment
Linux Experiences/Rants or Education/Certifications thread - March 30, 2020
Welcome to r/linux rants and experiences! This megathread is also to hear opinions from anyone just starting out with Linux or those that have used Linux (GNU or otherwise) for a long time.
Let us know what's annoying you, whats making you happy, or something that you want to get out to r/linux but didn't make the cut into a full post of it's own.
For those looking for certifications please use this megathread to ask about how to get certified whether it's for the business world or for your own satisfaction. Be sure to check out r/linuxadmin for more discussion in the SysAdmin world!
_Please keep questions in r/linuxquestions, r/linux4noobs, or the Wednesday automod thread._
https://redd.it/frk0lk
@r_linux
Welcome to r/linux rants and experiences! This megathread is also to hear opinions from anyone just starting out with Linux or those that have used Linux (GNU or otherwise) for a long time.
Let us know what's annoying you, whats making you happy, or something that you want to get out to r/linux but didn't make the cut into a full post of it's own.
For those looking for certifications please use this megathread to ask about how to get certified whether it's for the business world or for your own satisfaction. Be sure to check out r/linuxadmin for more discussion in the SysAdmin world!
_Please keep questions in r/linuxquestions, r/linux4noobs, or the Wednesday automod thread._
https://redd.it/frk0lk
@r_linux
reddit
Linux Experiences/Rants or Education/Certifications thread - March...
Welcome to r/linux rants and experiences! This megathread is also to hear opinions from anyone just starting out with Linux or those that have...
Bumblebee guys, try PRIME render offload. Performance on a par with Windows.
❯ inxi -CGMz
Machine: Type: Laptop System: Dell product: XPS 15 9560 v: N/A serial: <filter>
Mobo: Dell model: 0YH90J v: A04 serial: <filter> UEFI: Dell v: 1.18.0 date: 11/17/2019
CPU: Topology: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP L2 cache: 6144 KiB
Speed: 1000 MHz min/max: 800/2800 MHz Core speeds (MHz): 1: 1000 2: 1000 3: 1000 4: 1000 5: 1000 6: 1000 7: 1000
8: 1001
Graphics: Device-1: Intel HD Graphics 630 driver: i915 v: kernel
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] driver: nvidia v: 440.64
Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia unloaded: vesa resolution: 3840x2160~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2) v: 4.6 Mesa 19.3.4
~
❯ prime-run inxi -CGMz
Machine: Type: Laptop System: Dell product: XPS 15 9560 v: N/A serial: <filter>
Mobo: Dell model: 0YH90J v: A04 serial: <filter> UEFI: Dell v: 1.18.0 date: 11/17/2019
CPU: Topology: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP L2 cache: 6144 KiB
Speed: 2579 MHz min/max: 800/2800 MHz Core speeds (MHz): 1: 2393 2: 1921 3: 2333 4: 2225 5: 2185 6: 2240 7: 2310
8: 2194
Graphics: Device-1: Intel HD Graphics 630 driver: i915 v: kernel
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] driver: nvidia v: 440.64
Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia unloaded: vesa resolution: 3840x2160~60Hz
OpenGL: renderer: GeForce GTX 1050/PCIe/SSE2 v: 4.6.0 NVIDIA 440.64
I do not play much game. But sometimes.
My setup was bumblebee. `optirun(primusrun` + `primus_vk(when playing via wine)` is working well mostly. But it's performance is not good as native run on Windows.
Once, I tried `nvidia-xrun` with steam. It's performance was good. Same with Windows. But it is clunky and inconvenient.
So today I tried new one.
https://wiki.archlinux.org/index.php/PRIME#PRIME_render_offload
bumblebee blacklist nvidia module in `/usr/lib/...` not `/etc/modprobe.d/...` . I removed it and installed `nvidia-prime`.
❯ yay -Ql nvidia-prime
nvidia-prime /usr/
nvidia-prime /usr/bin/
nvidia-prime /usr/bin/prime-run
nvidia-prime /usr/share/
nvidia-prime /usr/share/X11/
nvidia-prime /usr/share/X11/xorg.conf.d/
nvidia-prime /usr/share/X11/xorg.conf.d/20-nvidia-prime.conf
Reboot. Check it works.
❯ prime-run glxinfo | grep "OpenGL renderer"
OpenGL renderer string: GeForce GTX 1050/PCIe/SSE2
~
❯ prime-run glxspheres64
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
GLX FB config ID of window: 0x14e (8/8/8/0)
Visual ID of window: 0x2f9
Context is Direct
OpenGL Renderer: GeForce GTX 1050/PCIe/SSE2
61.184080 frames/sec - 469.486862 Mpixels/sec
59.934468 frames/sec - 459.898153 Mpixels/sec
❯ nvidia-smi
Mon Mar 30 15:38:07 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64 Driver Version: 440.64 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 47C P8 N/A / N/A | 103MiB / 4042MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes:
❯ inxi -CGMz
Machine: Type: Laptop System: Dell product: XPS 15 9560 v: N/A serial: <filter>
Mobo: Dell model: 0YH90J v: A04 serial: <filter> UEFI: Dell v: 1.18.0 date: 11/17/2019
CPU: Topology: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP L2 cache: 6144 KiB
Speed: 1000 MHz min/max: 800/2800 MHz Core speeds (MHz): 1: 1000 2: 1000 3: 1000 4: 1000 5: 1000 6: 1000 7: 1000
8: 1001
Graphics: Device-1: Intel HD Graphics 630 driver: i915 v: kernel
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] driver: nvidia v: 440.64
Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia unloaded: vesa resolution: 3840x2160~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2) v: 4.6 Mesa 19.3.4
~
❯ prime-run inxi -CGMz
Machine: Type: Laptop System: Dell product: XPS 15 9560 v: N/A serial: <filter>
Mobo: Dell model: 0YH90J v: A04 serial: <filter> UEFI: Dell v: 1.18.0 date: 11/17/2019
CPU: Topology: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP L2 cache: 6144 KiB
Speed: 2579 MHz min/max: 800/2800 MHz Core speeds (MHz): 1: 2393 2: 1921 3: 2333 4: 2225 5: 2185 6: 2240 7: 2310
8: 2194
Graphics: Device-1: Intel HD Graphics 630 driver: i915 v: kernel
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] driver: nvidia v: 440.64
Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia unloaded: vesa resolution: 3840x2160~60Hz
OpenGL: renderer: GeForce GTX 1050/PCIe/SSE2 v: 4.6.0 NVIDIA 440.64
I do not play much game. But sometimes.
My setup was bumblebee. `optirun(primusrun` + `primus_vk(when playing via wine)` is working well mostly. But it's performance is not good as native run on Windows.
Once, I tried `nvidia-xrun` with steam. It's performance was good. Same with Windows. But it is clunky and inconvenient.
So today I tried new one.
https://wiki.archlinux.org/index.php/PRIME#PRIME_render_offload
bumblebee blacklist nvidia module in `/usr/lib/...` not `/etc/modprobe.d/...` . I removed it and installed `nvidia-prime`.
❯ yay -Ql nvidia-prime
nvidia-prime /usr/
nvidia-prime /usr/bin/
nvidia-prime /usr/bin/prime-run
nvidia-prime /usr/share/
nvidia-prime /usr/share/X11/
nvidia-prime /usr/share/X11/xorg.conf.d/
nvidia-prime /usr/share/X11/xorg.conf.d/20-nvidia-prime.conf
Reboot. Check it works.
❯ prime-run glxinfo | grep "OpenGL renderer"
OpenGL renderer string: GeForce GTX 1050/PCIe/SSE2
~
❯ prime-run glxspheres64
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
GLX FB config ID of window: 0x14e (8/8/8/0)
Visual ID of window: 0x2f9
Context is Direct
OpenGL Renderer: GeForce GTX 1050/PCIe/SSE2
61.184080 frames/sec - 469.486862 Mpixels/sec
59.934468 frames/sec - 459.898153 Mpixels/sec
❯ nvidia-smi
Mon Mar 30 15:38:07 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64 Driver Version: 440.64 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 47C P8 N/A / N/A | 103MiB / 4042MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes:
GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1092 G /usr/lib/Xorg 102MiB |
+-----------------------------------------------------------------------------+
Now time to do real thing.
$ prime-run steam
I've tried 3 games. Steam, Proton-5.0.5
- Factorio : It has native linux support. Pretty fun and very well made stable game. 1800+ hour played. this game is fine with Intel Kabylake G630 if not super megabase. so dont really need nvidia gpu. but it was some trouble with `primusrun`. lower fps than Intel. But now it's working pretty good. All grphics options turned on, loaded my most big saved game. Yes, constant 60fps. Good
- Factory Town : It worked with `primus-vk` previously but lower fps than native Windows run. Now same with Windows. Smooth. Good.
- Banished : was same situation with factory town. Now very good.
- ioquake3 : It's not steam game. Pretty constant max fps on 4k(3840x2160). Good
https://redd.it/frlv1v
@r_linux
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1092 G /usr/lib/Xorg 102MiB |
+-----------------------------------------------------------------------------+
Now time to do real thing.
$ prime-run steam
I've tried 3 games. Steam, Proton-5.0.5
- Factorio : It has native linux support. Pretty fun and very well made stable game. 1800+ hour played. this game is fine with Intel Kabylake G630 if not super megabase. so dont really need nvidia gpu. but it was some trouble with `primusrun`. lower fps than Intel. But now it's working pretty good. All grphics options turned on, loaded my most big saved game. Yes, constant 60fps. Good
- Factory Town : It worked with `primus-vk` previously but lower fps than native Windows run. Now same with Windows. Smooth. Good.
- Banished : was same situation with factory town. Now very good.
- ioquake3 : It's not steam game. Pretty constant max fps on 4k(3840x2160). Good
https://redd.it/frlv1v
@r_linux
reddit
Bumblebee guys, try PRIME render offload. Performance on a par...
❯ inxi -CGMz Machine: Type: Laptop System: Dell product: XPS 15 9560 v: N/A serial: Mobo: Dell model: 0YH90J v: A04...
Maemo Leste - Twelfth Update (February and March) 2020
https://maemo-leste.github.io/maemo-leste-twelfth-update-february-and-march-2020.html
https://redd.it/frmk6s
@r_linux
https://maemo-leste.github.io/maemo-leste-twelfth-update-february-and-march-2020.html
https://redd.it/frmk6s
@r_linux
maemo-leste.github.io
Maemo Leste - Twelfth Update (February and March) 2020 - Maemo Leste
It's been several weeks since our pre-FOSDEM 2020 update, and let's start with a few highlights: We've been around for two years now! We switched from Devuan ascii (Debian stretch) to Devuan...
Power features in file manager nnn (Part 2)
https://github.com/jarun/nnn/wiki/Power-features-2
https://redd.it/frqy1n
@r_linux
https://github.com/jarun/nnn/wiki/Power-features-2
https://redd.it/frqy1n
@r_linux
GitHub
Power features 2
:dolphin: The missing terminal file manager for X. - jarun/nnn
WireGuard VPN makes it to 1.0.0—and into the next Linux kernel
https://arstechnica.com/gadgets/2020/03/wireguard-vpn-makes-it-to-1-0-0-and-into-the-next-linux-kernel/
https://redd.it/frtcox
@r_linux
https://arstechnica.com/gadgets/2020/03/wireguard-vpn-makes-it-to-1-0-0-and-into-the-next-linux-kernel/
https://redd.it/frtcox
@r_linux
Ars Technica
WireGuard VPN makes it to 1.0.0—and into the next Linux kernel
It's a good day for WireGuard users—DKMS builds will soon be behind us.
Devuan 3 Beowulf Beta released
https://lists.dyne.org/lurker/message/20200315.162249.bd694d41.en.html
https://redd.it/frrif4
@r_linux
https://lists.dyne.org/lurker/message/20200315.162249.bd694d41.en.html
https://redd.it/frrif4
@r_linux
Why I switched back to windows from Linux
This is just a post on why I switched back from Linux (Pop! OS) to windows, as you normally hear of people switching from windows to Linux. Now I decided to switch completely from windows to Linux (yes I know that was dumb but I already knew how to use Linux from virtual machines). Now I really liked Linux, but the problem was with gaming. Before I switched to Linux I made sure that my favorite games were compatible. I was able to play the games I wanted but most weren’t designed well for Linux and were very buggy and crashed a lot. My computer is very fast and I felt like I wasn’t able to get the same performance results in Linux instead of windows. My graphics, frame rate, and lag wouldn’t be very noticeably worse. (Yes I had the right drivers installed). I feel like Linux is the best option for a work or school computer, but for gaming, I would stick to windows.
https://redd.it/frwzwj
@r_linux
This is just a post on why I switched back from Linux (Pop! OS) to windows, as you normally hear of people switching from windows to Linux. Now I decided to switch completely from windows to Linux (yes I know that was dumb but I already knew how to use Linux from virtual machines). Now I really liked Linux, but the problem was with gaming. Before I switched to Linux I made sure that my favorite games were compatible. I was able to play the games I wanted but most weren’t designed well for Linux and were very buggy and crashed a lot. My computer is very fast and I felt like I wasn’t able to get the same performance results in Linux instead of windows. My graphics, frame rate, and lag wouldn’t be very noticeably worse. (Yes I had the right drivers installed). I feel like Linux is the best option for a work or school computer, but for gaming, I would stick to windows.
https://redd.it/frwzwj
@r_linux
reddit
Why I switched back to windows from Linux
This is just a post on why I switched back from Linux (Pop! OS) to windows, as you normally hear of people switching from windows to Linux. Now I...
How do I allow a program installer to write?
A while ago someone asked why I would want to have Windows over Linux and this is why. If I was using Windows Fallout 4 would be installed by now.
I'm trying to give Linux a second chance but I'm trying to install it from my disk and I'm having trouble. I have wine but the Fallout 4 installer doesn't have permission to write to my file system. How do I change this? Or should I switch back to Windows?
https://redd.it/frz6rt
@r_linux
A while ago someone asked why I would want to have Windows over Linux and this is why. If I was using Windows Fallout 4 would be installed by now.
I'm trying to give Linux a second chance but I'm trying to install it from my disk and I'm having trouble. I have wine but the Fallout 4 installer doesn't have permission to write to my file system. How do I change this? Or should I switch back to Windows?
https://redd.it/frz6rt
@r_linux
reddit
How do I allow a program installer to write?
A while ago someone asked why I would want to have Windows over Linux and this is why. If I was using Windows Fallout 4 would be installed by...